NooJ : A Cooperative Object Oriented Architecture for NLP
p. 351-361
Résumé
The current INTEX linguistic engine (v. 4.x) needs to be redesigned : processing Asian and Semitic languages calls for new complex tokenizers, parsing languages with rich morphologies (e.g. German, Korean) necessitates cooperation between the morphological and lexical parsers, and the fact that more and more users are using INTEX for very diverse applications makes it necessary to construct a new open, cooperative, and scalable architecture : NooJ.
Texte intégral
Introduction
1The current INTEX software architecture (4.0 – 4.24) consists of two levels : a set of over thirty standalone programs written in POSIX ANSI C (see [Silberztein 1999]), and a Microsoft Windows graphical interface written in C++. Its linguistic engine runs Finite State Transducers that process linguistic data represented by DELA-type systems of dictionaries (see [Courtois Silberztein 1990a]).
2During the last few years, users have been pushing the limits of INTEX in a number of directions, to the point where substantial modifications are needed in all areas.
3Our goal is to go beyond structural syntactic parsing in order to fully implement a transformational system that can both analyze texts (i.e. to generate elementary sentences from complex ones) and generate paraphrases (i.e. to perform all valid transformations on a set of elementary sentences). In terms of computer applications, such a system would be able to recognize the phrase : “… La décision de Jean…” from a query such as “Qu’a décidé Jean ??” (first analyze the question into the elementary pattern Hum décider N, then perform the nominalization décider = prendre une décision, and then delete the support verb prendre : Hum prendre une décision = la décision de Hum.
4With this goal in mind, I propose to re-implement the linguistic engine of INTEX in a new toolbox – NooJ – that will be fully compatible with INTEX, but will easily allow for the addition of important new functionalities.
1 - Needs for a new programming language
5Because INTEX’s current linguistic engine is written in C, it cannot be simply “adapted” to the large number of applications that are being built with INTEX, nor can it be easily “enhanced” to take into account phenomena found in languages such as Chinese, Turkish or Arabic.
6For instance, the tokenizer (the interface between texts and linguistic engine) should process 8-bit extended ASCII texts (the present standard for texts), as well as 8-bit, 16-bit and 32-bit UNICODE (the emerging standard), HTML texts (the standard format for texts available on the WEB), XML texts (for textual databases), PDF (for documents), Microsoft WORD, etc.
7Then, tokenizing texts in French, German, Tai, Chinese, and Arabic requires diverse algorithms in order to deal with (1) unaccented uppercase letters in French texts, (2) the potentially unlimited length of German compounds, (3) the absence of blanks in Tai, (4) the size of the Chinese alphabet, (5) the implicit vowels in Arabic texts, etc. In the same manner, almost each language has different sorting algorithms : for instance, in Spanish, double letters (e.g. “ll”) are treated as one letter in the lexicographic order, vowels are not taken into account in Arabic, etc.
8Beyond the tokenizer, all the linguistic modules (orthograph, inflectional and derivational morphology, syntax at the local, phrasal and sentence levels, disambiguation), as well as most user tools (the graph editor, the concordance builder, the grammar debugger, the statistical tools, etc.) should be adapted to different and specific needs.
9In conclusion, we need a programming language that allows developers to modify any elementary or complex process of INTEX without having to rewrite, recompile, or even access the whole system. C-written programs, such as that of the current INTEX engine, cannot offer this flexibility. On the other hand, Object-Oriented Programming languages, and more specifically languages and environment that are designed to help build components (“Interface-Oriented Programming”) would offer developers the possibility of modifying a specific component, without having to modify the whole system.
10Therefore, JAVA/J2EE and C# would be excellent replacements for C. The choice between these two programming languages will primarily be based on the efficiency of their virtual machine (VM vs. . NET) (1), because an inefficient virtual machine would prevent the linguistic engine from being used both in large corpus processing applications, and in large-coverage linguistic applications. Another criterion is their graphical libraries (AWT vs. GDI+, and SWING vs. Windows).
2 - Needs for a new architecture
11The current architecture of INTEX is similar to the one that ran under the Next Step Operating System ten years ago (a UNIX-like system). Traditionally, when programming in UNIX, one naturally implements each basic functionality with one independent command, so that by using the “pipeline” functionality, users can easily assemble their own applications. For instance, in a shell, a typical INTEX command looks like :

12(Compute the union of two finite-state grammars, then determinize and minimize the result, then apply it to atext, then build the resulting concordance.)
13This flexibility has allowed several users to quickly build INTEX prototypes of applications, but ultimately this model (1) is responsible for a number of redundancies in the source code, (2) is inefficient because of systematic overheads, and (3) is not flexible enough for many applications.
14(1) Using the C/UNIX model in the current INTEX has forced me to duplicate commands for many elementary functionalities of the linguistic engine in order to take into account the various types of objects that INTEX can process. For instance, the single functionality of applying a grammar to a text in order to retrieve and index all its matching sequences is implemented by three different programs :
recon applies a Finite State Transducer to each sentence of a text
recondic applies a FST to each entry of a dictionary
reconind applies a FST to each index entry of a text
15A variant of this functionality, in which one applies a Context-Free grammar (i.e. a series of INTEX graphs that are potentially recursive), is implemented by three other programs :
recor applies an INTEX graph to each sentence of a text
recod applies a graph to each sentence of a text in trace mode
recorind applies a graph to each index entry of a text
16I have worked hard to keep the size of the source code as small as possible : these six programs do share common source code. But the fact that this common source code is always explicitly written (rather than hidden and implicitly inherited) has been cumbersome in practice, adds to the complexity of the system (more arguments to functions) and requires other INTEX developers who want to add their own functionality to INTEX to access and master the source code of the recognizer’s six variants.
17On the other hand, NooJ uses one parser, implemented by different types of object (dictionary, text or index). The CF parser method implicilty re-uses most of the source code of the finite-state parser. There is no redundancy in the source thanks to the inheritance mechanism : for instance, an index is a type of a dictionary ; a dictionary is a type of text. Finally NooJ gives users access to any of the basic linguistic methods implemented in INTEX, rather than to a few standalone programs.
18(2) In fact, the ideal of a UNIX flow of elementary commands does not work in practice because of the huge overhead it creates. For instance, if one wants to build a WEB search engine by using the INTEX command recon, the following shell command :
for $file in *.html
do
recon thegrammar thedictionaries $file >$file.index done
19launches the program recon (and then loads the grammar and the dictionaries) tens of thousand of times, instead of just once.
20Furthermore, most INTEX programs are much more complex in nature. For instance, the “dicos” program, which implements the recognition of simple words, accesses two types of dictionaries (an editable one, and a compacted finite-state transducer) and two types of parsers : orthographical parsers that use grammars written at the character level and morphological parsers that enforce lexical constraints, such as “re” <V> “able” (to make sure the string between the prefix and the suffix corresponds to a verb). Finally, the output of “dicos” consists of four objects : the list of unknown tokens, the dictionary of recognized simple words, the list of analyzed tokens (e.g. for German : compounds are split into their constituents), as well as several measurements useful for the statistical analysis of the text.
21Because of this complexity, the single “pipeline” model is not sufficient ; therefore, most INTEX applications consist of flows of programs that waste time writing data in a number of intermediary files (stored on the hard disk) that have to be re-loaded by subsequent programs. The resulting overhead is usually not a problem when one uses the graphical interface, but is not acceptable for real-world professional applications.
22On the other hand, NooJ will be an application server, that is, a set of components that can be launched only once and load all needed linguistic data. Then, a number of client processes can access these components without having to load their own copy of the resources.
NooJ : an application server

23(3) There are natural applications for INTEX that are currently impossible to create without having full access to INTEX’s source code. For instance :
24- - process bilingual texts : in the present architecture, the initialization work that is performed at each switch of language wastes an unacceptable amount of time. NooJ will include linguistic engine components, that can run independantly and embedd the linguistic resources they need to access ;
25- - process large numbers of small texts in parallel, such as the ones we find on the WEB : INTEX does not allow multiple processes to share common data, and therefore dictionaries and grammars would have to be loaded independently by each process. A single NooJ linguistic engine can process different texts at the same time.
26In conclusion, NooJ is designed to be an application server based on a single, integrated architecture ; that means :
27- - less redundancy in the code source (e.g. no need to have one tokenizer for the linguistic engine, and another one for the graph editor), which in turn means a smaller, and more manageable source ;
28- - almost no overhead because any developer can access all NooJ public methods (instead of a selected few programs), which in turn means a much more flexible and useful system ;
29- - users can build their own utility tools to enhance NooJ, or their own language-specific methods, and transparently add them to the application without having to recompile the system, or even access its source code.
3 - Enhancing the DELA system of dictionaries
30The French DELAS dictionary was originally built to describe the inflectional morphology of French in a way radically different from the morphological systems (most of them were based on PROLOG-written rules) that existed at the time. One way to check the accuracy and recall of the DELAS was to inflect all its entries in a corresponding DELAF dictionary (See [Courtois 1989]). Very soon, we started to use the DELAF dictionary for the automatic analysis of large texts ([Courtois Silberztein 1990b]). At this point, there was no methodology to build a large coverage derivational morphology system, and until now we have simply ignored the problem by processing derived forms as independant lexical entries.
31Today, the vocabulary of a dozen languages are being described with DELA systems of dictionaries. The success of DELA and INTEX are obviously co-related ; INTEX provides a dozen tools to help build DELA dictionaries, check their entries, inflect them, check their coverage, etc. and it forced linguists to use the “DELA format” to represent all types of linguistic information.
32Having one unified format for all types of lexical data is one of INTEX’s strong points. But the DELA format is no longer adequate considering that we need a strong morphological component in order to perform automatic transformational analyses of sentences in texts. As in the example given in the introduction, we would like to connect verbs (such as “jouer”) to other verbal forms (“rejouer”), corresponding nouns (“jeu”, “joueur”, “jouabilité”) and adjectives (“jouable”).
33[Clemenceau 1993] and [Bigey 1999] showed us that it is possible to take derivations into account by connecting lexicon-grammars of verbs to DELAS dictionaries.
34The “NooJ” versions of DELA dictionaries will allow lexicographers to associate each word with corresponding derivational variants, based on the integration of lexicon-grammar tables. Morphological derivations will then be described precisely for each entry. For instance, the noun don is associated with the verb donner+36DT (Luc a donné un cendrier à Léa = Le cendrier est un don de Luc à Léa) but not with the verb donner+35L (La tête de Luc a donné dans le mur).
donner, . V+t+36DT+RE+ABLE VN=don N0=donneur
donner, . V+i+35R+RE
35In the same time, linking derived forms in the dictionary will allow for a much lighter dictionary : for instance, if the feature “+RE” is associated with the verb “donner”, then it becomes unnecessary to add an lexical entry for “redonner”.
5 - INTEX 4.3x
36I am planning to build a series of transitional versions of INTEX : the upcoming 4.3x versions. These versions will integrate enhancements that will eventually be in order to prepare for the arrival of NooJ :
37- - named local variables in enhanced RTNs will allow linguists to start implementing full transformational operations on texts ;
38- - A flexible finite-state tokenizer will be added, that can tokenize Germanic and Asian languages. For instance, the German compositional form :
Schiffahrtsgesellschaft
39will be treated as three tokens : {Schiff} {fahrt} {gesellschaft}
40Note that Spanish clitics can be represented in the same way :
digaselo => {diga} {se} {lo}
41- - This tokenizer will be the base of a full morphological parser capable of treating derivational morphology. This problem constitutes the weakest point of the present DELA system of dictionaries ; for instance, the DELAS dictionary contains the following independent entries :
jouer, jouable, rejouer, rejouable
42The new dictionary will contain only the first entry, which will be associated with information used by the morphological parser to recognize the other forms, and associate them with the base form :
jouer, V+ABLE1

A morphological analysis of a word form
43This association between the DELAF and the morphological parser will solve the problems of languages that have a heavy morphology, such as Korean, for which trying to represent all forms in a DELAF-type dictionary poses technical problems, and does not make any sense from a linguistic point of view.
- - and a few surprises ! (2)
Bibliographie
Reference :
Magali Bigey, 1999. Nominalisation, grammaire transformationnelle automatique. Mémoire de Maîtrise de Sciences du langage, Université de Franche-Comté.
Blandine Courtois, 1989. DELAF : dictionnaire électronique du LADL pour les mots fléchis du français. Rapport technique du LADL n° 20, Paris : Université Paris 7.
Blandine Courtois, Max Silberztein Editeurs. 1990a. Les dictionnaires électroniques du français. Langue Française 87, Paris : Larousse.
Blandine Courtois, Max Silberztein. 1990b. Développement d’outils de navigation dans les grandes documentations, Rapport Technique du LADL n° 28, Paris : Université Paris 7.
David Clemenceau, 1993. Structuration du lexique et reconnaissance des mots dérivés. Thèse de Doctorat, Paris : Université Paris 7.
Max Silberztein, 1990. Le dictionnaire DELAC. In Les dictionnaires électroniques du français : le système DELA. Larousse n° 87 : Paris.
Max Silberztein, 1999. INTEX : a Finite State Transducer toolbox. In Theoretical Computer Science #231 : 1, Elsevier Science, 1999.
Notes de bas de page
1 I already have tested SUN’s, IBM’s and Borland’s JAVA virtual machines on a Windows 2000 PC with 1 GB RAM. Unfortunately, a straightforward adaptation of the C program that compiles a 3,000,000+ word dictionary into a minimal deterministic finite state automaton is at least 50 time slower than the original.
2 Since 2002, the INTEX system has evolved, and now includes a new morphological system that implements the ideas presented in this paper. A first prototype of NooJ was presented at the 6th INTEX Workshop (May 2003, Sofia, Bulgaria).
Auteur
-
Max Silberztein
IBM T.J. Watson Research Center LASELDI, Université de Franche-Comté
Max.silberztein@univ-fcomte.fr
Le texte seul est utilisable sous licence Licence OpenEdition Books. Les autres éléments (illustrations, fichiers annexes importés) sont « Tous droits réservés », sauf mention contraire.
La formation d’une opinion démocratique
Le cas du Jura, de la révolution de 1848 à la « république triomphante » (vers 1895)
Pierre Merlin
2017
Les mutations récentes du foncier et des agricultures en Europe
Gérard Chouquer et Marie-Claude Maurel (dir.)
2018
Deux frontières aux destins croisés ?
Étude interdisciplinaire et comparative des délimitations territoriales entre la France et la Suisse, entre la Bourgogne et la Franche-Comté (xive-xxie siècle)
Benjamin Castets Fontaine, Maxime Kaci, Jérôme Loiseau et al. (dir.)
2019
Un mousquetaire du journalisme : Alexandre Dumas
Sarah Mombert et Corinne Saminadayar-Perrin (dir.)
2019
Libertaire ! Essais sur l’écriture, la pensée et la vie de Joseph Déjacque (1821-1865)
Thomas Bouchet et Patrick Samzun (dir.)
2019
Les encyclopédismes en France à l'ère des révolutions (1789-1850)
Vincent Bourdeau, Jean-Luc Chappey et Julien Vincent (dir.)
2020
Le patrimoine industriel au prisme de nouveaux défis
Usages économiques et enjeux environnementaux
Marina Gasnier
2018
La petite entreprise au péril de la famille ?
L’exemple de l’Arc jurassien franco-suisse
Laurent Amiotte-Suchet, Yvan Droz et Fenneke Reysoo
2017
Une imagination républicaine, François-Vincent Raspail (1794-1878)
Jonathan Barbier et Ludovic Frobert (dir.)
2017
