aramorph-users
[Top][All Lists]
Advanced

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

Re: [Aramorph-users] XML tables


From: Pierrick Brihaye
Subject: Re: [Aramorph-users] XML tables
Date: Fri, 19 Aug 2005 20:34:38 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7) Gecko/20040608

Hi,

Ahmed El-dawy a écrit :

    1) remember that implementing classes should be singletons. The
interface may so have a GetInstance() method. I don't think so. The getInstance() method will not be called from the interface because it is static. It will be called from the implementing class directly.

OK.

    2) I would like an init() method to pass, for example, a JDBCConnection.
Do you mean something like constructor?

No since we shouldn't have access to the constructor.

It will be constructed in the getInstance() method, so this will be useless. Also I don't know which parameter it may receive. If it depends on the implementation, it cannot be added to the interface.

It should be generic enough. See the design of :
http://excalibur.apache.org/apidocs/org/apache/avalon/excalibur/component/ExcaliburComponentManager.html

... which implements Configurable, initializable...

Welcome to COP (component oriented programming).

    3) we must have a LoadFromFile() method and maybe even a LoadFromXML.
Is this different from init()?

IMHO, yes. init() would be used to initialize a connection to a database. LoadFromFile would actually send its content. Well... as you like but we need at least one method :-)

I think this is implementation specific. LoadFromXML, for example, will not be used with JDBCDictionaryHandler.

On the first time, it will !

    4) rather then "translitered" arguments, consider Unicode ones. We may
even have methods for both. Right! And I think we will have to change the InMemoryDictionaryHandler to handle this.

Yes.

    Parsing a comment : ; conjunctions
    Parsing unvocalized : w
    Parsing vocalized : wa
    Parsing morphological category : Pref-Wa
    Parsing gloss and grammatical category : and <pos>wa/CONJ+</pos>

    etc, etc. It will be useful for the bloody GlossPOS ;-)

Where will this go?

In the code.

By the way, I have set the transformer to write XML comments in place of dictionary comments.

Good idea.

    Oh, one more important thing I would like you to do. To remain ASCII
    compliant, use the Java \uXXXXsyntax for arabic characters. Aramorph
    must comple even on computers that don't support arabic.
OK! I will do it.

OK.


    Could you please provide an example ? Since I've planned to write a
LemmaIDAnalyzer, this is bad news :-)
The code you have writes error message when finding one. Here's an example:

        Found an element without lemma at line: 5811

        Found an element without lemma at line: 5812
        Found an element without lemma at line: 5813
Found an element without lemma at line: 5814

You're right :

;--- Amd
md      >amad        N       term;period;extent;range;duration
Amd     >amad        N       term;period;extent;range;duration
|mAd    |mAd    N       terms;periods
AmAd    |mAd    N       terms;periods

In such a case, I would create a lemmaID from the root.

Another question. For which XML dictionary format do I start writing the parser?

Still have to think about this. Stay tuned !

p.b.




reply via email to

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