Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] I am new to XOM, can I create and read XML documents that contains Japnese characters? Please reply soon, URGENT!! Thanks!

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Grzegorz Kaczor" <grzegorz.kaczor AT gmail.com>
  • To: "Angela Amoateng" <angela.amoateng AT kcl.ac.uk>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] I am new to XOM, can I create and read XML documents that contains Japnese characters? Please reply soon, URGENT!! Thanks!
  • Date: Sun, 20 May 2007 16:40:55 +0200

Hi Angela,

I think you just need to implement some kind of dictionary in Java and
any XML document model will be of limited help here :).

1) AFAIK Hiragana is part of BMP (Basic Multilingual Plane) so XOM, as
well as any other XML parser (and Java in general) should handle it as
well as any other Unicode BMP script.

http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Basic_Multilingual_Plane

2) You can create that document, by parsing the dictionary files and
building them using XOM. However, usability of it is doubtful to me.

3) You can do it using XPath //entry[@word='apple'] or similar.

Anyway, I think that you can use XOM to read your document into memory
and then use two hash tables to implement translations in both
directions. If the dictionary is big it will be more efficient than
XPath. And it is easy, clear and fast to implement.

Regards,
Grzegorz

On 20/05/07, Angela Amoateng <angela.amoateng AT kcl.ac.uk> wrote:
Hi all at XOM,

I discovered this form of Java API from a book "Learn Java in 24 hours"
and I like what I see!

I am a computer science student at King's College London, University of
London and I am currently building a system using Java and XML(an
English to Japanese translator and tutor) for my final year project and
I have a TIGHT DEADLINE! I am good at Java, but I am new to XML,
although I am aware of how DOM level 1 and SAX works.

In my project, one XML document, will have a list of English words and
phrases with their Japanese translation and in another XML document I
will have a list of Japanese words and phrases with the English
translation.

I would like to know if three things are possible using the XOM model:


1)Does the XOM model recognise and create an XML document containing
Japanese characters, specifically Hiragana? How will I go about this?



2) Can I create an XML document using XOM model, that will enable me to
have an "EqualsTo" function for each word. For example, "apple" in
Japanese is "ringo" so:

<word>apple = ringo <word>

3) Also, if a string input (which would be a word of Japanese or
English) from a Java GUI is entered, that string input could be
compared to the list of words in the XML document and return the value
it equals to. For example, if the user enters "apple" in a JTextfield,
it will return the value "ringo"


I hope you can answer this for me!! Thanks!!

Angela
--
Angela Amoateng
angela.amoateng AT kcl.ac.uk

_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest



--
"Choć tyle wiemy własnym doświadczeniem:
W nas jest Raj, Piekło - i do obu - szlaki."
J.K.



Archive powered by MHonArc 2.6.24.

Top of Page