aramorph-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aramorph-users] Re: XMl Dictionary Handler


From: Ahmed El-dawy
Subject: Re: [Aramorph-users] Re: XMl Dictionary Handler
Date: Thu, 1 Sep 2005 06:58:06 +0300

On 8/29/05, Pierrick Brihaye <address@hidden> wrote:
> Hi,
> 
> Ahmed El-dawy wrote:
> 
> Anyway...
> 
> Please package your java files in gpl.pierrick.brihaye.aramorph.* and
> zip them accordingly.
OK! eclipse did it for me :)

> Separate also what is related to the interface and what is related to
> the implementation as we have discussed before.
I have added the interface with this version.
Do we need an interface for Dictionary, CompatabilityTable and
DictionaryEntry as well? I think we may need for the first two. I am
thinking about JDBC dictionary for example. What do you think?

> Any other concern should be in classes. Actually, the classes you
> provided have a double implementation :
> in-memory storage
> XML initialization (no more reading from original dictionary files ?).
> Here, we could get benefit of a dedicated interface fromXML() or similar.
Are you talking about the converter? If so, we don't need to enhance
it as it will run for one time. If not then I don't get this point :)

> I'm sure this can be reorganized in a more efficient way : remember that
> what we need is to replace the in-memory storage by more efficient
> storages (RDBMS, Lucene, XML, whatever...).
> 
> Some harmless comments :
> 
> Object o = entries.get(de.getEntry());
> replace Object by Collection ?
I am afraid of the null pointer exception. If entries.get(...) returns
null, will it be accepted to cast it to Collection? If we were using
JDK 5, this casting will be done automatically, but I am sticking to
JDK 1.4 to be consistent with other parts of code.

> Do avoid import com.sun.org.apache.xpath.internal.Arg;
I did, in this version.

> The constructor of DictionaryEntry should avoid the Gloss/POS split
> since this job should be done by the XML converter.
I am leaving the old constructor for the converter and
InMemoryDictionaryHandler to work.

By the way, I don't think we will need JDBCDictinoaryHandler AND
LuceneDictionaryHandler, we would better make only one of them (may be
JDBC). The benefit of each one is less memory and fast start up. I
don't see that one of them will be significantly better than the other
in any aspect. Remember that all queries are done on exact matches,
Lucene is powerful with "text search" when searching a "text". What is
your opinion?

-- 
regards,
Ahmed Saad

Attachment: SAXXMLDictionaryHandler.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]