|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
how to exactly convert Chinese Big5 OWL file to mysql ?I got a Chinese Big5 OWL file, which is doing some simple ontology about clothes. I follow the instructions of "Convert Project to Format..".Works fine to create a table in my localhost db. But all the Big5 Words are all become un-recognized words..!
And then when I try some program to use SPARQL querying the db, also turn out some un-recognized words like [URI]#??? So my question is how to convert the owl file to db programmatically? especially the encoding,could I specify the encoding in CODEs? thx!I've been search a lot in the Nabble forum!Great forum!! ![]() |
|
|
Re: how to exactly convert Chinese Big5 OWL file to mysql ?Hi Robert,
I did not try this, but it should work.. You should set the charset for your columns to UTF-8. (No need to do this in the next beta-s, because we will make this the default for mysql). To do this, you should modify the protege.properties before doing the conversion. Please add this line to protege.properties: Database.typename.varchar.com.mysql.jdbc.Driver=VARCHAR(255) COLLATE UTF8_BIN This is used when creating the columns of the database table. I think UTF-8 should be able to handle Chinese Big5. If not, then you can change the above statement to use explicitly the Chinese Big5 charset. This is documented on the MySQL webpage [1]. Some versions of MySQL 5 have bugs related to Chinese Big5. You can check that you have a version that is not affected by those bugs (google helps). This solution only works in the latest Protege 3.4 beta 504. Tania [1]: http://dev.mysql.com/doc/refman/5.0/en/charset-column.html RobertW wrote: > I got a Chinese Big5 OWL file, which is doing some simple ontology about > clothes. I follow the instructions of "Convert Project to Format..".Works > fine to create a table in my localhost db. But all the Big5 Words are all > become un-recognized words..! > > And then when I try some program to use SPARQL querying the db, also turn > out some un-recognized words like [URI]#??? > > So my question is how to convert the owl file to db programmatically? > especially the encoding,could I specify the encoding in CODEs? > > thx!I've been search a lot in the Nabble forum!Great forum!!:clap: > _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Re: how to exactly convert Chinese Big5 OWL file to mysql ?about the config of protege.properties, I did it alreay,cos some thread I read before mentioned it, and I try both 3.3.1 & 3.4 beta,which aren't work.
but! I found something about config the jdbc connection in W3China forum. There some said you can do this when making connection to create table(table set to utf8_unicode_ci): jdbc:mysql://localhost/owlimport?useUnicode=true&characterEncoding=utf8 it turn out the table show the right Chinese Big5 encoding words! but back in protege the pprj became un-recognized words...anyone know why this happens?(I done this method many times,all turn out this way)very strange... Next maybe I'll try other verions of mysql, or even SQL server. Or try Jena API to see if it will make difference.Really got frustrated.. Actually I'm wondering if protege wiki should mention something about the RIGHT combination of protege & DATABASE version(such as mysql), since protege provide backend support(maybe it already in some place of wiki).But anyway, thank you for the reply! Robert
|
| Free Forum Powered by Nabble | Forum Help |