jbofihe-0.38/ 40755 765 764 0 7350750751 12016 5ustar richardruserjbofihe-0.38/COPYING100644 765 764 43106 7350750734 13173 0ustar richardruser GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. jbofihe-0.38/Makefile.dos100644 765 764 4073 7350750734 14344 0ustar richardruser# $Header: /cvs/src/jbofihe/Makefile.dos,v 1.9 2001/07/31 20:46:01 richard Exp $ # # Makefile for parser/glosser using DJGPP on DOS # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # # CC=gcc CFLAGS= -O2 OBJS2 = main.o lex1.o lex2.o cmavotab.o rpc_tab.o functions.o \ categ.o nonterm.o tree.o translate.o latex.o \ properties.o conversion.o terms.o memory.o tenses.o \ output.o textout.o htmlout.o connect.o stag.o latexblk.o \ relative.o textblk.o errorscan.o canonluj.o lujvofns.o \ erasure.o rpc_full.o morf.o morf_dfa.o bccheck.o \ tracebk.o elide.o dictaccs.o SRCS2 = $(OBJS2:%.o=%.c) CM_OBJS = cm_gather.o cm_output.o cm_main.o cm_translate.o cm_scan.o CM_SRCS = $(CM_OBJS:%.o=%.c) all : progs jbofihe : $(OBJS2) $(CC) $(CFLAGS) -o jbofihe $(OBJS2) progs : jbofihe cmafihe jvocuhadju smujajgau vlatai %.o : %.c $(CC) $(CFLAGS) -c $< %.s : %.c $(CC) $(CFLAGS) -S $< smujajgau : smujajgau.o canonluj.o $(CC) $(CFLAGS) -o smujajgau smujajgau.o canonluj.o smujajgau.o : smujajgau.c $(CC) $(CFLAGS) -c smujajgau.c cmafihe : $(CM_OBJS) $(CC) $(CFLAGS) -o cmafihe $(CM_OBJS) vlatai.o : morf.c morf.h morf_enc.c morf_lex.c morfvlex.c $(CC) $(CFLAGS) -c -o vlatai.o -DTEST_MORF morf.c vlatai : vlatai.o morf_dfa.o bccheck.o canonluj.o $(CC) -o vlatai -DTEST_MORF $(CFLAGS) vlatai.o morf_dfa.o bccheck.o canonluj.o jvocuhadju : jvocuhadju.o lujvofns.o jvocuhadju.o : jvocuhadju.c version.h smujajgau.o : smujajgau.c version.h jbofihe-0.38/Makefile.in100644 765 764 22634 7350750734 14210 0ustar richardruser# $Header: /cvs/src/jbofihe/Makefile.in,v 1.60 2001/08/03 20:39:54 richard Exp $ # # Makefile for parser/glosser # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # # PREFIX=@@PREFIX@@ EXEDIR=$(PREFIX)/bin LIBDIR=$(PREFIX)/lib/jbofihe DICTNAME=smujmaji.dat DICTIONARY=$(LIBDIR)/$(DICTNAME) MANDIR=$(PREFIX)/man/man1 CMAFIHE_LDOPTS=@@CMAFIHE_LDOPTS@@ CC=gcc CFLAGS= @@OPTDEBUG@@ @@DEFINES@@ -DDEFAULT_DICTIONARY=\"$(DICTIONARY)\" OBJS2 = main.o lex1.o lex2.o cmavotab.o rpc_tab.o functions.o \ categ.o nonterm.o tree.o translate.o latex.o \ properties.o conversion.o terms.o memory.o tenses.o \ output.o textout.o htmlout.o connect.o stag.o latexblk.o \ relative.o textblk.o errorscan.o canonluj.o lujvofns.o \ erasure.o rpc_full.o morf.o morf_dfa.o bccheck.o \ tracebk.o elide.o dictaccs.o SRCS2 = $(OBJS2:%.o=%.c) CM_OBJS = cm_gather.o cm_output.o cm_main.o cm_translate.o cm_scan.o CM_SRCS = $(CM_OBJS:%.o=%.c) progs : jbofihe cmafihe jvocuhadju smujajgau vlatai all : dictionary progs jbofihe : $(OBJS2) $(CC) $(CFLAGS) -o jbofihe $(OBJS2) # Analyse shift/reduce conflicts in the grammar conflict : perl terminator.pl < rpc2x.y > rpc2x_noet.y bison -v rpc2x_noet.y %.o : %.c $(CC) $(CFLAGS) -c $< %.s : %.c $(CC) $(CFLAGS) -S $< rpc2x_nc.y : rpc2x.y uncom ./uncom < rpc2x.y > rpc2x_nc.y rpc2x_act.y nonterm.h nonterm.c : rpc2x_nc.y perl ./action.perl < rpc2x_nc.y > rpc2x_act.y rpc2x_act.tab.c rpc2x_act.output rpc_tab.h : rpc2x_act.y bison -v -d rpc2x_act.y mv rpc2x_act.tab.h rpc_tab.h rpc_tab.c : rpc2x_act.tab.c perl add_trace_to_tabc.pl < rpc2x_act.tab.c > rpc_tab.c # Create grammar that will only recognize text with all elidable cmavo present rpc2x_full_nc.y : rpc2x.y terminator.pl uncom perl terminator.pl < rpc2x.y | ./uncom > rpc2x_full_nc.y rpc2x_full_act.y : rpc2x_full_nc.y perl ./action.perl -nononterm < rpc2x_full_nc.y > rpc2x_full_act.y rpc_full.c rpc2x_full_act.output : rpc2x_full_act.y bison -v -p full_yy rpc2x_full_act.y sed -e "s/full_yylex/yylex/;s/full_yydebug/yydebug/;s/full_yyerror/yyerror/;s/full_yylval/yylval/;" < rpc2x_full_act.tab.c | perl add_trace_to_tabc.pl > rpc_full.c tracebk.o : tracebk.c trctabs.c trcftabs.c trctabs.c : output2table.pl rpc2x_act.output perl output2table.pl norm < rpc2x_act.output > trctabs.c trcftabs.c : output2table.pl rpc2x_full_act.output perl output2table.pl full < rpc2x_full_act.output > trcftabs.c elitabs.c : output2elide.pl rpc2x_act.output perl output2elide.pl < rpc2x_act.output > elitabs.c elide.o : elide.c elitabs.c dictaccs.o : dictaccs.c @@DICTDATA_C@@ dictdata.c: gismu_cmavo.dict cat gismu_cmavo.dict places.dat extradict patterns | perl dict2inc.pl > dictdata.c stag.c : stag.tab.c sed -e 's/YYSTYPE/STAG_YYSTYPE/g;' < stag.tab.c > stag.c stag.h : stag.tab.h sed -e 's/YYSTYPE/STAG_YYSTYPE/g;' < stag.tab.h > stag.h stag.tab.c stag.tab.h : stag.y bison -v -d -p stag_ stag.y uncom : uncom.o $(CC) -o uncom uncom.o uncom.o : uncom.c $(CC) -O2 -c uncom.c uncom.c : uncom.l flex -t uncom.l > uncom.c translate.o : translate.c $(CC) $(CFLAGS) -c translate.c smujajgau : smujajgau.o canonluj.o $(CC) $(CFLAGS) -o smujajgau smujajgau.o canonluj.o smujajgau.o : smujajgau.c $(CC) $(CFLAGS) -c smujajgau.c vlatai.o : morf.c morf.h morf_enc.c morf_lex.c morfvlex.c $(CC) $(CFLAGS) -c -o vlatai.o -DTEST_MORF morf.c vlatai : vlatai.o morf_dfa.o bccheck.o canonluj.o $(CC) -o vlatai -DTEST_MORF $(CFLAGS) vlatai.o morf_dfa.o bccheck.o canonluj.o morf_lex.c : mk_fetab.pl perl mk_fetab.pl > morf_lex.c 2>morf_lex.err morfvlex.c : mk_vfetab.pl perl mk_vfetab.pl > morfvlex.c morf_enc.c : mk_enctab.pl perl mk_enctab.pl > morf_enc.c 2>morf_enc.err morf_dfa.c : morf_nfa.in dfasyn/dfasyn dfasyn/dfasyn -v -r morf_dfa.report morf_nfa.in -o morf_dfa.c bctest : bccheck.c bctables.c $(CC) $(CFLAGS) -o bctest -DTEST=1 bccheck.c bccheck.o : bccheck.c bctables.c bctables.c : bctables.in dfasyn/dfasyn dfasyn/dfasyn -v -r bctables.report < bctables.in > bctables.c dfasyn/dfasyn: (cd dfasyn && make all) morf.o : morf.c morf.h morf_dfa.c morf_enc.c morf_lex.c morfvlex.c txtman: jbofihe.txt cmafihe.txt smujajgau.txt jvocuhadju.txt vlatai.txt %.txt:%.1 groff -Tascii -man $< | perl -pe 'chomp; s/.\x8//g; $$_ .= "\r\n";' > $@ gismu_cmavo.dict: mkdict.pl perl mkdict.pl > gismu_cmavo.dict dictionary : smujajgau gismu_cmavo.dict rm -f $(DICTNAME) ./smujajgau $(DICTNAME) gismu_cmavo.dict if [ -r lujvo-list ]; then \ perl lujvod.pl < ./lujvo-list > lujvo.dict ;\ ./smujajgau $(DICTNAME) lujvo.dict ;\ fi if [ -r NORALUJV.txt ]; then \ perl noralujv.pl > noralujv.dict ;\ ./smujajgau $(DICTNAME) noralujv.dict ;\ fi ./smujajgau $(DICTNAME) extradict places.dat patterns dictupdate : $(DICTNAME) $(DICTNAME) : extradict places.dat patterns ./smujajgau $(DICTNAME) extradict places.dat patterns cmafihe : $(CM_OBJS) $(CC) $(CFLAGS) $(CMAFIHE_LDOPTS) -o cmafihe $(CM_OBJS) cm_scan.c : cm_scan.l flex -t cm_scan.l > cm_scan.c jvocuhadju : jvocuhadju.o lujvofns.o $(CC) $(CFLAGS) -o jvocuhadju jvocuhadju.o lujvofns.o jvocuhadju.o : jvocuhadju.c version.h test_ivl : lujvofns.c $(CC) $(CFLAGS) -o test_ivl -DTEST_IS_VALID_LUJVO lujvofns.c smujajgau.o : smujajgau.c version.h canonluj.o : canonluj.inc canonluj.inc: perl canonluj.pl < reduced_gismu > canonluj.inc clean: -(cd dfasyn && make clean) -rm *.output *.tab.c *_tab.c rpc_full.c *.o \ jbofihe cmafihe smujajgau vlatai jvocuhadju \ *.dict uncom.c uncom.o uncom \ morf_lex.c morfvlex.c morf_enc.c morf*_dfa.c \ elitabs.c trcftabs.c trctabs.c \ stag.c stag.h stag.tab.c stag.tab.h \ rpc2x_nc.y rpc2x_act.y rpc2x_full_nc.y rpc2x_full_act.y \ canonluj.inc version.h \ nonterm.c nonterm.h morf_dfa.report morf_lex.err # Specify in this perverse way so that the $-Name construction doesn't get replaced on checkout! version.h : version.txt sed -e 's/[$$]Name: \(.*\) [$$]/\1/;' < version.txt > version.h depend: gcc -MM $(SRCS2) $(CM_SRCS) > .depend install : jbofihe smujajgau cmafihe jvocuhadju $(DICTNAME) [ -d $(EXEDIR) ] || mkdir -p $(EXEDIR) [ -d $(LIBDIR) ] || mkdir -p $(LIBDIR) [ -d $(MANDIR) ] || mkdir -p $(MANDIR) for e in jbofihe cmafihe smujajgau jvocuhadju vlatai ; do cp $$e $(EXEDIR) ; chmod 755 $(EXEDIR)/$$e ; strip -s $(EXEDIR)/$$e ; done if [ -r $(DICTNAME) ]; then for d in $(DICTNAME) ; do cp $$d $(LIBDIR) ; chmod 644 $(LIBDIR)/$$d ; done ; fi for m in jbofihe.1 cmafihe.1 smujajgau.1 jvocuhadju.1 vlatai.1 ; do cp $$m $(MANDIR) ; chmod 755 $(MANDIR)/$$m ; done ## Include the dependency info below. main.o: main.c nodes.h nonterm.h functions.h output.h version.h lex1.o: lex1.c cmavotab.h nodes.h nonterm.h functions.h output.h \ lujvofns.h morf.h lex2.o: lex2.c functions.h nonterm.h nodes.h output.h cmavotab.h \ rpc_tab.h elide.h cmavotab.o: cmavotab.c cmavotab.h rpc_tab.h rpc_tab.o: rpc_tab.c nodes.h nonterm.h functions.h output.h functions.o: functions.c functions.h nonterm.h nodes.h output.h \ rpc_tab.h categ.o: categ.c nodes.h nonterm.h rpc_tab.h functions.h output.h \ stag.h nonterm.o: nonterm.c tree.o: tree.c nonterm.h functions.h nodes.h output.h cmavotab.h \ rpc_tab.h translate.o: translate.c functions.h nonterm.h nodes.h output.h \ canonluj.h latex.o: latex.c functions.h nonterm.h nodes.h output.h latex.h properties.o: properties.c nodes.h nonterm.h functions.h output.h conversion.o: conversion.c nodes.h nonterm.h functions.h output.h \ rpc_tab.h cmavotab.h terms.o: terms.c functions.h nonterm.h nodes.h output.h rpc_tab.h \ cmavotab.h memory.o: memory.c functions.h nonterm.h nodes.h output.h tenses.o: tenses.c rpc_tab.h nonterm.h functions.h nodes.h output.h output.o: output.c nodes.h nonterm.h functions.h output.h cmavotab.h \ rpc_tab.h textout.o: textout.c functions.h nonterm.h nodes.h output.h htmlout.o: htmlout.c functions.h nonterm.h nodes.h output.h connect.o: connect.c nodes.h nonterm.h functions.h output.h rpc_tab.h \ cmavotab.h stag.o: stag.c latexblk.o: latexblk.c functions.h nonterm.h nodes.h output.h latex.h relative.o: relative.c nodes.h nonterm.h rpc_tab.h functions.h \ output.h cmavotab.h textblk.o: textblk.c functions.h nonterm.h nodes.h output.h errorscan.o: errorscan.c functions.h nonterm.h nodes.h output.h canonluj.o: canonluj.c canonluj.h canonluj.inc lujvofns.o: lujvofns.c lujvofns.h erasure.o: erasure.c nodes.h nonterm.h rpc_tab.h functions.h output.h rpc_full.o: rpc_full.c nodes.h nonterm.h functions.h output.h morf.o: morf.c morf.h morf_lex.c morfvlex.c morf_dfa.c \ morf_enc.c tracebk.o: tracebk.c trctabs.c trcftabs.c elide.o: elide.c nodes.h nonterm.h rpc_tab.h cmavotab.h functions.h \ output.h elide.h elitabs.c cm_gather.o: cm_gather.c cm.h cm_output.o: cm_output.c cm.h cm_main.o: cm_main.c cm.h version.h cm_translate.o: cm_translate.c cm.h cm_scan.o: cm_scan.c cm.h jbofihe-0.38/NEWS100644 765 764 24710 7350750734 12637 0ustar richardruserNew in version 0.38 =================== jbofihe/vlatai -------------- - revisions to the handling of commas and vowel groupings in the word category + validity algorithm. New in version 0.37 =================== general ======= - Include contributed Emacs Lisp functions for driving jbofi'e. - Add fold markers in some of the source code for editing with VIM version 6 jbofihe ======= - Improve translations of vowels & other words followed by "bu". (Only a partial list is included in the extradict file.) - Fix crashes which occurred when tagging term places when the selbri was "jai" followed by something other than a brivla. - Add entries for mu'e, pu'u, za'i, zu'o to the 'patterns' file for use in glossing unknown lujvo. - Integrate recognition of cultural rafsi in lujvo into the ordinary state machine (so now 1 integrated state machine instead of 2 separate ones). Consequent reduction in table sizes. - Recognize stage-3-like fu'ivla with >1 short rafsi before the hyphen and gloss accordingly if the word isn't in the dictionary 'as-is'. - New more robust checking for bad cmene (containing la, doi etc) - Fix bug : missing 'break' statements causing fall-through and hence bogus access on another branch of a union. - Deprecate -g command option from man page. - Fix glossing of the words for 10**X (the asterisks were treated as meta-characters by the glosser) - Add support for experimental cmavo "xa'o" (selma'o ZAhO, opposite of "za'o") vlatai ====== - For stage 3 fu'ivla, show forward slashes to split the rafsi prefix from the hyphen and the hyphen from the word tail. - Recognize an extension to stage 3 fu'ivla, with >1 rafsi before the hyphen - Cultural rafsi scanning improvement as for jbofihe. Remove -cr command line argument. - Only show exit value of state machine in verbose (-v) mode. - Detect and show bad cmene forms (la/lai/doi break-up) - New option '-el' to show a lujvo broken into its component words. - Fixed some more obscure faults with words containing patterns like "nytc" and "ntyc". cmafihe ======= - Include contribution from Björn Gohla to output GNUStep property lists for the vocabulary found in the input. jvocuhadju ========== - Complete rewrite of the lujvo form checker used to detect tosmabru failures. The old one was completely broken. - Added the script testing/jvocipra.pl, which couples jvocuhadju and vlatai in a back-to-back configuration for mutual testing. - Add '-l' switch to try long rafsi even if a short one is available. - Add '-a' switch to show all possible lujvo forms, not just the 8 most preferred ones. lexer generator (dfasyn/*) =============== - Add handling of 'state attributes' (to allow actions to be run when automaton is in DFA states corresponding to particular NFA states) - Fix bug in NFA compressor, where algorithm could run off the end of an array. - Fix bug in DFA compressor (was functionally correct but over-pessimistic about combining states) - Improve command line options - Add %{ ... %} text inclusion facility - Allow exit and attribute table element types to be defined by input grammar - Add 'early exit' capability for DFA states that will immediately exit (=> reduced table sizes + more state merging) - Provide next_state functions in the output file. - Renamed "dfasyn" with a view to it being made a project in its own right. New in version 0.36 =================== - Fixed Makefile portability problems discovered in v0.35 - Fix bug where cmavo sequences like nytysy were not recognized (where removing y leaves invalid triple) - Fix bug where the words y, yyyyy, y'y were not recognized as valid cmavo - Fix bug for -se option applied to nu'u in the middle of a termset. - Fix bug for -se option applied to elidables with a sequence of 'free' constructs following them. - Fix bugs for -se option applied to boi & ve'o - Fix several bugs people sent me where jbofihe crashed or generated bad output for various small examples. - Fix bugs scanning cmene containing ..nydz.., ..y,y.. etc - Many improvements to lexical analyser builder (n2d subdirectory) - * generate smaller tables by relying on binary searching in the target app. * compress state machines by grouping equivalent DFA states together input * input file can specify priority logic to resolve ambiguous accepting states * syntax capabilities of input file greatly enhanced * processing speed much improved (This tool can now be considered a standalone project in its own right, except for the lack of documentation on it.) - Fix bugs in scanner's fu'ivla recognition (including length of consonant clusters). - Recognise stage 3 and stage 4 fu'ivla separately to improve glossing performance. - Allow consonant+comma+vowel triples within words. - Include configure option --embed to allow a minimal dictionary to be embedded into the jbofihe executable (=> no separate dictionary file required at runtime) - Add handling of zei (completely missing before) - Add configure option --embed, to allow the gismu+cmavo dictionary to be compiled directly into the jbofihe executable. (No run-time dictionary is then needed, however there is no capability to add new definitions in this mode) - Simplify consonant doubling before -er and -ing suffices in the translator. - Added configure script, to help people who just want to 'build+go' without reading the docs. - Switch to GNU General Public License (replaces customised zlib/BSD-like license) - Detect zoi/la'o constructions left open at the end of the text. New in version 0.35 =================== (Changes apply to jbofihe unless stated otherwise) - Add support to show elidable cmavo that were omitted from the input text (-ie command switch). (Cmavo inserted this way are displayed in upper case in the output). - Add option to require that the input text does not have any cmavo elided (-re command switch). (This may be useful as a learning aid and when trying to debug grammar failures.) - Add option to report any elidable cmavo which are superfluous in the text, accessed with the -se comand switch. Where a sequence of such words can be partially omitted, all possible 'minimal' sub-sequences are shown. A verbose option (-sev) gives extra visibility of how the algorithm makes its decisions about valid minimal sequences. - Totally rewritten algorithm for determining type (cmavo, brivla, cmene etc) of input words. Should now enforce word structure rules 100%, and be competely robust at removing cmavo prefixed onto the front of gismu, lujvo and fu'ivla. The testbench for this part of the program is bundled as a separate tool (vlatai). Acceptance of cultural rafsi (section 4.16 of the Reference Grammar) is optional (-cr switch). - Add backtracing mode for showing the parser stack when a syntax error occurs (-bt option). May assist in debugging syntactically invalid texts. - Changed approach to building the glossing dictionary for jbofihe and cmafihe. The gismu and cmavo information is now bundled with the source. The 2 lujvo files are also used if they are found in the current directory at build time. This avoids the user having to download extra files to get a minimal working installation. - Add case tagging for selbri involving MOI, GOhA, NUhA - Fix bugs parsing number/lerfu-string containing bu followed by moi/mei/roi/re'u - Fix printing of 'bu' construction on token list following a parse error. - Fix output translation if a 'bu' construction occurs in a number/lerfu sequence before MOI. - Attempt output translation of zo, zoi, bu etc. constructions. - Fix inability to parse pe'a. - Fix inability to parse fu'e. - Default output width (-w argument) for text output changed to 79 instead of 80. - Fix core dump illustrated by a text containing a single cmavo which causes a parse error. - Return status from main() to the shell reflects whether there was a parse error or not. - Show misparsed token as well as previously parsed ones after a parse error is found. - Fix line numbering across comments and when token follows whitespace or comment. - Cope with multiple BAhE cmavo before a word (previously only the closest one was shown in outputs) - Implement erasure processing described in the Refgram. (for 'su' as described in grammar.300 file) - Deal properly with cmene which violate the rule about la/lai/doi appearing internally. - Port to MSDOS environment (using DJGPP toolchain); binary release for MSDOS. - Allow whether to use fread or mmap to access dictionary to be specified at configure time. - Open certain files in binary mode instead of text (support DJGPP port) - Change name of default dictionary (support DJGPP port) - Make banners for 'jbofihe -k' option go to stdout not stderr (so they now flow amongst the token list) - Given an advisory message when a core dump would previously have happened. - Update various details in manual pages - Allow carriage return characters at ends of lines (cmafihe) - Further fixes to translation of pre-hyphen part of type 3 fu'ivla - Fixes to translation of time_offset when specific entries lacking from dictionary. - Support the cmavo va'e (mentioned in reference grammar yet not in word lists) - Allow directory containing word lists to be specified to configure script, rather than having to be searched for. - Fix bug in jvocuhadju where the 4 forbidden triples starting with 'n' weren't being detected. - Various minor bug fixes. New in version 0.34 =================== - Add support + translations for the cmavo that were missing from the original cmavo list - Fix bugs in handling certain cmavo when followed by an indicator (e.g. mi se cai zdile) - Fix bugs in cases when constructions involving lu, bu, lo'u...le'u, zo, zoi etc are nested. New in version 0.33 =================== - Support for the 'term ::= tag termset' rule discussed on the Egroups list around the start of June 2000. - Fix bug splitting cmavo from front of brivla - Fix bug translating fu'ivla when the 'Lojbanic' part before the hyphen can't be translated. New in version 0.32a ==================== - Fix major bugs in the lexical analysis for cmafi'e (brivla mis-scanned as sequences of cmavo joined together.) New in version 0.32 =================== - Add capability to jbofi'e to parse texts where cmavo have been prefixed onto the following brivla. - Fix bug with pei not being handled properly. New in version 0.31 =================== - Add pattern matching scheme to jbofi'e translater, which recognizes and provides default translations for standard lujvo forms, e.g. -mau, -gau, nun- etc. jbofihe-0.38/README100644 765 764 13357 7350750734 13025 0ustar richardruser################################################################################ $Header: /cvs/src/jbofihe/README,v 1.10 2001/03/04 23:01:18 richard Exp $ ################################################################################ First : The author can be reached at : rpc@myself.com Second : My web-page for jbofihe is http://www.rrbcurnow.freeuk.com/jbofihe or http://go.to/jbofihe My page for Lojban-related things generally is : http://www.rrbcurnow.freeuk.com/lojban ================ WHAT IS JBOFIHE? ================ jbofihe is a command-line driven program with the following functions : - checking grammatical correctness of Lojban text - displaying successfully analysed text with nesting of grammatical constructs shown (either inline or as a tree) - displaying approximate word-for-word English translations of the Lojban words, with some limited 'part-of-speech' adjustment of the English forms. - showing which sumti fill each of the places of each selbri Bundled with jbofihe are 4 other programs : - cmafihe is a cut-down jbofihe which has no grammar checking (so it's particularly useful for getting an initial word look-up on badly formed texts) - smujajgau builds the pre-sorted binary format Lojban->English word database that jbofihe and cmafihe use - jvocuhadju determines the optimal lujvo for a given tanru input to it as command line arguments. - vlatai analyses a Lojban word for syntactic correctness, determines the type of word (gismu, cmene, lujvo, fu'ivla etc), and reports whether there are any cmavo prefixed to it. (It is the really the testbench for part of jbofihe, but it is sufficiently useful that it is bundled as a program in its own right.) ========= COMPILING ========= The build sequence looks like this (assuming you want to install under /usr/local) perl config.pl --prefix=/usr/local make all make install The config.pl script takes these additional (optional) arguments : --debug to compile with debug instead of optimisation --installprog= to specify an alternative installation program. --nommap to use fread() rather than mmap() to access the dictionary (use this on non-Posix systems) --embded to build a minimal (gismu+cmavo) dictionary into the executable (rather than requiring a dictionary database separately at runtime) There are some pre-requisites for compiling. You need the following tools/libraries installed to have a hope of building the software : - bison (yacc probably OK, edit the makefile) - flex (lex probably OK, ditto) - an ANSI C compiler (gcc recommended) - perl - make (GNU make recommended) It should be possible to compile and run the software on Unix and on Win32 systems (cygwin). For reference, the software was developed on Linux on a 486/120 with 32Mb of RAM. As of version 0.35, I have ported the software to MS-DOS, using the DJGCC compiler. The DOS version should run in Windows DOS boxes too. It requires some form of DPMI server; one is bundled for use on bare MS-DOS systems. The following tools are recommended but not essential to support some of the output formats: - LaTeX (to format the highest quality outputs from the s/w) - a web browser (to display the intermediate quality output) As from version 0.35, minimal word-lists (gismu and cmavo) are bundled with the source. You can download lujvo lists separately from ftp://xiron.pc.helsinki.fi/pub/lojban/wordlists. If either (or both) of the files lujvo-list and/or NORALUJV.txt is found at build time, it/they will be included into the glossing dictionary that jbofihe and cmafihe use. Otherwise, only gismu & cmavo will be included. (Any lujvo will then be glossed by breaking it into individual rafsi and glossing those.) The file sizes in bytes of the versions I'm using are as follows 808959 NORALUJV.txt 292281 lujvo-list and their md5 checksums are d750de398740a2ba701422a466ddbeab NORALUJV.txt dbd82f42f4156a2a1801e2a5ec1e551e lujvo-list ======= RUNNING ======= If your compiled dictionary is not in the default location (i.e. you are not installing properly or want to use a private local dictionary), set the JBOFIHE_DICTIONARY environment variable to where you have installed smujmaji.dat The command line is documented in the manual pages. Some brief examples follow : Suppose your Lojban text is in the file sample.txt, containing mi klama le zarci jbofihe -x -b sample.txt gives : [ ( mi ) << klama >> ( le [ ( I, me ) [is, does] << go-ing >> ( the [ ( klama1 (go-er(s)) ) << >> ( klama2 (destination(s)) 1 2 2 3 3 4 zarci ) ] trading place(s) ) ] ) ] 4 1 jbofihe -k sample.txt gives : Token list before preprocessing CMV : mi [me] BRV : klama CMV : le [the described] BRV : zarci ------------------------------ Token list after preprocessing CMV : mi [me] BRV : klama CMV : le [the described] BRV : zarci (0[mi {klama }])0 jbofihe -t sample.txt gives : | +-CMAVO : mi | | +-BRIVLA : klama | | | +-CMAVO : le | | | +-BRIVLA : zarci | | +-SUMTI_6 | +-BRIDI_TAIL_3 +-NO_CU_SENTENCE CHUNKS cmafihe sample.txt gives : mi [I, me] klama [come] le [the] zarci [market] cmafihe -b sample.txt gives : mi klama le zarci KOhA3 BRIVLA LE BRIVLA I, me come the market 'jvocuhadju gerku zdani' gives : Possible rafsi for input words : ger ge'u zda -------------------- Score Lujvo -------------------- 5878 gerzda 6367 ge'uzda jbofihe-0.38/README.DOS100644 765 764 11126 7350750734 13441 0ustar richardruser################################################################################ $Header: /cvs/src/jbofihe/README.DOS,v 1.4 2001/01/13 23:08:09 richard Exp $ ################################################################################ First : The author can be reached at : rpc@myself.com Second : My web-page for jbofihe is http://www.rrbcurnow.freeuk.com/jbofihe or http://go.to/jbofihe My page for Lojban-related things generally is : http://www.rrbcurnow.freeuk.com/lojban ================ WHAT IS JBOFIHE? ================ jbofihe is a command-line driven program with the following functions : - checking grammatical correctness of Lojban text - displaying successfully analysed text with nesting of grammatical constructs shown (either inline or as a tree) - displaying approximate word-for-word English translations of the Lojban words, with some limited 'part-of-speech' adjustment of the English forms. - showing which sumti fill each of the places of each selbri Bundled with jbofihe are 4 other programs : - cmafihe is a cut-down jbofihe which has no grammar checking (so it's particularly useful for getting an initial word look-up on badly formed texts) - smujajgau builds the pre-sorted binary format Lojban->English word database that jbofihe and cmafihe use - jvocuhadju determines the optimal lujvo for a given tanru input to it as command line arguments. - vlatai analyses a Lojban word for syntactic correctness, determines the type of word (gismu, cmene, lujvo, fu'ivla etc), and reports whether there are any cmavo prefixed to it. (It is the really the testbench for part of jbofihe, but it is sufficiently useful that it is bundled as a program in its own right.) Each of the tools is documented more fully in its companion .txt file. ======================================= WHAT IS IN THE DOS BINARY DISTRIBUTION? ======================================= This distribution contains a pre-compiled set of binaries for the jbofihe suite. The tools have been compiled using DJGCC (http://www.delorie.com/djgpp/). They are intended to run either under MSDOS or in a Windows DOS box. Under plain MSDOS, they need access to DPMI services. The bundled cwsdpmi.exe supplies these if it is found on the path. No source code is included; if you want that, you need to visit my web-site (http://go.to/jbofihe) and find the jbofihe-v.vv.tar.gz file. My compilation flow relies on running all the perl, flex and bison stages under Linux (see doskit.fe in the source kit), copying all the *.c and *.h files to my DOS partition, rebooting into DOS, and compiling/linking the executables. If you have perl, flex and bison available in the DOS environment, you may be able to perform the whole build there after appropriate editing of the makefile. ======= RUNNING ======= If your compiled dictionary is not in the default location (i.e. you are not installing properly or want to use a private local dictionary), set the JBOFIHE_DICTIONARY environment variable to where you have installed smujmaji.dat The command line is documented in the manual pages. Some brief examples follow : Suppose your Lojban text is in the file sample.txt, containing mi klama le zarci jbofihe -x -b sample.txt gives : [ ( mi ) << klama >> ( le [ ( I, me ) [is, does] << go-ing >> ( the [ ( klama1 (go-er(s)) ) << >> ( klama2 (destination(s)) 1 2 2 3 3 4 zarci ) ] trading place(s) ) ] ) ] 4 1 jbofihe -k sample.txt gives : Token list before preprocessing CMV : mi [me] BRV : klama CMV : le [the described] BRV : zarci ------------------------------ Token list after preprocessing CMV : mi [me] BRV : klama CMV : le [the described] BRV : zarci (0[mi {klama }])0 jbofihe -t sample.txt gives : | +-CMAVO : mi | | +-BRIVLA : klama | | | +-CMAVO : le | | | +-BRIVLA : zarci | | +-SUMTI_6 | +-BRIDI_TAIL_3 +-NO_CU_SENTENCE CHUNKS cmafihe sample.txt gives : mi [I, me] klama [come] le [the] zarci [market] cmafihe -b sample.txt gives : mi klama le zarci KOhA3 BRIVLA LE BRIVLA I, me come the market 'jvocuhadju gerku zdani' gives : Possible rafsi for input words : ger ge'u zda -------------------- Score Lujvo -------------------- 5878 gerzda 6367 ge'uzda jbofihe-0.38/README.PLIST100644 765 764 2344 7350750734 13671 0ustar richardruserBjörn Gohla 01.08.2001 When configuring $ perl ./config.pl --plist enables property list output in cmafihe, the lojban glosser. Thus $ cmafihe -p will output the property list to the standard output. Property lists are stringified representations of data structures like hash tables, arrays, or binary data very well integrated in gnustep (http://www.gnustep.org). the library libPropList (which can be retrieved from http://www.windowmaker.org) is a C API for those data structures. I have implemented and tested this only on my Linux box, so I have no idea whether it works on any other platform. The motivation for this feature is that I am working on a vocabulary learning tool (soon to be released) which is written in gnustep. I want to be able to take arbitrary Lojban text and extract all valid Lojban words, such that having leared the extracted vocabulary one is able to understand the text. So I may someday be able to follow Lojban discussions on lojban@yahoogroups.com ;) . For the sake of authenticity here comes a little preview: $ echo "mi na jimpe la'e di'u " |./cmafihe -p yields: { mi = "I, me"; na = not; jimpe = understand; "la'e" = "the referent of"; "di'u" = "last utterance"; } jbofihe-0.38/action.perl100644 765 764 12767 7350750735 14313 0ustar richardruser# $Header: /cvs/src/jbofihe/action.perl,v 1.6 2001/05/09 22:06:55 richard Exp $ # # Perl script to read through the bison grammar for lojban and insert # simple actions, typically to build a nonterminal node. # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # # $do_nonterm = 1; while ($_ = shift @ARGV) { if (/-nononterm/) { $do_nonterm = 0; } } while (<>) { print; if (/^\%\%/) { last; } } %nonterms=(); $max_nchildren = 0; $first = 1; @flags=(); @eli=(); %eli_codes = ( BEhO => 137, BOI => 157, CU => 266, DOhU => 362, FEhU => 432, GEhU => 530, KEI => 717, KEhE => 723, KU => 756, KUhE => 765, KUhO => 767, LIhU => 838, LOhO => 851, LUhU => 866, MEhU => 922, NUhU => 1062, SEhU => 1314, TEhU => 1412, TOI => 1431, TUhU => 1454, VAU => 1489, VEhO => 1509 ); while (<>) { s=/\* ET ([A-Zh]+) \*/=?$1=g; if (/^[ \t]*([a-z0-9A-Z_]+)[ \t]*:(.*)$/) { if ($first) { # Special processing assumes the outermost rule has 1 child and appears # first in the file. This rule is to match the complete input. print; print sprintf("{ top = \$1; }\n"); $first = 0; } else { $nonterm=$1; $nonterm =~ y/a-z/A-Z/; $nonterms{$nonterm} = 1; $childs = $2; @children = split(/[ \t]+/,$childs); $nchildren = $#children; if ($nchildren < 0) { $nchildren = 0; } $n_live_children = 0; for ($i=1; $i<=$nchildren; $i++) { if ($children[$i] =~ /START_EK|START_GIHEK|START_GUHEK|START_JEK|START_JOIK|START_GEK|START_BAI|EK_KE|EK_BO|JEK_KE|JEK_BO|JOIK_KE|JOIK_BO|I_JEKJOIK|I_BO|GIHEK_KE|GIHEK_BO|NAhE_BO|NAhE_time|NAhE_space|NAhE_CAhA|NA_KU|NUMBER_MAI|NUMBER_MOI|NUMBER_ROI|EOF_MARK/) { $flags[$i] = 0; } else { $flags[$i] = 1; $n_live_children++; } } if ($n_live_children > $max_nchildren) { $max_nchildren = $n_live_children; } print; print sprintf("{\$\$ = new_node_%d(%s", $n_live_children, $nonterm); for ($i = 1; $i<=$nchildren; $i++) { if ($flags[$i]) { print sprintf(",\$%d", $i); } } print ");}\n"; } # IF there are rules with 'error' in them, 2 things are assumed : # 1. they are not the first rule for a particular non-terminal # 2. they have their own action pre-supplied in the source file. # so we ignore them. # If /* ET XXX */ occurs anywhere, XXX is an elidable terminator } elsif (/^[ \t]*\|(.*)$/ && !/ error / && !/ error$/) { $childs = $1; @children = split(/[ \t]+/,$childs); $nchildren = $#children; if ($nchildren < 0) { $nchildren = 0; } $n_live_children = 0; for ($i=1; $i<=$nchildren; $i++) { if ($children[$i] =~ /START_EK|START_GIHEK|START_GUHEK|START_JEK|START_JOIK|START_GEK|START_BAI|EK_KE|EK_BO|JEK_KE|JEK_BO|JOIK_KE|JOIK_BO|I_JEKJOIK|I_BO|GIHEK_KE|GIHEK_BO|NAhE_BO|NAhE_time|NAhE_space|NAhE_CAhA|NA_KU|NUMBER_MAI|NUMBER_MOI|NUMBER_ROI|EOF_MARK/) { $flags[$i] = 0; } elsif ($children[$i] =~ m{\?([A-Zh]+)}) { $flags[$i] = 2; $eli[$i] = $1; $n_live_children++; } else { $flags[$i] = 1; $n_live_children++; } } if ($n_live_children > $max_nchildren) { $max_nchildren = $n_live_children; } s/\?[A-Zh]+//g; print; print sprintf("{\$\$ = new_node_%d(%s", $n_live_children, $nonterm); for ($i = 1, $j = 1; $i<=$nchildren; $i++) { if ($flags[$i] == 1) { print sprintf(",\$%d", $j++); } elsif ($flags[$i] == 2) { print sprintf(",new_elidable(%d,%s)", $eli_codes{$eli[$i]}, $eli[$i]); } elsif ($flags[$i] == 0) { $j++; # skip markers } } print ");}\n"; } else { print; } } $nonterms{"AUGMENTED"} = 1; @nt = sort keys(%nonterms); unless ($do_nonterm) { exit 0; } open(NT, ">nonterm.h"); print NT "#ifndef NONTERM_H\n#define NONTERM_H\n\n/* max childen = $max_nchildren */\n\nextern char *nonterm_names[];\n\ntypedef enum {\n"; $first=1; for $nt (@nt) { if (!$first) { print NT ",\n "; } else { print NT " "; } $first=0; print NT $nt; } print NT "\n} NonTerm;\n\n#endif\n"; close (NT); open(NTC, ">nonterm.c"); print NTC "char *nonterm_names[] = {\n"; $first = 1; for $nt (@nt) { if (!$first) { print NTC ",\n "; } else { print NTC " "; } $first=0; print NTC "\"".$nt."\""; } print NTC "};\n"; close (NTC); jbofihe-0.38/add_trace_to_tabc.pl100644 765 764 4013 7350750735 16051 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/add_trace_to_tabc.pl,v 1.3 2001/01/11 21:49:52 richard Exp $ # Script to take the x.tab.c output from Bison, and insert extra function calls # into it to support the following : # - detection of possible elidable terminators # - backtracing on syntax errors # Hopefully, this changes things that are not *too* specific to particular # versions of bison. It was originally developed against output from bison # version 1.27. # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # print <) { # Force type of yytranslate, otherwise we won't have a fixed type to # declare it as in the elide code. s/static const char yytranslate/static const short yytranslate/o; if (m{/\* Shift the lookahead}o) { print; print "elide_trace_shift(yystate,yychar);\n"; print "report_trace_shift(yychar);\n"; } elsif (m{^\s*yyreduce\:}o) { print; print "elide_trace_reduce(yystate, yyn);\n"; print "report_trace_reduce(yystate, yyn);\n"; } elsif (m{^\s*yyerrlab\:}o) { print; print "report_trace_error(yyss, yyssp);"; } else { print; } } jbofihe-0.38/bccheck.c100644 765 764 11615 7350750735 13667 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/bccheck.c,v 1.2 2001/07/24 21:22:23 richard Exp $ State machine to check for bad cmene. ***************************************/ /* Copyright (C) Richard P. Curnow 2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #if defined(TEST) #include #endif #include "bccheck.h" enum tokens {/*{{{*/ TA, TE, TI, TO, TU, TY, TD, TL, TOC, TAP, TCM, TXX }; /*}}}*/ enum result {/*{{{*/ BC_NOT_COMPLETE, BC_CMENE_OK, BC_CMENE_BAD_SPLIT, BC_CMENE_BAD_NOSPLIT }; /*}}}*/ enum attribute {/*{{{*/ ATTR_NONE, ATTR_SEEN_LD }; /*}}}*/ /* Include tables defining DFA */ #include "bctables.c" static unsigned char mapchar[256] =/*{{{*/ /* Map ASCII set to the tokens. */ { TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TAP , TXX , TXX , TXX , TXX , TCM , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TA , TOC , TOC , TD , TE , TOC , TOC , TOC , TI , TOC , TOC , TL , TOC , TOC , TO , TOC , TOC , TOC , TOC , TOC , TU , TOC , TOC , TOC , TY , TOC , TXX , TXX , TXX , TXX , TXX , TXX , TA , TOC , TOC , TD , TE , TOC , TOC , TOC , TI , TOC , TOC , TL , TOC , TOC , TO , TOC , TOC , TOC , TOC , TOC , TU , TOC , TOC , TOC , TY , TOC , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX , TXX }; /*}}}*/ int is_bad_cmene(char *word, int *split, char **ladoi, char **tail)/*{{{*/ { char *p; char *ladoi_1; int cs = 0, ns; enum result res; for (p=word; *p; p++) { ns = bad_cmene_next_state(cs, mapchar[(unsigned int) *p & 0xff]); res = bad_cmene_exitval[ns]; /* Deal with early exit conditions */ if (res == BC_CMENE_BAD_NOSPLIT || res == BC_CMENE_BAD_SPLIT) { if (ladoi) *ladoi = ladoi_1; if (tail) *tail = p; break; } /* By doing this here, we protect against problem words like "salad", where the position of "d" would need to be remembered in case it starts "doi", but that would overwrite th stored position of "l" */ if (bad_cmene_attribute[ns] == ATTR_SEEN_LD) ladoi_1 = p; cs = ns; } res = bad_cmene_exitval[ns]; if (split) *split = 0; switch (res) { case BC_CMENE_OK: return 0; case BC_CMENE_BAD_SPLIT: if (split) *split = 1; return 1; case BC_CMENE_BAD_NOSPLIT: case BC_NOT_COMPLETE: return 1; } return 0; /* make compiler happy */ }/*}}}*/ #if defined(TEST) static void do_check(char *s)/*{{{*/ { int res; char *ladoi, *tail; int split; char *p; res = is_bad_cmene(s, &split, &ladoi, &tail); printf("%s : %s", s, res ? "BAD" : "good"); if (res) { if (split) { printf(" : "); for (p=s; *p; p++) { if (p == ladoi) putchar('+'); if (p == tail) putchar('+'); putchar(*p); } } } printf("\n"); return; } /*}}}*/ int main (int argc, char **argv)/*{{{*/ { do_check("laplas"); do_check("stalaplas"); do_check("stala'iplas"); do_check("stala,iplas"); do_check("stala'ip,las"); do_check("laplus"); do_check("alaun"); do_check("ritcrd"); do_check("ritc,r,d"); do_check("mecylakorunas"); do_check("mecylaukorunas"); do_check("mecyla'ikorunas"); do_check("mecyla,ikorunas"); do_check("mecyda,ikorunas"); return 0; }/*}}}*/ #endif /* defined(TEST) */ jbofihe-0.38/bccheck.h100644 765 764 2446 7350750735 13656 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/bccheck.h,v 1.1 2001/06/18 22:13:14 richard Exp $ Header file for bad cmene checking function ***************************************/ /* Copyright (C) Richard P. Curnow 2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #ifndef BCCHECK_H #define BCCHECK_H /* Return 1 if a proposed cmene in 'word' is bad. 'split' is 1 if the word * breaks up (as opposed to just being bad but not breaking). 'ladoi' gives * the position of the la/la'i/doi, and 'tail' gives the position of the * remainder of the word. */ extern int is_bad_cmene(char *word, int *split, char **ladoi, char **tail); #endif /* BCCHECK_H */ jbofihe-0.38/bctables.in100644 765 764 2447 7350750735 14233 0ustar richardruserTokens A E I O U Y D L OCONS APOS COMMA # OCONS = consonant other than D or L Prefix bad_cmene Abbrev VOWEL = A|E|I|O|U Abbrev CONS = D|L|OCONS Abbrev ANY = VOWEL|Y|CONS|APOS|COMMA Block LA_DOI # Detect LA/LAI/DOI State in L -> l D -> d State l (ATTR_SEEN_LD) A ; APOS|COMMA|CONS -> blocked A ; I ; APOS|COMMA|CONS -> blocked State d (ATTR_SEEN_LD) O ; I ; APOS|COMMA|CONS -> blocked State blocked EndBlock Block MAIN split : LA_DOI nosplit : LA_DOI State split.blocked = TAG_SPLIT State nosplit.blocked = TAG_NOSPLIT State v VOWEL|Y -> v APOS|COMMA -> a CONS -> c -> split.in State a VOWEL|Y -> v State c CONS -> c COMMA ; CONS -> c Y -> y VOWEL -> v = TAG_OK State y APOS -> a COMMA ; VOWEL|Y -> v CONS -> c -> nosplit.in State in CONS -> c Y -> y VOWEL -> v -> split.in EndBlock EarlyResult TAG_SPLIT -> BC_CMENE_BAD_SPLIT EarlyResult TAG_NOSPLIT -> BC_CMENE_BAD_NOSPLIT Result TAG_OK & ~(TAG_SPLIT | TAG_NOSPLIT) -> BC_CMENE_OK DefResult BC_NOT_COMPLETE Attr Result ATTR_SEEN_LD Attr DefResult ATTR_NONE Type "enum result" Attr Type "enum attribute" jbofihe-0.38/canonluj.c100644 765 764 17307 7350750735 14122 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/canonluj.c,v 1.2 2001/01/08 21:58:33 richard Exp $ Translation functions. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include #include "canonluj.h" /* ================================================== */ typedef struct { char *rafsi; char *gismu; /* or cmavo */ } R2G; static R2G r2g[] = { #include "canonluj.inc" }; #define Number(x) ((sizeof(x))/sizeof(x[0])) /* ================================================== */ static int is_consonant(char c) { return (strchr("bcdfgjklmnprstvxz", c) != 0); } static int IC(char c) { return is_consonant(c); } /* ================================================== */ static int is_vowel(char c) { return (strchr("aeiou", c) != 0); } static int IV(char c) { return is_vowel(c); } /* ================================================== */ static int contains_compound_consonant(char *x) { char *p, *q, *s; if (strlen(x) < 2) { return 0; } p = x; do { q = p + 1; s = q + 1; if (is_consonant(*p)) { if (is_consonant(*q)) return 1; if ((*q == 'y') && (is_consonant(*s))) return 1; } p++; } while (*p); return 0; } /*++++++++++++++++++++++++++++++++++++++ Comparison function for bsearch on the rafsi->gismu list. static int compare_r2g ++++++++++++++++++++++++++++++++++++++*/ static int compare_r2g(const void *a, const void *b) { const R2G *aa = (const R2G *) a; const R2G *bb = (const R2G *) b; return strcmp(aa->rafsi, bb->rafsi); } /*++++++++++++++++++++++++++++++++++++++ Look up a single rafsi and return the corresponding gismu/cmavo. static char * do_component char *x ++++++++++++++++++++++++++++++++++++++*/ static char * lookup_component(char *x) { R2G specimen; R2G *match; specimen.rafsi = x; match = (R2G *) bsearch(&specimen, r2g, Number(r2g), sizeof(R2G), compare_r2g); if (!match) { return "?"; } else { return match->gismu; } } /* ================================================== */ static void strip_leading_rafsi(char **y, int len, int hy, int first, char *result) { char buf[5], *comp; char *x = *y; int i; for (i=0; i %s\n", line, result ? result : "?"); } } #endif /* ================================================== */ /* ================================================== */ /* ================================================== */ /* ================================================== */ jbofihe-0.38/canonluj.h100644 765 764 2270 7350750735 14100 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/canonluj.h,v 1.1 2000/04/27 22:59:58 richard Exp $ Header file for lujvo canonicalisation function. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef CANONLUJ_H #define CANONLUJ_H /*+ To stop multiple inclusions. +*/ extern char *canon_lujvo (char *x); #endif /* CANONLUJ_H */ jbofihe-0.38/canonluj.pl100644 765 764 2400 7350750735 14257 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/canonluj.pl,v 1.3 2000/10/13 21:55:28 richard Exp $ # # Create insert for canonluj.c with the rafsi in the gismu table. # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # %rafsi = (); while () { chomp; $gismu = substr($_,0,5); $gismu =~ s/ +$//; $rafsi = substr($_,6,12); $rafsi =~ s/ +/ /g; $rafsi =~ s/^ //; $rafsi =~ s/ $//; foreach (split / /,$rafsi) { $rafsi{$_} = $gismu; } if (length $gismu == 5) { $rafsi{substr($gismu,0,4)} = $gismu; } } for my $r (sort keys %rafsi) { print "{ \"".$r."\", \"".$rafsi{$r}."\"},\n"; } jbofihe-0.38/categ.c100644 765 764 102634 7350750735 13412 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/categ.c,v 1.13 2001/05/09 22:06:55 richard Exp $ Look for particular constructions in the token sequence and insert markers before them. This provides the workaround to the lojban grammar not being purely LR(1). e.g. when you see "gi'e", you have to know whether a "bo" follows later, maybe after a , to be able to decide whether to shift or reduce. A mini-parser that recognizes is invoked from in here. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include "nodes.h" #include "rpc_tab.h" #include "functions.h" #include "stag.h" /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o JA and back up to where the 'jek' non-terminal will start. Insert a PRIVATE_START_JEK token there. ++++++++++++++++++++++++++++++*/ static void categorize_jek(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == JA) { /* Backup over any SE and NA preceding and insert PRIVATE_START_JEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } if (y->type == N_CMAVO && y->data.cmavo.selmao == NA) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_JEK; marker->data.marker.text = new_string("PRIVATE_START_JEK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o GIhA and back up to where the 'gihek' non-terminal will start. Insert a PRIVATE_START_GIHEK token there. ++++++++++++++++++++++++++++++*/ static void categorize_gihek(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == GIhA) { /* Backup over any SE and NA preceding and insert PRIVATE_START_GIHEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } if (y->type == N_CMAVO && y->data.cmavo.selmao == NA) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_GIHEK; marker->data.marker.text = new_string("PRIVATE_START_GIHEK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o A and back up to where the 'ek' non-terminal will start. Insert a PRIVATE_START_EK token there. ++++++++++++++++++++++++++++++*/ static void categorize_ek(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == A) { /* Backup over any SE and NA preceding and insert PRIVATE_START_EK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } if (y->type == N_CMAVO && y->data.cmavo.selmao == NA) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_EK; marker->data.marker.text = new_string("PRIVATE_START_EK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o GUhA and back up to where the 'guhek' non-terminal will start. Insert a PRIVATE_START_GUHEK token there. ++++++++++++++++++++++++++++++*/ static void categorize_guhek(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == GUhA) { /* Backup over any SE preceding and insert PRIVATE_START_GUHEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_GUHEK; marker->data.marker.text = new_string("PRIVATE_START_GUHEK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o JOIK or BIhI and back up to where the 'joik' non-terminal will start. Insert a PRIVATE_START_JOIK token there. ++++++++++++++++++++++++++++++*/ static void categorize_joik(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == JOI) { /* Backup over any SE preceding and insert PRIVATE_START_GUHEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_JOIK; marker->data.marker.text = new_string("PRIVATE_START_JOIK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } else if (x->type == N_CMAVO && x->data.cmavo.selmao == BIhI) { /* Backup over any SE preceding and insert PRIVATE_START_GUHEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } if (y->type == N_CMAVO && y->data.cmavo.selmao == GAhO) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_JOIK; marker->data.marker.text = new_string("PRIVATE_START_JOIK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for cmavo of selma'o GI and GA and try to insert a PRIVATE_START_GEK at the right place... ++++++++++++++++++++++++++++++*/ static void categorize_gek(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == GA) { /* Backup over any SE preceding and insert PRIVATE_START_GEK */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_GEK; marker->data.marker.text = new_string("PRIVATE_START_GEK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } else if (x->type == N_CMAVO && x->data.cmavo.selmao == GI) { /* Try to back-up over 'joik' */ int state; enum Tokens {T_OTHER=0, T_GAhO=1, T_NAI=2, T_JOI=3, T_BIhI=4, T_SE=5, T_PRIVATE_START_JOIK=6} tok; static const int states[7][11] = {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, { 5, -1, -1, -1, -1, -1, -1, -1, 6, 6, 6}, { 1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1}, { 2, 2, -1, -1, -1, 8, -1, 8, -1, -1, -1}, { 3, 3, -1, -1, -1, 9, -1, 9, -1, -1, -1}, {-1, -1, 4, 4, -1, -1, -1, -1, 10, 10, -1}, {-1, -1, -2, -2, -2, -1, -2, -1, -1, -1, -1}}; state = 0; y = x->prev; do { if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case GAhO: tok = T_GAhO; break; case NAI: tok = T_NAI; break; case BIhI: tok = T_BIhI; break; case JOI: tok = T_JOI; break; case SE: tok = T_SE; break; default: tok = T_OTHER; break; } } else if (y->type == N_MARKER) { if (y->data.marker.tok == PRIVATE_START_JOIK) { tok = T_PRIVATE_START_JOIK; } else { tok = T_OTHER; } } else { tok = T_OTHER; } #if 0 printf("state=%d, token=%d\n", state, tok); #endif state = states[tok][state]; #if 0 printf("new state=%d\n", state); #endif y = y->prev; if (state == -1) { y = NULL; break; } if (state == -2) { break; } } while (1); if (y != NULL) { marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_GEK; marker->data.marker.text = new_string("PRIVATE_START_GEK"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o BAI and back up to where the 'stag' non-terminal will start. Insert a PRIVATE_START_BAI token there. ++++++++++++++++++++++++++++++*/ static void categorize_bai(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == BAI) { /* Backup over any SE and NAhE preceding and insert PRIVATE_START_BAI */ y = x->prev; if (y->type == N_CMAVO && y->data.cmavo.selmao == SE) { y = y->prev; } if (y->type == N_CMAVO && y->data.cmavo.selmao == NAhE) { y = y->prev; } /* Need to insert new token after y */ marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_START_BAI; marker->data.marker.text = new_string("PRIVATE_START_BAI"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } /*++++++++++++++++++++++++++++++ Look for any cmavo of selma'o NAhE and see whether one of a set of things follows it. Insert marker before it appropriately. ++++++++++++++++++++++++++++++*/ static void categorize_nahe(TreeNode *head) { TreeNode *x, *y, *marker; enum {NEED_BO, NEED_TIME, NEED_SPACE, NEED_CAhA, NEED_NONE} result; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == NAhE) { y = x->next; if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case BO: result = NEED_BO; break; case ZI: case PU: case ZEhA: case TAhE: case ZAhO: result = NEED_TIME; break; case VA: case FAhA: case VEhA: case VIhA: case FEhE: case MOhI: result = NEED_SPACE; break; case CAhA: result = NEED_CAhA; break; default: result = NEED_NONE; break; } } else if (y->type == N_MARKER) { if (y->data.marker.tok == PRIVATE_NUMBER_ROI) { result = NEED_TIME; } else { result = NEED_NONE; } } else { result = NEED_NONE; } if (result != NEED_NONE) { marker = new_node(); marker->start_line = x->start_line; marker->start_column = x->start_column; marker->type = N_MARKER; switch (result) { case NEED_BO: marker->data.marker.tok = PRIVATE_NAhE_BO; marker->data.marker.text = new_string("PRIVATE_NAhE_BO"); break; case NEED_TIME: marker->data.marker.tok = PRIVATE_NAhE_time; marker->data.marker.text = new_string("PRIVATE_NAhE_time"); break; case NEED_SPACE: marker->data.marker.tok = PRIVATE_NAhE_space; marker->data.marker.text = new_string("PRIVATE_NAhE_space"); break; case NEED_CAhA: marker->data.marker.tok = PRIVATE_NAhE_CAhA; marker->data.marker.text = new_string("PRIVATE_NAhE_CAhA"); break; case NEED_NONE: /* If prevents us getting here, but we put the branch in to shut the compiler up */ break; } marker->next = x; marker->prev = x->prev; x->prev->next = marker; x->prev = marker; } } } } typedef enum { FOUND_BO, FOUND_KE, FOUND_OTHER } BOKE_Lookahead; static TreeNode *stag_marker; static int stag_scan_complete; static BOKE_Lookahead boke_look; static int send_first_token; static int first_token; extern int stag_parse(void); /*++++++++++++++++++++++++++++++++++++++ Error printing function for stag parser char *s ++++++++++++++++++++++++++++++++++++++*/ void stag_error(char *s) { #if 0 fprintf(stderr, "%s\n", s); /* We're not interested in seeing errors from this, we expect there to be many of them */ #endif } /*++++++++++++++++++++++++++++++++++++++ This is the 'yylex' function for the stag recognizer int staglex ++++++++++++++++++++++++++++++++++++++*/ int stag_lex(void) { int result; if (stag_scan_complete) { return 0; } if (send_first_token) { send_first_token = 0; return first_token; } /* No checking yet for whether we get to the end of the token list. */ while (stag_marker->type == N_MARKER) { stag_marker = stag_marker->next; } switch (stag_marker->type) { case N_CMAVO: switch (stag_marker->data.cmavo.selmao) { case BO: result = STAG_BO; break; case KE: result = STAG_KE; break; case BAI: result = STAG_BAI; break; case BIhI: result = STAG_BIhI; break; case BU: result = STAG_BU; break; case BY: result = STAG_BY; break; case CAhA: result = STAG_CAhA; break; case CUhE: result = STAG_CUhE; break; case FAhA: result = STAG_FAhA; break; case FEhE: result = STAG_FEhE; break; case FOI: result = STAG_FOI; break; case GAhO: result = STAG_GAhO; break; case JA: result = STAG_JA; break; case JOI: result = STAG_JOI; break; case LAU: result = STAG_LAU; break; case KI: result = STAG_KI; break; case MOhI: result = STAG_MOhI; break; case NA: result = STAG_NA; break; case NAhE: result = STAG_NAhE; break; case NAI: result = STAG_NAI; break; case PA: result = STAG_PA; break; case PU: result = STAG_PU; break; case ROI: result = STAG_ROI; break; case SE: result = STAG_SE; break; case TAhE: result = STAG_TAhE; break; case TEI: result = STAG_TEI; break; case VA: result = STAG_VA; break; case VEhA: result = STAG_VEhA; break; case VIhA: result = STAG_VIhA; break; case ZAhO: result = STAG_ZAhO; break; case ZEhA: result = STAG_ZEhA; break; case ZI: result = STAG_ZI; break; default: result = STAG_OTHER; break; } break; default: /* BRIVLA, CMENE etc */ result = STAG_OTHER; break; } stag_marker = stag_marker->next; return result; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ void stag_lookahead_bo (void) { boke_look = FOUND_BO; stag_scan_complete = 1; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ void stag_lookahead_ke (void) { boke_look = FOUND_KE; stag_scan_complete = 1; } /*++++++++++++++++++++++++++++++++++++++ static BOKE_Lookahead stag_scan TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static BOKE_Lookahead stag_scan (TreeNode *x, int scan_type) { stag_marker = x; stag_scan_complete = 0; send_first_token = 1; first_token = scan_type; if (stag_parse()) { return FOUND_OTHER; } else { return boke_look; } } /*++++++++++++++++++++++++++++++ This function looks ahead across any intervening stag, to see whether there is a BO or KE following before the next construct. ++++++++++++++++++++++++++++++*/ static BOKE_Lookahead lookahead(TreeNode *start, int scan_type) { return stag_scan(start, scan_type); } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_I_BO ++++++++++++++++++++++++++++++*/ static void categorize_ibo(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == I) { y = x->next; switch (lookahead(y, JJ_STAG)) { case FOUND_BO: marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_I_BO; marker->data.marker.text = new_string("PRIVATE_I_BO"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; break; case FOUND_KE: /* Fall through - in this case we're not interested in whether KE follows */ case FOUND_OTHER: break; } } } } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_I_BO ++++++++++++++++++++++++++++++*/ static void categorize_ijekjoik(TreeNode *head) { TreeNode *x, *marker; for (x = head->next; x!=head; x=x->next) { if ((x->type == N_CMAVO) && (x->data.cmavo.selmao == I)) { if ((x->prev->type == N_MARKER) && (x->prev->data.marker.tok == PRIVATE_I_BO)) { /* Nothing to do */ } else { if ((x->next->type == N_MARKER) && ((x->next->data.marker.tok == PRIVATE_START_JEK) || (x->next->data.marker.tok == PRIVATE_START_JOIK))) { marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_I_JEKJOIK; marker->data.marker.text = new_string("PRIVATE_I_JEKJOIK"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; } } } } } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_JEK_BO and PRIVATE_JEK_KE ++++++++++++++++++++++++++++++*/ static void categorize_jek_kebo(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_MARKER && x->data.marker.tok == PRIVATE_START_JEK) { if (x->prev->type == N_CMAVO && x->prev->data.cmavo.selmao == I) { /* Don't do anything , it's I je or I joik etc and inserting PRIVATE_JEK_KE tokens will screw up parsing of I construct */ } else { y = x->next; while (y->type != N_CMAVO || y->data.cmavo.selmao != JA) { y = y->next; } y = y->next; if (y->type == N_CMAVO && y->data.cmavo.selmao == NAI) { y = y->next; } switch (lookahead(y, JUST_STAG)) { case FOUND_BO: marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_JEK_BO; marker->data.marker.text = new_string("PRIVATE_JEK_BO"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; break; case FOUND_KE: marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_JEK_KE; marker->data.marker.text = new_string("PRIVATE_JEK_KE"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; break; case FOUND_OTHER: break; } } } } } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_EK_BO and PRIVATE_EK_KE ++++++++++++++++++++++++++++++*/ static void categorize_ek_kebo(TreeNode *head) { TreeNode *x, *y, *z, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == A) { y = x->next; if (y->type == N_CMAVO && y->data.cmavo.selmao == NAI) { y = y->next; } z = x->prev; while (z->type != N_MARKER || z->data.marker.tok != PRIVATE_START_EK) { z = z->prev; } switch (lookahead(y, JUST_STAG)) { case FOUND_BO: marker = new_node(); marker->type = N_MARKER; marker->start_line = z->start_line; marker->start_column = z->start_column; marker->data.marker.tok = PRIVATE_EK_BO; marker->data.marker.text = new_string("PRIVATE_EK_BO"); /* Insert before z */ marker->prev = z->prev; marker->next = z; z->prev->next = marker; z->prev = marker; break; case FOUND_KE: marker = new_node(); marker->type = N_MARKER; marker->start_line = z->start_line; marker->start_column = z->start_column; marker->data.marker.tok = PRIVATE_EK_KE; marker->data.marker.text = new_string("PRIVATE_EK_KE"); /* Insert before z */ marker->prev = z->prev; marker->next = z; z->prev->next = marker; z->prev = marker; break; case FOUND_OTHER: break; } } } } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_JOIK_BO and PRIVATE_JOIK_KE ++++++++++++++++++++++++++++++*/ static void categorize_joik_kebo(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_MARKER && x->data.marker.tok == PRIVATE_START_JOIK) { if (x->prev->type == N_CMAVO && x->prev->data.cmavo.selmao == I) { /* Don't do anything - this will screw up the parsing of the I construct */ } else { y = x->next; switch (lookahead(y, JOIK_STAG)) { case FOUND_BO: marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_JOIK_BO; marker->data.marker.text = new_string("PRIVATE_JOIK_BO"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; break; case FOUND_KE: marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_JOIK_KE; marker->data.marker.text = new_string("PRIVATE_JOIK_KE"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; break; case FOUND_OTHER: break; } } } } } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_GIHEK_BO and PRIVATE_GIHEK_KE ++++++++++++++++++++++++++++++*/ static void categorize_gihek_kebo(TreeNode *head) { TreeNode *x, *y, *z, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == GIhA) { y = x->next; if (y->type == N_CMAVO && y->data.cmavo.selmao == NAI) { y = y->next; } z = x->prev; while (z->type != N_MARKER || z->data.marker.tok != PRIVATE_START_GIHEK) { z = z->prev; } switch (lookahead(y, JUST_STAG)) { case FOUND_BO: marker = new_node(); marker->type = N_MARKER; marker->start_line = z->start_line; marker->start_column = z->start_column; marker->data.marker.tok = PRIVATE_GIHEK_BO; marker->data.marker.text = new_string("PRIVATE_GIHEK_BO"); /* Insert before z */ marker->prev = z->prev; marker->next = z; z->prev->next = marker; z->prev = marker; break; case FOUND_KE: marker = new_node(); marker->type = N_MARKER; marker->start_line = z->start_line; marker->start_column = z->start_column; marker->data.marker.tok = PRIVATE_GIHEK_KE; marker->data.marker.text = new_string("PRIVATE_GIHEK_KE"); /* Insert before z */ marker->prev = z->prev; marker->next = z; z->prev->next = marker; z->prev = marker; break; case FOUND_OTHER: break; } } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ void categorize_number_mai(TreeNode *head) { TreeNode *x, *y, *marker; int count; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == MAI) { y = x->prev; count = 0; while (1) { if (y == head) { goto done; } else if (y->type == N_MARKER) { y = y->prev; } else if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case PA: case BU: case BY: case LAU: case TEI: case FOI: count++; y = y->prev; break; default: goto done; } } else if (y->type == N_BU) { count++; y = y->prev; } else { goto done; } } done: if (count > 0) { marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_NUMBER_MAI; marker->data.marker.text = new_string("PRIVATE_NUMBER_MAI"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } } /*++++++++++++++++++++++++++++++ Find each ROI with at least one lerfu_word or PA before it. Backtrack over the sequence of such tokens and insert PRIVATE_NUMBER_ROI at the start. ++++++++++++++++++++++++++++++*/ void categorize_number_roi(TreeNode *head) { TreeNode *x, *y, *marker; int count; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == ROI) { y = x->prev; count = 0; while (1) { if (y == head) goto done; if (y->type == N_MARKER) { y = y->prev; } else if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case PA: case BU: case BY: case LAU: case TEI: case FOI: count++; y = y->prev; break; default: goto done; } } else if (y->type == N_BU) { count++; y = y->prev; } else { goto done; } } done: if (count > 0) { marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_NUMBER_ROI; marker->data.marker.text = new_string("PRIVATE_NUMBER_ROI"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } } /*++++++++++++++++++++++++++++++ Find each instance of MOI which has at least one lerfu_word or PA token before it. Backtrack over the sequence of such tokens and insert PRIVATE_NUMBER_MOI at the start. ++++++++++++++++++++++++++++++*/ void categorize_number_moi(TreeNode *head) { TreeNode *x, *y, *marker; int count; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == MOI) { y = x->prev; count = 0; while (1) { if (y == head) goto done; if (y->type == N_MARKER) { y = y->prev; } else if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case PA: case BU: case BY: case LAU: case TEI: case FOI: count++; y = y->prev; break; default: goto done; } } else if (y->type == N_BU) { count++; y = y->prev; } else { goto done; } } done: if (count > 0) { marker = new_node(); marker->type = N_MARKER; marker->start_line = y->start_line; marker->start_column = y->start_column; marker->data.marker.tok = PRIVATE_NUMBER_MOI; marker->data.marker.text = new_string("PRIVATE_NUMBER_MOI"); marker->prev = y; marker->next = y->next; y->next->prev = marker; y->next = marker; } } } } /*++++++++++++++++++++++++++++++++++++++ Mark each cmavo with a flag indicating whether it is followed by one of the cmavo that starts a 'free' grammar item. ++++++++++++++++++++++++++++++++++++++*/ static void mark_cmavo_before_free(TreeNode *head) { TreeNode *x, *y; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO) { y = x->next; if (y->type == N_CMAVO) { switch (y->data.cmavo.selmao) { case SEI: case SOI: case COI: case DOI: case PRIVATE_NUMBER_MAI: case TO: case XI: x->data.cmavo.followed_by_free = 1; break; default: x->data.cmavo.followed_by_free = 0; break; } } else { x->data.cmavo.followed_by_free = 0; } } } return; } /*++++++++++++++++++++++++++++++ Deal with inserting PRIVATE_NA_KU ++++++++++++++++++++++++++++++*/ static void categorize_naku(TreeNode *head) { TreeNode *x, *y, *marker; for (x = head->next; x!=head; x=x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == NA) { y = x->next; if (y->type == N_CMAVO && y->data.cmavo.selmao == KU) { marker = new_node(); marker->type = N_MARKER; marker->start_line = x->start_line; marker->start_column = x->start_column; marker->data.marker.tok = PRIVATE_NA_KU; marker->data.marker.text = new_string("PRIVATE_NA_KU"); /* Insert before x */ marker->prev = x->prev; marker->next = x; x->prev->next = marker; x->prev = marker; } } } } /*++++++++++++++++++++++++++++++++++++++ This function looks at particular types of token and makes them more specific depending on what comes further on in the token stream. ++++++++++++++++++++++++++++++++++++++*/ void categorize_tokens(TreeNode *head) { categorize_jek(head); categorize_gihek(head); categorize_ek(head); categorize_guhek(head); categorize_joik(head); categorize_gek(head); categorize_ibo(head); categorize_ijekjoik(head); categorize_jek_kebo(head); categorize_ek_kebo(head); categorize_joik_kebo(head); categorize_gihek_kebo(head); categorize_number_mai(head); categorize_number_roi(head); categorize_number_moi(head); categorize_bai(head); categorize_nahe(head); categorize_naku(head); mark_cmavo_before_free(head); } jbofihe-0.38/cm.h100644 765 764 4525 7350750735 12673 0ustar richardruser/*************************************** $Id: cm.h,v 1.3 2001/07/31 21:11:17 richard Exp $ Header file for all local fns etc. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef MTRAN_H #define MTRAN_H /*+ To stop multiple inclusions. +*/ #include #include #include #include #ifdef PLIST #include #endif #define new_string(s) strcpy((char *) malloc(1+strlen(s)), (s)) #define extend_string(s, x) strcat((char *) realloc(s, 1+strlen(s)+strlen(x)), x) #define new(T) (T *) malloc(sizeof(T)) #define new_array(T, n) (T *) malloc(sizeof(T) * (n)) /* ================================================== */ typedef enum { OF_LATEX, OF_TEXT, OF_TEXTBLK #ifdef PLIST ,OF_PLIST #endif } OutputFormat; /*+ Flag indicating whether to generate latex blocked output instead of text. +*/ extern OutputFormat ofmt; /*+ Line width to use +*/ extern int width; /* ================================================== */ void gather_cmavo (const char *x); void gather_brivla (const char *x); void gather_cmene (const char *x); void gather_whitespace(void); void gather_newline(void); void gather_fallthru(const char *x); void gather_paren(const char *x); void do_trans(void); void do_output(void); char * translate(char *word); char * translate_unknown(char *w); void output(const char *lojban, const char *trans, const char *selmao); void output_newline(void); void output_paren(const char *text); void start_output(void); void end_output(void); #endif /* MTRAN_H */ jbofihe-0.38/cm_gather.c100644 765 764 14237 7350750735 14241 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cm_gather.c,v 1.3 2000/05/01 21:08:39 richard Exp $ Functions for gathering text into a list and preprocessing the list. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include "cm.h" /* ================================================== */ typedef enum { TT_CMAVO, TT_BRIVLA, TT_CMENE, TT_NEWLINE, TT_PAREN } toktype; typedef struct node { struct node *next; struct node *prev; toktype type; char *lojban; char *selmao; char *trans; } node; /* ================================================== */ static node head = {&head, &head}; /* ================================================== */ static void add_node(toktype type, const char *text) { node *nn = new(node); nn->type = type; nn->lojban = new_string(text); nn->prev = head.prev; nn->next = &head; head.prev->next = nn; head.prev = nn; } /* ================================================== */ void gather_cmavo (const char *x) { add_node(TT_CMAVO, x); } /* ================================================== */ void gather_brivla (const char *x) { add_node(TT_BRIVLA, x); } /* ================================================== */ void gather_cmene (const char *x) { add_node(TT_CMENE, x); } /* ================================================== */ void gather_newline(void) { add_node(TT_NEWLINE, ""); } /* ================================================== */ void gather_fallthru(const char *x) { fprintf(stderr, "This fell through [%s]\n", x); } /* ================================================== */ void gather_paren(const char *x) { add_node(TT_PAREN, x); } /* ================================================== */ #if 0 static void try_cmavo_fragment(node *p) { char buf_in[32]; char buf[2048]; char buf_out[256]; char *q, *r, *t; buf[0] = 0; q = p->lojban; if (*q == '.') q++; while (*q) { r = buf_in; do { *r++ = *q++; } while (*q && strchr("aeiou'", *q)); *r = 0; t = translate(buf_in); if (t) { strcat(buf, t); strcat(buf, " "); } else { strcat(buf, "? "); } } p->trans = new_string(buf); } #endif /* ================================================== */ static char * translate_selmao(char *x) { char buffer[64]; strcpy(buffer, "+"); strcat(buffer, x); return translate(buffer); } /* ================================================== */ static void try_cmavo_fragment(char *lojban, char **transbuf, char* (*transfn)(char *)) { char buf[256], buf2[256]; char *pbuf; char *t, *e; char bufout[1024]; int len; bufout[0] = 0; strcpy(buf, lojban); pbuf = buf; if (*pbuf == '.') { pbuf++; } #if DIAG fprintf(stderr, "Start with %s\n", pbuf); #endif while (*pbuf) { e = pbuf; while (*e) e++; while (e > pbuf) { len = e - pbuf; #if DIAG fprintf(stderr, "Length = %d\n", len); #endif strncpy(buf2, pbuf, len); buf2[len] = 0; t = (*transfn)(buf2); if (t) { #if DIAG fprintf(stderr, "Got trans %s for %s\n", t, buf2); #endif if (bufout[0]) { strcat(bufout, " "); } strcat(bufout, t); pbuf += len; #if DIAG fprintf(stderr, "Now looking at %s\n", pbuf); #endif goto next_outer; } else { #if DIAG fprintf(stderr,"Failed to get a translation for %s\n", buf2); #endif do { e--; } while (strchr("aeiuo'", *e)); } } if (bufout[0]) { strcat(bufout, " "); } strcat(bufout, "?"); do { pbuf++; } while (*pbuf && strchr("aeiou'", *pbuf)); if (*pbuf == '.') ++pbuf; next_outer: ; } (*transbuf) = new_string(bufout); } /* ================================================== */ void do_trans(void) { node *p; char *t, *x; char buf[32]; for (p=head.next; p!=&head; p=p->next) { switch (p->type) { case TT_CMAVO: x = p->lojban; if (*x == '.') x++; t = translate(x); if (t) { p->trans = new_string(t); strcpy(buf, "+"); strcat(buf, x); t = translate(buf); if (t) { p->selmao = new_string(t); } else { p->selmao = new_string(""); } } else { try_cmavo_fragment(p->lojban, &p->trans, translate); try_cmavo_fragment(p->lojban, &p->selmao, translate_selmao); } break; case TT_BRIVLA: t = translate(p->lojban); if (t) { p->trans = new_string(t); } else { t = translate_unknown(p->lojban); if (t) { p->trans = new_string(t); } else { p->trans = new_string("?"); } } break; default: p->trans = new_string(""); } } } /* ================================================== */ void do_output(void) { node *p; for (p=head.next; p!=&head; p=p->next) { if (p->type == TT_NEWLINE) { output_newline(); } else if (p->type == TT_PAREN) { output_paren(p->lojban); } else if (p->type == TT_CMAVO) { output(p->lojban, p->trans, p->selmao); } else if (p->type == TT_BRIVLA) { output(p->lojban, p->trans, "BRIVLA"); } else if (p->type == TT_CMENE) { output(p->lojban, p->trans, "CMENE"); } } } /* ================================================== */ jbofihe-0.38/cm_main.c100644 765 764 5063 7350750735 13670 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cm_main.c,v 1.7 2001/07/31 21:18:11 richard Exp $ Main routine for mini-translater ***************************************/ /* Copyright 1998-2001 Richard P. Curnow */ /* Help options added by Björn Gohla */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #include "cm.h" #include "version.h" extern FILE *yyin; extern int yylex(void); int yywrap(void) { return 1; } int main (int argc, char **argv) { char *filename = NULL; FILE *in = NULL; ofmt = OF_TEXT; width = 80; while (++argv,--argc) { if (!strcmp(*argv, "-l")) { ofmt = OF_LATEX; } else if (!strcmp(*argv, "-b")) { ofmt = OF_TEXTBLK; #ifdef PLIST } else if (!strcmp(*argv, "-p")) { ofmt = OF_PLIST; #endif } else if (!strcmp(*argv, "-w")) { ++argv, --argc; width = atoi(*argv); } else if (!strcmp(*argv, "-v")) { fprintf(stderr, "cmafihe version %s\n", version_string); exit(0); } else if ( !strcmp(*argv, "-h") || !strcmp(*argv, "--help") ) { fprintf(stderr, "cmafihe, gloss lojban text without verifying\n" "usage: cmafihe [-b [-w WIDTH] | -p | -l | -v] [FILENAME]\n" "no options : output inline ascii\n" "-b : output blocked ascii with optional WIDTH, default %i\n" "-l : output blocked latex code\n" #ifdef PLIST "-p : output GNUStep property list with vocabulary\n" #endif "-v : version\n", width); exit(0); } else { filename = *argv; } } if (filename) { in = fopen(filename, "rb"); if (!in) { fprintf(stderr, "Could not open %s for input\n", filename); exit(1); } } if (in) { yyin = in; } yylex(); if (in) { fclose(in); } do_trans(); start_output(); do_output(); end_output(); output_newline(); return 0; } jbofihe-0.38/cm_output.c100644 765 764 12475 7350750735 14331 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cm_output.c,v 1.3 2001/07/31 21:11:17 richard Exp $ Output formatting functions ***************************************/ /* Copyright 1998-2001 Richard P. Curnow */ /* Includes contributions from Björn Gohla to provide the GNUStep * interface */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #include "cm.h" /*+ Which format has been requested +*/ OutputFormat ofmt; /*+ Line width +*/ int width; /* ================================================== */ #define BUFFER_SIZE 512 #ifdef PLIST static proplist_t dictionary = NULL; #endif static char lines[3][BUFFER_SIZE]; static int width_used; /* ================================================== */ static void block_newline(void) { if (width_used > 0) { printf("%s\n", lines[0]); printf("%s\n", lines[1]); printf("%s\n", lines[2]); printf("\n"); } lines[0][0] = lines[1][0] = lines[2][0] = 0; width_used = 0; } /* ================================================== */ static void append_content(char *buf, const char *x, int len, int mlen) { int i; int d; char *p; strcat(buf, x); d = mlen - len; p = buf; while (*p) p++; for (i=0; i l2) ? l1 : l2; ml = (ml > l3) ? ml : l3; if (ml + width_used + 1 > width) { block_newline(); } append_content(&lines[0][0], a1, l1, ml+1); append_content(&lines[1][0], a2, l2, ml+1); append_content(&lines[2][0], a3, l3, ml+1); width_used += (ml + 1); return; } /* ================================================== */ /* ================================================== */ void start_output(void) { switch (ofmt) { case OF_LATEX: printf("\\documentclass[10pt]{article}\n" "\\usepackage{geometry}\n" "\\geometry{left=0.5in,right=0.5in,top=0.5in,bottom=0.5in,a4paper}\n" "\\def\\rmdefault{bch}\n" "\\setlength{\\parindent}{0pt}\n" "\\setlength{\\parskip}{1ex plus0.5ex minus0.5ex}\n" "\\setlength{\\baselineskip}{10pt}\n" "\\def\\arraystretch{0.7}\n" "\\begin{document}\n" ); break; case OF_TEXT: break; case OF_TEXTBLK: lines[0][0] = lines[1][0] = lines[2][0] = 0; width_used = 0; break; #ifdef PLIST case OF_PLIST: dictionary = PLMakeDictionaryFromEntries(NULL, NULL, NULL); break; #endif } } /* ================================================== */ void end_output(void) { switch (ofmt) { case OF_LATEX: printf("\\end{document}\n"); break; case OF_TEXT: break; case OF_TEXTBLK: block_newline(); break; #ifdef PLIST case OF_PLIST: /* we could save the dictionary to a named file */ /* dictionary = PLSetFilename(dictionary, PLMakeString("output.plist")); */ /* PLSave(dictionary, NO); */ /* but instead for now we just print to stdout */ printf(PLGetDescription(dictionary)); break; #endif //PLIST } } /* ================================================== */ void output(const char *lojban, const char *trans, const char *selmao) { switch (ofmt) { case OF_LATEX: printf ("\\begin{tabular}[t]{l}" "\\textbf{\\footnotesize %s}\\\\\n" "\\textrm{\\footnotesize %s}\\\\\n" "\\textit{\\footnotesize %s}\n" "\\end{tabular}\n" "\\rule{0in}{1.0\\baselineskip}", lojban, selmao, trans); break; case OF_TEXT: printf ("%s <%s> [%s] ", lojban, selmao, trans); break; case OF_TEXTBLK: do_block(lojban, selmao, trans); break; #ifdef PLIST case OF_PLIST: dictionary = PLInsertDictionaryEntry(dictionary, PLMakeString(lojban), PLMakeString(trans)); break; #endif //PLIST } } /* ================================================== */ void output_newline(void) { switch (ofmt) { case OF_LATEX: printf("\n\n"); break; case OF_TEXT: printf("\n"); break; case OF_TEXTBLK: block_newline(); printf("\n"); break; } } /* ================================================== */ void output_paren(const char *text) { switch (ofmt) { case OF_LATEX: printf ("\\textrm{\\footnotesize %s}", text); break; case OF_TEXT: printf ("(%s) ", text); break; case OF_TEXTBLK: do_block("(", "(", "("); do_block(text, "", ""); do_block(")", ")", ")"); break; } } /* ================================================== */ jbofihe-0.38/cm_scan.l100644 765 764 5200 7350750735 13672 0ustar richardruser/***-*- Fundamental -*-************************************ $Header: /cvs/src/jbofihe/cm_scan.l,v 1.4 2000/10/14 07:07:05 richard Exp $ Functions for gathering text into a list and preprocessing the list. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ %{ #include "cm.h" static int pdepth = 0; %} C [bcdfgjklmnprstvxz] CNR [bcdfgjklmnpstvxz] V [aeiou] L ({C}|{V}|y|\') LC {L},? /* The definition of cmavo is pretty liberal, allowing (hopefully) the minimum punctuation and arbitrary extensions, e.g. ca'ai'au. */ VV {V}{V}? VVY {VV}|y CCC {C}{VVY}(\'{VVY})* VCC {VVY}(\'{VVY})* CMT ({CCC}|\.{VCC})* CM1 {CCC}{CMT} CM2 \.?{VCC}{CMT} CM {CM1}|{CM2} /* These patterns are compelled to be BRIVLA - they are the special cases where r, n or y is inserted to prevent a cmavo breaking off. */ BM1 {C}{V}\'?{V}r{CNR}{L}+{V} BM2 {C}{V}\'?{V}nr{L}+{V} BM3 {C}{V}{C}y{C}{L}+{V} BM {BM1}|{BM2}|{BM3} %x PAREN /* The main rule for brivla is a pretty liberal definition - it should match fu'ivla too. Rely on the cmavo rule coming earlier so that sequences of cmavo glued together don't match this rule. */ %% {BM} { gather_brivla(yytext); } {CM} { gather_cmavo(yytext); } {C}{L}+{V} { gather_brivla(yytext); } (\.?{LC}*{C})\.? { gather_cmene(yytext); } {L}+ { gather_fallthru(yytext); } [ \t]+ { /* discard */ } \r?\n { /* discard */ } \r?\n(\r?\n)+ { gather_newline(); } [([] { pdepth++; BEGIN PAREN; gather_paren(yytext); } [[(] { ++pdepth; gather_paren(yytext); } [^][()]+ { gather_paren(yytext); } [])] { --pdepth; gather_paren(yytext); if (pdepth==0) { BEGIN INITIAL;} } [a-zA-Z]+ { gather_fallthru(yytext); } . { gather_fallthru(yytext); } jbofihe-0.38/cm_translate.c100644 765 764 27045 7350750735 14765 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cm_translate.c,v 1.6 2000/10/22 21:34:41 richard Exp $ Translation routine for mini-translater. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include "cm.h" #ifndef DEFAULT_DICTIONARY #define DEFAULT_DICTIONARY "smujmaji.dat" #endif #include #include #ifdef HAVE_MMAP #include #include #endif static int inited = 0; typedef struct { char *key; char *val; } Keyval; static Keyval *dict = NULL; static int n_entries = 0; /*++++++++++++++++++++++++++++++++++++++ Read a 'long' integer from file avoiding endianness problems. static unsigned long get_long FILE *in ++++++++++++++++++++++++++++++++++++++*/ static unsigned long get_long(FILE *in) { unsigned long a, b, c, d; /* Avoid endian-ness problem if we were to use fwrite */ a = getc(in); b = getc(in); c = getc(in); d = getc(in); return (a << 24) | (b << 16) | (c << 8) | (d << 0); } /*++++++++++++++++++++++++++++++++++++++ Read the database to build the transaction list. FILE *in ++++++++++++++++++++++++++++++++++++++*/ static void read_database(FILE *in) { typedef struct { int klen; int vlen; } Entry; Entry *entries; int i, len; struct stat sb; off_t offset; int result; char *dict_base = NULL; n_entries = get_long(in); entries = new_array(Entry, n_entries); dict = new_array(Keyval, n_entries); for (i=0; ikey, bb->key); } /* ================================================== */ static char * lookup(char *key) { Keyval k, *res; k.key = key; res = bsearch(&k, dict, n_entries, sizeof(Keyval), comparison); if (res) { return res->val; } else { return NULL; } } /* ================================================== */ char * translate(char *word) { static char buf[1024]; char *res; init(); res = lookup(word); if (res) { strcpy(buf, res); return buf; } else { return NULL; } } /* ================================================== */ static void append_trans(char *trans, char *result, int initial) { if (trans) { if (initial) { strcpy(result, trans); } else { strcat(result, "-"); strcat(result, trans); } } else { if (initial) { strcpy(result, "?"); } else { strcat(result, "-?"); } } } /* ================================================== */ static char * translate_comp(char *w, int *conversion) { char buf[64], buf2[4]; static char result[256]; char *trans; strcpy(buf, w); if (*conversion) { buf2[0] = '0' + *conversion; buf2[1] = 0; strcat(buf, buf2); trans = translate(buf); if (!trans) { result[0] = 0; switch (*conversion) { case 2: strcpy(result, "2nd conv-"); break; case 3: strcpy(result, "3rd conv-"); break; case 4: strcpy(result, "4th conv-"); break; case 5: strcpy(result, "5th conv-"); break; } trans = translate(w); if (trans) { strcat (result, trans); } else { strcat (result, "??"); } return result; } } else { trans = translate(w); } *conversion = 0; return trans; } /* ================================================== */ /* Lookup a lujvo that isn't matched in the ordinary dictionary, by smashing it into consituent rafsi and glueing these together. */ static char * translate_lujvo(char *word) { static char result[4096]; char buf[64]; char *w, *trans; int initial; char *yy; int ypos=0; int conversion=0; w = word; result[0] = 0; initial = 1; do { if (strlen(w) == 5) { /* trailing gismu */ trans = translate_comp(w, &conversion); append_trans(trans, result, initial); break; } else { /* Not 5 letter, see what else */ if (strlen(w) < 5) { /* Don't bother about whether this is initial or not, we need to be able to lookup single rafsi for breaking fuivla up. */ strcpy(buf,"%"); strcat(buf,w); trans = translate_comp(buf, &conversion); if (trans) { if (!initial) { strcat(result, "-"); } strcat(result, trans); } else { if (!initial) { strcat(result, "-"); } strcat(result, "?"); } break; } else { /* Try to pull off leading rafsi component and process remainder */ yy = strchr(w, 'y'); if (yy) { ypos = yy - w; } if (yy && ypos == 3) { /* 3 letter rafsi with y after */ if (!strncmp(w, "sel", 3)) { conversion = 2; } else if (!strncmp(w, "ter", 3)) { conversion = 3; } else if (!strncmp(w, "vel", 3)) { conversion = 4; } else if (!strncmp(w, "xel", 3)) { conversion = 5; } else { buf[0] = '%'; strncpy(buf+1,w,3); buf[4] = 0; trans = translate_comp(buf, &conversion); append_trans(trans, result, initial); } w += 4; /* and go around again */ } else if (yy && ypos == 4) { /* 4 letter rafsi with y after */ buf[0] = '%'; strncpy(buf+1,w,4); buf[5] = 0; trans = translate_comp(buf, &conversion); append_trans(trans, result, initial); w += 5; /* and go around again */ } else { /* 'y' does not terminate leading rafsi, or there is no 'y' in the word at all. Try to pull off 3 letter rafsi, or 4 letter one of form CV'V. Remember to remove following glue character if necessary, can only apply to first rafsi. */ buf[0] = '%'; if (w[2] == '\'') { strncpy(buf+1,w,4); buf[5] = 0; trans = translate_comp(buf, &conversion); append_trans(trans, result, initial); if (strchr("aeiou", w[1]) && strchr("aeiou", w[3]) && initial && w[4] && (w[4] == 'r' || (w[4] == 'n' && w[5] == 'r'))) { w += 5; } else { w += 4; } } else { if (!strncmp(w, "sel", 3)) { conversion = 2; } else if (!strncmp(w, "ter", 3)) { conversion = 3; } else if (!strncmp(w, "vel", 3)) { conversion = 4; } else if (!strncmp(w, "xel", 3)) { conversion = 5; } else { strncpy(buf+1,w,3); buf[4] = 0; trans = translate_comp(buf, &conversion); append_trans(trans, result, initial); } if (strchr("aeiou", w[1]) && strchr("aeiou", w[2]) && initial && w[3] && (w[3] == 'r' || (w[3] == 'n' && w[4] == 'r'))) { w += 4; } else { w += 3; } } } } } initial = 0; } while (*w); return result; } /* ================================================== */ static int is_consonant(char c) { return (strchr("bcdfgjklmnprstvxz", c) != 0); } /* ================================================== */ static int is_consonant_not_r(char c) { return (strchr("bcdfgjklmnpstvxz", c) != 0); } /* ================================================== */ /* ================================================== */ /* ================================================== */ char * translate_unknown(char *w) { static char buf[2048]; int len, i; int hyph; char *p, *q; char *ltrans; init(); /* See whether the word is a fuivla. If so, lookup the leading portion as a lujvo/rafsi, otherwise lookup the whole thing as a lujvo. */ /* Stage 3 fuivla characterised by starting with a CVC or 4 letter rafsi or lujvo, then a hyphen, then a lojbanised version of the import */ len = strlen(w); hyph = 0; /* Seek location of hyphen. Import word must have at least 2 letters. */ for (i=1; i jbofihe-0.38/cmavotab.c100644 765 764 506671 7350750735 14134 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cmavotab.c,v 1.7 2001/08/08 21:33:07 richard Exp $ Table of all cmavo, indexed by hash function computed in lex1.c. Most of this file was autogenerated by a perl script. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include "cmavotab.h" #include "rpc_tab.h" #define UNKNOWN 0 CmavoCell cmavo_table[] = { { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 0 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 2 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 3 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 4 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 5 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 6 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 7 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 8 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 9 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 10 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 11 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 12 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 13 */ { "a" , A , CM_A , SSM_A , "sumti or" }, /* 14 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 15 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 16 */ { "ai" , UI , CM_AI , SSM_UI1 , "intent" }, /* 17 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 18 */ { "au" , UI , CM_AU , SSM_UI1 , "desire" }, /* 19 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 20 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 21 */ { "a\'a" , UI , CM_AhA , SSM_UI1 , "attentive" }, /* 22 */ { "a\'e" , UI , CM_AhE , SSM_UI1 , "alertness" }, /* 23 */ { "a\'i" , UI , CM_AhI , SSM_UI1 , "effort" }, /* 24 */ { "a\'o" , UI , CM_AhO , SSM_UI1 , "hope" }, /* 25 */ { "a\'u" , UI , CM_AhU , SSM_UI1 , "interest" }, /* 26 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 27 */ { "e" , A , CM_E , SSM_A , "sumti and" }, /* 28 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 29 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 30 */ { "ei" , UI , CM_EI , SSM_UI1 , "obligation" }, /* 31 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 32 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 33 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 34 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 35 */ { "e\'a" , UI , CM_EhA , SSM_UI1 , "permission" }, /* 36 */ { "e\'e" , UI , CM_EhE , SSM_UI1 , "competence" }, /* 37 */ { "e\'i" , UI , CM_EhI , SSM_UI1 , "constraint" }, /* 38 */ { "e\'o" , UI , CM_EhO , SSM_UI1 , "request" }, /* 39 */ { "e\'u" , UI , CM_EhU , SSM_UI1 , "suggestion" }, /* 40 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 41 */ { "i" , I , CM_I , SSM_I , "sentence link" }, /* 42 */ { "ia" , UI , CM_IA , SSM_UI1 , "belief" }, /* 43 */ { "ie" , UI , CM_IE , SSM_UI1 , "agreement" }, /* 44 */ { "ii" , UI , CM_II , SSM_UI1 , "fear" }, /* 45 */ { "io" , UI , CM_IO , SSM_UI1 , "respect" }, /* 46 */ { "iu" , UI , CM_IU , SSM_UI1 , "love" }, /* 47 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 48 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 49 */ { "i\'a" , UI , CM_IhA , SSM_UI1 , "acceptance" }, /* 50 */ { "i\'e" , UI , CM_IhE , SSM_UI1 , "approval" }, /* 51 */ { "i\'i" , UI , CM_IhI , SSM_UI1 , "togetherness" }, /* 52 */ { "i\'o" , UI , CM_IhO , SSM_UI1 , "appreciation" }, /* 53 */ { "i\'u" , UI , CM_IhU , SSM_UI1 , "familiarity" }, /* 54 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 55 */ { "o" , A , CM_O , SSM_A , "sumti iff" }, /* 56 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 57 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 58 */ { "oi" , UI , CM_OI , SSM_UI1 , "complaint" }, /* 59 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 60 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 61 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 62 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 63 */ { "o\'a" , UI , CM_OhA , SSM_UI1 , "pride" }, /* 64 */ { "o\'e" , UI , CM_OhE , SSM_UI1 , "closeness" }, /* 65 */ { "o\'i" , UI , CM_OhI , SSM_UI1 , "caution" }, /* 66 */ { "o\'o" , UI , CM_OhO , SSM_UI1 , "patience" }, /* 67 */ { "o\'u" , UI , CM_OhU , SSM_UI1 , "relaxation" }, /* 68 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 69 */ { "u" , A , CM_U , SSM_A , "sumti whether" }, /* 70 */ { "ua" , UI , CM_UA , SSM_UI1 , "discovery" }, /* 71 */ { "ue" , UI , CM_UE , SSM_UI1 , "surprise" }, /* 72 */ { "ui" , UI , CM_UI , SSM_UI1 , "happiness" }, /* 73 */ { "uo" , UI , CM_UO , SSM_UI1 , "completion" }, /* 74 */ { "uu" , UI , CM_UU , SSM_UI1 , "pity" }, /* 75 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 76 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 77 */ { "u\'a" , UI , CM_UhA , SSM_UI1 , "gain" }, /* 78 */ { "u\'e" , UI , CM_UhE , SSM_UI1 , "wonder" }, /* 79 */ { "u\'i" , UI , CM_UhI , SSM_UI1 , "amusement" }, /* 80 */ { "u\'o" , UI , CM_UhO , SSM_UI1 , "courage" }, /* 81 */ { "u\'u" , UI , CM_UhU , SSM_UI1 , "repentance" }, /* 82 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 83 */ { "y" , Y , CM_Y , SSM_Y , "hesitation" }, /* 84 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 85 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 86 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 87 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 88 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 89 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 90 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 91 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 92 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 93 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 94 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 95 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 96 */ { "y\'y" , BY , CM_YhY , SSM_BY2 , "'" }, /* 97 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 98 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 99 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 100 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 101 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 102 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 103 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 104 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 105 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 106 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 107 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 108 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 109 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 110 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 111 */ { "ba" , PU , CM_BA , SSM_PU , "after" }, /* 112 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 113 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 114 */ { "bai" , BAI , CM_BAI , SSM_BAI , "compelled by" }, /* 115 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 116 */ { "bau" , BAI , CM_BAU , SSM_BAI , "in language" }, /* 117 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 118 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 119 */ { "ba\'a" , UI , CM_BAhA , SSM_UI2 , "I anticipate" }, /* 120 */ { "ba\'e" , BAhE , CM_BAhE , SSM_BAhE , "emphasize next" }, /* 121 */ { "ba\'i" , BAI , CM_BAhI , SSM_BAI , "replaced by" }, /* 122 */ { "ba\'o" , ZAhO , CM_BAhO , SSM_ZAhO , "perfective" }, /* 123 */ { "ba\'u" , UI , CM_BAhU , SSM_UI3 , "exaggeration" }, /* 124 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 125 */ { "be" , BE , CM_BE , SSM_BE , "link sumti" }, /* 126 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 127 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 128 */ { "bei" , BEI , CM_BEI , SSM_BEI , "link more sumti" }, /* 129 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 130 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 131 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 132 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 133 */ { "be\'a" , FAhA , CM_BEhA , SSM_FAhA1 , "north of" }, /* 134 */ { "be\'e" , COI , CM_BEhE , SSM_COI , "request to send" }, /* 135 */ { "be\'i" , BAI , CM_BEhI , SSM_BAI , "sent by" }, /* 136 */ { "be\'o" , BEhO , CM_BEhO , SSM_BEhO , "end linked sumti" }, /* 137 */ { "be\'u" , UI , CM_BEhU , SSM_UI5 , "lack" }, /* 138 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 139 */ { "bi" , PA , CM_BI , SSM_PA1 , "8" }, /* 140 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 141 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 142 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 143 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 144 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 145 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 146 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 147 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 148 */ { "bi\'e" , BIhE , CM_BIhE , SSM_BIhE , "hi priority indicator" }, /* 149 */ { "bi\'i" , BIhI , CM_BIhI , SSM_BIhI , "unordered interval" }, /* 150 */ { "bi\'o" , BIhI , CM_BIhO , SSM_BIhI , "ordered interval" }, /* 151 */ { "bi\'u" , UI , CM_BIhU , SSM_UI3a , "new information" }, /* 152 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 153 */ { "bo" , BO , CM_BO , SSM_BO , "short scope link" }, /* 154 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 155 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 156 */ { "boi" , BOI , CM_BOI , SSM_BOI , "end number or lerfu" }, /* 157 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 158 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 159 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 160 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 161 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 162 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 163 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 164 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 165 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 166 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 167 */ { "bu" , BU , CM_BU , SSM_BU , "word to lerfu" }, /* 168 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 169 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 170 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 171 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 172 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 173 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 174 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 175 */ { "bu\'a" , GOhA , CM_BUhA , SSM_GOhA , "some selbri 1" }, /* 176 */ { "bu\'e" , GOhA , CM_BUhE , SSM_GOhA , "some selbri 2" }, /* 177 */ { "bu\'i" , GOhA , CM_BUhI , SSM_GOhA , "some selbri 3" }, /* 178 */ { "bu\'o" , UI , CM_BUhO , SSM_UI7 , "start emotion" }, /* 179 */ { "bu\'u" , FAhA , CM_BUhU , SSM_FAhA3 , "coincident with" }, /* 180 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 181 */ { "by" , BY , CM_BY , SSM_BY2 , "b" }, /* 182 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 183 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 184 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 185 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 186 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 187 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 188 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 189 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 190 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 191 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 192 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 193 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 194 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 195 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 196 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 197 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 198 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 199 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 200 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 201 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 202 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 203 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 204 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 205 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 206 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 207 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 208 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 209 */ { "ca" , PU , CM_CA , SSM_PU , "during" }, /* 210 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 211 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 212 */ { "cai" , CAI , CM_CAI , SSM_CAI , "intense emotion" }, /* 213 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 214 */ { "cau" , BAI , CM_CAU , SSM_BAI , "lacked by" }, /* 215 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 216 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 217 */ { "ca\'a" , CAhA , CM_CAhA , SSM_CAhA , "actually is" }, /* 218 */ { "ca\'e" , UI , CM_CAhE , SSM_UI2 , "I define" }, /* 219 */ { "ca\'i" , BAI , CM_CAhI , SSM_BAI , "by authority of" }, /* 220 */ { "ca\'o" , ZAhO , CM_CAhO , SSM_ZAhO , "continuative" }, /* 221 */ { "ca\'u" , FAhA , CM_CAhU , SSM_FAhA2 , "in front of" }, /* 222 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 223 */ { "ce" , JOI , CM_CE , SSM_JOI , "in a set with" }, /* 224 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 225 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 226 */ { "cei" , CEI , CM_CEI , SSM_CEI , "pro-bridi assign" }, /* 227 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 228 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 229 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 230 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 231 */ { "ce\'a" , LAU , CM_CEhA , SSM_LAU , "font shift" }, /* 232 */ { "ce\'e" , CEhE , CM_CEhE , SSM_CEhE , "afterthought termset" }, /* 233 */ { "ce\'i" , PA , CM_CEhI , SSM_PA3 , "percent" }, /* 234 */ { "ce\'o" , JOI , CM_CEhO , SSM_JOI , "in a sequence with" }, /* 235 */ { "ce\'u" , KOhA , CM_CEhU , SSM_KOhA8 , "lambda" }, /* 236 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 237 */ { "ci" , PA , CM_CI , SSM_PA1 , "3" }, /* 238 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 239 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 240 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 241 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 242 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 243 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 244 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 245 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 246 */ { "ci\'e" , BAI , CM_CIhE , SSM_BAI , "in system" }, /* 247 */ { "ci\'i" , PA , CM_CIhI , SSM_PA5 , "infinity" }, /* 248 */ { "ci\'o" , BAI , CM_CIhO , SSM_BAI , "emotionally felt by" }, /* 249 */ { "ci\'u" , BAI , CM_CIhU , SSM_BAI , "on the scale" }, /* 250 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 251 */ { "co" , CO , CM_CO , SSM_CO , "tanru inversion" }, /* 252 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 253 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 254 */ { "coi" , COI , CM_COI , SSM_COI , "greetings" }, /* 255 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 256 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 257 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 258 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 259 */ { "co\'a" , ZAhO , CM_COhA , SSM_ZAhO , "initiative" }, /* 260 */ { "co\'e" , GOhA , CM_COhE , SSM_GOhA , "unspecif bridi" }, /* 261 */ { "co\'i" , ZAhO , CM_COhI , SSM_ZAhO , "achievative" }, /* 262 */ { "co\'o" , COI , CM_COhO , SSM_COI , "partings" }, /* 263 */ { "co\'u" , ZAhO , CM_COhU , SSM_ZAhO , "cessative" }, /* 264 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 265 */ { "cu" , CU , CM_CU , SSM_CU , "selbri separator" }, /* 266 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 267 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 268 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 269 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 270 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 271 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 272 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 273 */ { "cu\'a" , VUhU , CM_CUhA , SSM_VUhU3 , "absolute value" }, /* 274 */ { "cu\'e" , CUhE , CM_CUhE , SSM_CUhE , "modal ?" }, /* 275 */ { "cu\'i" , CAI , CM_CUhI , SSM_CAI , "neutral emotion" }, /* 276 */ { "cu\'o" , MOI , CM_CUhO , SSM_MOI , "probability selbri" }, /* 277 */ { "cu\'u" , BAI , CM_CUhU , SSM_BAI , "as said by" }, /* 278 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 279 */ { "cy" , BY , CM_CY , SSM_BY2 , "c" }, /* 280 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 281 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 282 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 283 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 284 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 285 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 286 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 287 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 288 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 289 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 290 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 291 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 292 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 293 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 294 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 295 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 296 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 297 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 298 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 299 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 300 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 301 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 302 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 303 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 304 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 305 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 306 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 307 */ { "da" , KOhA , CM_DA , SSM_KOhA1 , "something 1" }, /* 308 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 309 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 310 */ { "dai" , UI , CM_DAI , SSM_UI5 , "empathy" }, /* 311 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 312 */ { "dau" , PA , CM_DAU , SSM_PA2 , "hex digit A" }, /* 313 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 314 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 315 */ { "da\'a" , PA , CM_DAhA , SSM_PA4 , "all except" }, /* 316 */ { "da\'e" , KOhA , CM_DAhE , SSM_KOhA2 , "eventual utterance" }, /* 317 */ { "da\'i" , UI , CM_DAhI , SSM_UI3 , "supposing" }, /* 318 */ { "da\'o" , DAhO , CM_DAhO , SSM_DAhO , "cancel pro-assigns" }, /* 319 */ { "da\'u" , KOhA , CM_DAhU , SSM_KOhA2 , "earlier utterance" }, /* 320 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 321 */ { "de" , KOhA , CM_DE , SSM_KOhA1 , "something 2" }, /* 322 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 323 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 324 */ { "dei" , KOhA , CM_DEI , SSM_KOhA2 , "this utterance" }, /* 325 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 326 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 327 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 328 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 329 */ { "de\'a" , ZAhO , CM_DEhA , SSM_ZAhO , "pausative" }, /* 330 */ { "de\'e" , KOhA , CM_DEhE , SSM_KOhA2 , "soon utterance" }, /* 331 */ { "de\'i" , BAI , CM_DEhI , SSM_BAI , "dated" }, /* 332 */ { "de\'o" , VUhU , CM_DEhO , SSM_VUhU3 , "logarithm" }, /* 333 */ { "de\'u" , KOhA , CM_DEhU , SSM_KOhA2 , "recent utterance" }, /* 334 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 335 */ { "di" , KOhA , CM_DI , SSM_KOhA1 , "something 3" }, /* 336 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 337 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 338 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 339 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 340 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 341 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 342 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 343 */ { "di\'a" , ZAhO , CM_DIhA , SSM_ZAhO , "resumptitive" }, /* 344 */ { "di\'e" , KOhA , CM_DIhE , SSM_KOhA2 , "next utterance" }, /* 345 */ { "di\'i" , TAhE , CM_DIhI , SSM_TAhE , "regularly" }, /* 346 */ { "di\'o" , BAI , CM_DIhO , SSM_BAI , "at the locus of" }, /* 347 */ { "di\'u" , KOhA , CM_DIhU , SSM_KOhA2 , "last utterance" }, /* 348 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 349 */ { "do" , KOhA , CM_DO , SSM_KOhA3 , "you" }, /* 350 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 351 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 352 */ { "doi" , DOI , CM_DOI , SSM_DOI , "vocative marker" }, /* 353 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 354 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 355 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 356 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 357 */ { "do\'a" , UI , CM_DOhA , SSM_UI3 , "generously" }, /* 358 */ { "do\'e" , BAI , CM_DOhE , SSM_BAI , "unspecif modal" }, /* 359 */ { "do\'i" , KOhA , CM_DOhI , SSM_KOhA2 , "unspecif utterance" }, /* 360 */ { "do\'o" , KOhA , CM_DOhO , SSM_KOhA3 , "you and others" }, /* 361 */ { "do\'u" , DOhU , CM_DOhU , SSM_DOhU , "end vocative" }, /* 362 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 363 */ { "du" , GOhA , CM_DU , SSM_GOhA , "same identity as" }, /* 364 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 365 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 366 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 367 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 368 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 369 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 370 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 371 */ { "du\'a" , FAhA , CM_DUhA , SSM_FAhA1 , "east of" }, /* 372 */ { "du\'e" , PA , CM_DUhE , SSM_PA4 , "too many" }, /* 373 */ { "du\'i" , BAI , CM_DUhI , SSM_BAI , "as much as" }, /* 374 */ { "du\'o" , BAI , CM_DUhO , SSM_BAI , "according to" }, /* 375 */ { "du\'u" , NU , CM_DUhU , SSM_NU , "bridi abstract" }, /* 376 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 377 */ { "dy" , BY , CM_DY , SSM_BY2 , "d" }, /* 378 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 379 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 380 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 381 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 382 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 383 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 384 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 385 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 386 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 387 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 388 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 389 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 390 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 391 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 392 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 393 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 394 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 395 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 396 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 397 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 398 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 399 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 400 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 401 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 402 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 403 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 404 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 405 */ { "fa" , FA , CM_FA , SSM_FA , "1st sumti place" }, /* 406 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 407 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 408 */ { "fai" , FA , CM_FAI , SSM_FA , "extra sumti place" }, /* 409 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 410 */ { "fau" , BAI , CM_FAU , SSM_BAI , "in the event of" }, /* 411 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 412 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 413 */ { "fa\'a" , FAhA , CM_FAhA , SSM_FAhA4 , "towards point" }, /* 414 */ { "fa\'e" , BAI , CM_FAhE , SSM_BAI , "reverse of" }, /* 415 */ { "fa\'i" , VUhU , CM_FAhI , SSM_VUhU2 , "reciprocal of" }, /* 416 */ { "fa\'o" , FAhO , CM_FAhO , SSM_FAhO , "end of text" }, /* 417 */ { "fa\'u" , JOI , CM_FAhU , SSM_JOI , "and respectively" }, /* 418 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 419 */ { "fe" , FA , CM_FE , SSM_FA , "2nd sumti place" }, /* 420 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 421 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 422 */ { "fei" , PA , CM_FEI , SSM_PA2 , "hex digit B" }, /* 423 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 424 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 425 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 426 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 427 */ { "fe\'a" , VUhU , CM_FEhA , SSM_VUhU3 , "nth root of" }, /* 428 */ { "fe\'e" , FEhE , CM_FEhE , SSM_FEhE , "space aspects" }, /* 429 */ { "fe\'i" , VUhU , CM_FEhI , SSM_VUhU1 , "divided by" }, /* 430 */ { "fe\'o" , COI , CM_FEhO , SSM_COI , "over and out" }, /* 431 */ { "fe\'u" , FEhU , CM_FEhU , SSM_FEhU , "end modal selbri" }, /* 432 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 433 */ { "fi" , FA , CM_FI , SSM_FA , "3rd sumti place" }, /* 434 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 435 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 436 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 437 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 438 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 439 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 440 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 441 */ { "fi\'a" , FA , CM_FIhA , SSM_FA , "sumti place ?" }, /* 442 */ { "fi\'e" , BAI , CM_FIhE , SSM_BAI , "created by" }, /* 443 */ { "fi\'i" , COI , CM_FIhI , SSM_COI , "hospitality" }, /* 444 */ { "fi\'o" , FIhO , CM_FIhO , SSM_FIhO , "selbri to modal" }, /* 445 */ { "fi\'u" , PA , CM_FIhU , SSM_PA3 , "fraction slash" }, /* 446 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 447 */ { "fo" , FA , CM_FO , SSM_FA , "4th sumti place" }, /* 448 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 449 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 450 */ { "foi" , FOI , CM_FOI , SSM_FOI , "end composite lerfu" }, /* 451 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 452 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 453 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 454 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 455 */ { "fo\'a" , KOhA , CM_FOhA , SSM_KOhA4 , "it-6" }, /* 456 */ { "fo\'e" , KOhA , CM_FOhE , SSM_KOhA4 , "it-7" }, /* 457 */ { "fo\'i" , KOhA , CM_FOhI , SSM_KOhA4 , "it-8" }, /* 458 */ { "fo\'o" , KOhA , CM_FOhO , SSM_KOhA4 , "it-9" }, /* 459 */ { "fo\'u" , KOhA , CM_FOhU , SSM_KOhA4 , "it-10" }, /* 460 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 461 */ { "fu" , FA , CM_FU , SSM_FA , "5th sumti place" }, /* 462 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 463 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 464 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 465 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 466 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 467 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 468 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 469 */ { "fu\'a" , FUhA , CM_FUhA , SSM_FUhA , "reverse Polish" }, /* 470 */ { "fu\'e" , FUhE , CM_FUhE , SSM_FUhE , "indicator scope" }, /* 471 */ { "fu\'i" , UI , CM_FUhI , SSM_UI5 , "easy" }, /* 472 */ { "fu\'o" , FUhO , CM_FUhO , SSM_FUhO , "end indicator scope" }, /* 473 */ { "fu\'u" , VUhU , CM_FUhU , SSM_VUhU0 , "unspecif operator" }, /* 474 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 475 */ { "fy" , BY , CM_FY , SSM_BY2 , "f" }, /* 476 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 477 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 478 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 479 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 480 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 481 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 482 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 483 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 484 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 485 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 486 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 487 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 488 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 489 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 490 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 491 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 492 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 493 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 494 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 495 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 496 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 497 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 498 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 499 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 500 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 501 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 502 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 503 */ { "ga" , GA , CM_GA , SSM_GA , "fore or" }, /* 504 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 505 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 506 */ { "gai" , PA , CM_GAI , SSM_PA2 , "hex digit C" }, /* 507 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 508 */ { "gau" , BAI , CM_GAU , SSM_BAI , "with active agent" }, /* 509 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 510 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 511 */ { "ga\'a" , BAI , CM_GAhA , SSM_BAI , "to observer" }, /* 512 */ { "ga\'e" , BY , CM_GAhE , SSM_BY1 , "upper-case shift" }, /* 513 */ { "ga\'i" , UI , CM_GAhI , SSM_UI5 , "hauteur" }, /* 514 */ { "ga\'o" , GAhO , CM_GAhO , SSM_GAhO , "inclusive interval" }, /* 515 */ { "ga\'u" , FAhA , CM_GAhU , SSM_FAhA2 , "above" }, /* 516 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 517 */ { "ge" , GA , CM_GE , SSM_GA , "fore and" }, /* 518 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 519 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 520 */ { "gei" , VUhU , CM_GEI , SSM_VUhU2 , "exponential notation" }, /* 521 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 522 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 523 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 524 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 525 */ { "ge\'a" , VUhU , CM_GEhA , SSM_VUhU0 , "null operator" }, /* 526 */ { "ge\'e" , UI , CM_GEhE , SSM_UI6 , "unspecif emotion" }, /* 527 */ { "ge\'i" , GA , CM_GEhI , SSM_GA , "fore conn ?" }, /* 528 */ { "ge\'o" , BY , CM_GEhO , SSM_BY1 , "Greek shift" }, /* 529 */ { "ge\'u" , GEhU , CM_GEhU , SSM_GEhU , "end relative phrase" }, /* 530 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 531 */ { "gi" , GI , CM_GI , SSM_GI , "connective medial" }, /* 532 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 533 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 534 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 535 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 536 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 537 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 538 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 539 */ { "gi\'a" , GIhA , CM_GIhA , SSM_GIhA , "bridi or" }, /* 540 */ { "gi\'e" , GIhA , CM_GIhE , SSM_GIhA , "bridi and" }, /* 541 */ { "gi\'i" , GIhA , CM_GIhI , SSM_GIhA , "bridi conn ?" }, /* 542 */ { "gi\'o" , GIhA , CM_GIhO , SSM_GIhA , "bridi iff" }, /* 543 */ { "gi\'u" , GIhA , CM_GIhU , SSM_GIhA , "bridi whether" }, /* 544 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 545 */ { "go" , GA , CM_GO , SSM_GA , "fore iff" }, /* 546 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 547 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 548 */ { "goi" , GOI , CM_GOI , SSM_GOI , "pro-sumti assign" }, /* 549 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 550 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 551 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 552 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 553 */ { "go\'a" , GOhA , CM_GOhA , SSM_GOhA , "recent bridi" }, /* 554 */ { "go\'e" , GOhA , CM_GOhE , SSM_GOhA , "penultimate bridi" }, /* 555 */ { "go\'i" , GOhA , CM_GOhI , SSM_GOhA , "last bridi" }, /* 556 */ { "go\'o" , GOhA , CM_GOhO , SSM_GOhA , "future bridi" }, /* 557 */ { "go\'u" , GOhA , CM_GOhU , SSM_GOhA , "earlier bridi" }, /* 558 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 559 */ { "gu" , GA , CM_GU , SSM_GA , "fore whether" }, /* 560 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 561 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 562 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 563 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 564 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 565 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 566 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 567 */ { "gu\'a" , GUhA , CM_GUhA , SSM_GUhA , "fore tanru or" }, /* 568 */ { "gu\'e" , GUhA , CM_GUhE , SSM_GUhA , "fore tanru and" }, /* 569 */ { "gu\'i" , GUhA , CM_GUhI , SSM_GUhA , "fore tanru conn ?" }, /* 570 */ { "gu\'o" , GUhA , CM_GUhO , SSM_GUhA , "fore tanru iff" }, /* 571 */ { "gu\'u" , GUhA , CM_GUhU , SSM_GUhA , "fore tanru whether" }, /* 572 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 573 */ { "gy" , BY , CM_GY , SSM_BY2 , "g" }, /* 574 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 575 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 576 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 577 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 578 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 579 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 580 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 581 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 582 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 583 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 584 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 585 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 586 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 587 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 588 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 589 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 590 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 591 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 592 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 593 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 594 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 595 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 596 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 597 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 598 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 599 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 600 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 601 */ { "ja" , JA , CM_JA , SSM_JA , "tanru or" }, /* 602 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 603 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 604 */ { "jai" , JAI , CM_JAI , SSM_JAI , "modal conversion" }, /* 605 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 606 */ { "jau" , PA , CM_JAU , SSM_PA2 , "hex digit D" }, /* 607 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 608 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 609 */ { "ja\'a" , NA , CM_JAhA , SSM_NA , "bridi affirmer" }, /* 610 */ { "ja\'e" , BAI , CM_JAhE , SSM_BAI , "therefore result" }, /* 611 */ { "ja\'i" , BAI , CM_JAhI , SSM_BAI , "by rule" }, /* 612 */ { "ja\'o" , UI , CM_JAhO , SSM_UI2 , "I conclude" }, /* 613 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 614 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 615 */ { "je" , JA , CM_JE , SSM_JA , "tanru and" }, /* 616 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 617 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 618 */ { "jei" , NU , CM_JEI , SSM_NU , "truth abstract" }, /* 619 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 620 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 621 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 622 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 623 */ { "je\'a" , NAhE , CM_JEhA , SSM_NAhE , "scalar affirmer" }, /* 624 */ { "je\'e" , COI , CM_JEhE , SSM_COI , "roger" }, /* 625 */ { "je\'i" , JA , CM_JEhI , SSM_JA , "tanru conn ?" }, /* 626 */ { "je\'o" , BY , CM_JEhO , SSM_BY1 , "Hebrew shift" }, /* 627 */ { "je\'u" , UI , CM_JEhU , SSM_UI3 , "truth" }, /* 628 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 629 */ { "ji" , A , CM_JI , SSM_A , "sumti conn ?" }, /* 630 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 631 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 632 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 633 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 634 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 635 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 636 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 637 */ { "ji\'a" , UI , CM_JIhA , SSM_UI3b , "in addition" }, /* 638 */ { "ji\'e" , BAI , CM_JIhE , SSM_BAI , "up to limit" }, /* 639 */ { "ji\'i" , PA , CM_JIhI , SSM_PA4 , "approximately" }, /* 640 */ { "ji\'o" , BAI , CM_JIhO , SSM_BAI , "under direction of" }, /* 641 */ { "ji\'u" , BAI , CM_JIhU , SSM_BAI , "based on" }, /* 642 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 643 */ { "jo" , JA , CM_JO , SSM_JA , "tanru iff" }, /* 644 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 645 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 646 */ { "joi" , JOI , CM_JOI , SSM_JOI , "in a mass with" }, /* 647 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 648 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 649 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 650 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 651 */ { "jo\'a" , UI , CM_JOhA , SSM_UI3a , "metalinguistic yes" }, /* 652 */ { "jo\'e" , JOI , CM_JOhE , SSM_JOI , "union" }, /* 653 */ { "jo\'i" , JOhI , CM_JOhI , SSM_JOhI , "array" }, /* 654 */ { "jo\'o" , BY , CM_JOhO , SSM_BY1 , "Arabic shift" }, /* 655 */ { "jo\'u" , JOI , CM_JOhU , SSM_JOI , "in common with" }, /* 656 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 657 */ { "ju" , JA , CM_JU , SSM_JA , "tanru whether" }, /* 658 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 659 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 660 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 661 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 662 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 663 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 664 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 665 */ { "ju\'a" , UI , CM_JUhA , SSM_UI2 , "I state" }, /* 666 */ { "ju\'e" , JOI , CM_JUhE , SSM_JOI , "vague connective" }, /* 667 */ { "ju\'i" , COI , CM_JUhI , SSM_COI , "attention" }, /* 668 */ { "ju\'o" , UI , CM_JUhO , SSM_UI5 , "certainty" }, /* 669 */ { "ju\'u" , VUhU , CM_JUhU , SSM_VUhU2 , "number base" }, /* 670 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 671 */ { "jy" , BY , CM_JY , SSM_BY2 , "j" }, /* 672 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 673 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 674 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 675 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 676 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 677 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 678 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 679 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 680 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 681 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 682 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 683 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 684 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 685 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 686 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 687 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 688 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 689 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 690 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 691 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 692 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 693 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 694 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 695 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 696 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 697 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 698 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 699 */ { "ka" , NU , CM_KA , SSM_NU , "property abstract" }, /* 700 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 701 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 702 */ { "kai" , BAI , CM_KAI , SSM_BAI , "characterizing" }, /* 703 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 704 */ { "kau" , UI , CM_KAU , SSM_UI3a , "indirect question" }, /* 705 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 706 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 707 */ { "ka\'a" , BAI , CM_KAhA , SSM_BAI , "gone to by" }, /* 708 */ { "ka\'e" , CAhA , CM_KAhE , SSM_CAhA , "innately capable of" }, /* 709 */ { "ka\'i" , BAI , CM_KAhI , SSM_BAI , "represented by" }, /* 710 */ { "ka\'o" , PA , CM_KAhO , SSM_PA5 , "imaginary i" }, /* 711 */ { "ka\'u" , UI , CM_KAhU , SSM_UI2 , "I know culturally" }, /* 712 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 713 */ { "ke" , KE , CM_KE , SSM_KE , "start grouping" }, /* 714 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 715 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 716 */ { "kei" , KEI , CM_KEI , SSM_KEI , "end abstraction" }, /* 717 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 718 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 719 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 720 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 721 */ { "ke\'a" , KOhA , CM_KEhA , SSM_KOhA7 , "relativized it" }, /* 722 */ { "ke\'e" , KEhE , CM_KEhE , SSM_KEhE , "end grouping" }, /* 723 */ { "ke\'i" , GAhO , CM_KEhI , SSM_GAhO , "exclusive interval" }, /* 724 */ { "ke\'o" , COI , CM_KEhO , SSM_COI , "please repeat" }, /* 725 */ { "ke\'u" , UI , CM_KEhU , SSM_UI3 , "repeating" }, /* 726 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 727 */ { "ki" , KI , CM_KI , SSM_KI , "tense default" }, /* 728 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 729 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 730 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 731 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 732 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 733 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 734 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 735 */ { "ki\'a" , UI , CM_KIhA , SSM_UI6 , "textual confusion" }, /* 736 */ { "ki\'e" , COI , CM_KIhE , SSM_COI , "thanks" }, /* 737 */ { "ki\'i" , BAI , CM_KIhI , SSM_BAI , "as a relation of" }, /* 738 */ { "ki\'o" , PA , CM_KIhO , SSM_PA3 , "number comma" }, /* 739 */ { "ki\'u" , BAI , CM_KIhU , SSM_BAI , "because of reason" }, /* 740 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 741 */ { "ko" , KOhA , CM_KO , SSM_KOhA3 , "imperative" }, /* 742 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 743 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 744 */ { "koi" , BAI , CM_KOI , SSM_BAI , "bounded by" }, /* 745 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 746 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 747 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 748 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 749 */ { "ko\'a" , KOhA , CM_KOhA , SSM_KOhA4 , "it-1" }, /* 750 */ { "ko\'e" , KOhA , CM_KOhE , SSM_KOhA4 , "it-2" }, /* 751 */ { "ko\'i" , KOhA , CM_KOhI , SSM_KOhA4 , "it-3" }, /* 752 */ { "ko\'o" , KOhA , CM_KOhO , SSM_KOhA4 , "it-4" }, /* 753 */ { "ko\'u" , KOhA , CM_KOhU , SSM_KOhA4 , "it-5" }, /* 754 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 755 */ { "ku" , KU , CM_KU , SSM_KU , "end sumti" }, /* 756 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 757 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 758 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 759 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 760 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 761 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 762 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 763 */ { "ku\'a" , JOI , CM_KUhA , SSM_JOI , "intersection" }, /* 764 */ { "ku\'e" , KUhE , CM_KUhE , SSM_KUhE , "end mex forethought" }, /* 765 */ { "ku\'i" , UI , CM_KUhI , SSM_UI3b , "however" }, /* 766 */ { "ku\'o" , KUhO , CM_KUhO , SSM_KUhO , "end relative clause" }, /* 767 */ { "ku\'u" , BAI , CM_KUhU , SSM_BAI , "in culture" }, /* 768 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 769 */ { "ky" , BY , CM_KY , SSM_BY2 , "k" }, /* 770 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 771 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 772 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 773 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 774 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 775 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 776 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 777 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 778 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 779 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 780 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 781 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 782 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 783 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 784 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 785 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 786 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 787 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 788 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 789 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 790 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 791 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 792 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 793 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 794 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 795 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 796 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 797 */ { "la" , LA , CM_LA , SSM_LA , "that named" }, /* 798 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 799 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 800 */ { "lai" , LA , CM_LAI , SSM_LA , "the mass of named" }, /* 801 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 802 */ { "lau" , LAU , CM_LAU , SSM_LAU , "punctuation mark" }, /* 803 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 804 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 805 */ { "la\'a" , UI , CM_LAhA , SSM_UI3 , "probability" }, /* 806 */ { "la\'e" , LAhE , CM_LAhE , SSM_LAhE , "the referent of" }, /* 807 */ { "la\'i" , LA , CM_LAhI , SSM_LA , "the set of named" }, /* 808 */ { "la\'o" , ZOI , CM_LAhO , SSM_ZOI , "the non-Lojban named" }, /* 809 */ { "la\'u" , BAI , CM_LAhU , SSM_BAI , "quantifying" }, /* 810 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 811 */ { "le" , LE , CM_LE , SSM_LE , "the described" }, /* 812 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 813 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 814 */ { "lei" , LE , CM_LEI , SSM_LE , "the mass described" }, /* 815 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 816 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 817 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 818 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 819 */ { "le\'a" , BAI , CM_LEhA , SSM_BAI , "in category" }, /* 820 */ { "le\'e" , LE , CM_LEhE , SSM_LE , "the stereotypical" }, /* 821 */ { "le\'i" , LE , CM_LEhI , SSM_LE , "the set described" }, /* 822 */ { "le\'o" , UI , CM_LEhO , SSM_UI5 , "aggressive" }, /* 823 */ { "le\'u" , LEhU , CM_LEhU , SSM_LEhU , "end error quote" }, /* 824 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 825 */ { "li" , LI , CM_LI , SSM_LI , "the number" }, /* 826 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 827 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 828 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 829 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 830 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 831 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 832 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 833 */ { "li\'a" , UI , CM_LIhA , SSM_UI3 , "clearly" }, /* 834 */ { "li\'e" , BAI , CM_LIhE , SSM_BAI , "preceded by" }, /* 835 */ { "li\'i" , NU , CM_LIhI , SSM_NU , "experience abstract" }, /* 836 */ { "li\'o" , UI , CM_LIhO , SSM_UI3a , "omitted text" }, /* 837 */ { "li\'u" , LIhU , CM_LIhU , SSM_LIhU , "end quote" }, /* 838 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 839 */ { "lo" , LE , CM_LO , SSM_LE , "the really is" }, /* 840 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 841 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 842 */ { "loi" , LE , CM_LOI , SSM_LE , "the mass really is" }, /* 843 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 844 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 845 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 846 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 847 */ { "lo\'a" , BY , CM_LOhA , SSM_BY1 , "Lojban shift" }, /* 848 */ { "lo\'e" , LE , CM_LOhE , SSM_LE , "the typical" }, /* 849 */ { "lo\'i" , LE , CM_LOhI , SSM_LE , "the set really is" }, /* 850 */ { "lo\'o" , LOhO , CM_LOhO , SSM_LOhO , "end mex sumti" }, /* 851 */ { "lo\'u" , LOhU , CM_LOhU , SSM_LOhU , "error quote" }, /* 852 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 853 */ { "lu" , LU , CM_LU , SSM_LU , "quote" }, /* 854 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 855 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 856 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 857 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 858 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 859 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 860 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 861 */ { "lu\'a" , LAhE , CM_LUhA , SSM_LAhE , "the individuals of" }, /* 862 */ { "lu\'e" , LAhE , CM_LUhE , SSM_LAhE , "the symbol for" }, /* 863 */ { "lu\'i" , LAhE , CM_LUhI , SSM_LAhE , "the set composed of" }, /* 864 */ { "lu\'o" , LAhE , CM_LUhO , SSM_LAhE , "the mass composed of" }, /* 865 */ { "lu\'u" , LUhU , CM_LUhU , SSM_LUhU , "end sumti qualifiers" }, /* 866 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 867 */ { "ly" , BY , CM_LY , SSM_BY2 , "l" }, /* 868 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 869 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 870 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 871 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 872 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 873 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 874 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 875 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 876 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 877 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 878 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 879 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 880 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 881 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 882 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 883 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 884 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 885 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 886 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 887 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 888 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 889 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 890 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 891 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 892 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 893 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 894 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 895 */ { "ma" , KOhA , CM_MA , SSM_KOhA7 , "sumti ?" }, /* 896 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 897 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 898 */ { "mai" , MAI , CM_MAI , SSM_MAI , "sentence ordinal" }, /* 899 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 900 */ { "mau" , BAI , CM_MAU , SSM_BAI , "exceeded by" }, /* 901 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 902 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 903 */ { "ma\'a" , KOhA , CM_MAhA , SSM_KOhA3 , "we with you" }, /* 904 */ { "ma\'e" , BAI , CM_MAhE , SSM_BAI , "material object" }, /* 905 */ { "ma\'i" , BAI , CM_MAhI , SSM_BAI , "in reference frame" }, /* 906 */ { "ma\'o" , MAhO , CM_MAhO , SSM_MAhO , "operand to operator" }, /* 907 */ { "ma\'u" , PA , CM_MAhU , SSM_PA3 , "positive number" }, /* 908 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 909 */ { "me" , ME , CM_ME , SSM_ME , "sumti to selbri" }, /* 910 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 911 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 912 */ { "mei" , MOI , CM_MEI , SSM_MOI , "cardinal selbri" }, /* 913 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 914 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 915 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 916 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 917 */ { "me\'a" , BAI , CM_MEhA , SSM_BAI , "undercut by" }, /* 918 */ { "me\'e" , BAI , CM_MEhE , SSM_BAI , "with name" }, /* 919 */ { "me\'i" , PA , CM_MEhI , SSM_PA3 , "less than" }, /* 920 */ { "me\'o" , LI , CM_MEhO , SSM_LI , "the mex" }, /* 921 */ { "me\'u" , MEhU , CM_MEhU , SSM_MEhU , "end sumti to selbri" }, /* 922 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 923 */ { "mi" , KOhA , CM_MI , SSM_KOhA3 , "me" }, /* 924 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 925 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 926 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 927 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 928 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 929 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 930 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 931 */ { "mi\'a" , KOhA , CM_MIhA , SSM_KOhA3 , "we, not you" }, /* 932 */ { "mi\'e" , COI , CM_MIhE , SSM_COI , "self-introduction" }, /* 933 */ { "mi\'i" , BIhI , CM_MIhI , SSM_BIhI , "center-range" }, /* 934 */ { "mi\'o" , KOhA , CM_MIhO , SSM_KOhA3 , "me and you" }, /* 935 */ { "mi\'u" , UI , CM_MIhU , SSM_UI3b , "ditto" }, /* 936 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 937 */ { "mo" , GOhA , CM_MO , SSM_GOhA , "bridi ?" }, /* 938 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 939 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 940 */ { "moi" , MOI , CM_MOI , SSM_MOI , "ordinal selbri" }, /* 941 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 942 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 943 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 944 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 945 */ { "mo\'a" , PA , CM_MOhA , SSM_PA4 , "too few" }, /* 946 */ { "mo\'e" , MOhE , CM_MOhE , SSM_MOhE , "sumti to operand" }, /* 947 */ { "mo\'i" , MOhI , CM_MOhI , SSM_MOhI , "space motion" }, /* 948 */ { "mo\'o" , MAI , CM_MOhO , SSM_MAI , "section ordinal" }, /* 949 */ { "mo\'u" , ZAhO , CM_MOhU , SSM_ZAhO , "completive" }, /* 950 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 951 */ { "mu" , PA , CM_MU , SSM_PA1 , "5" }, /* 952 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 953 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 954 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 955 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 956 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 957 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 958 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 959 */ { "mu\'a" , UI , CM_MUhA , SSM_UI3 , "for example" }, /* 960 */ { "mu\'e" , NU , CM_MUhE , SSM_NU1 , "point-event abstract" }, /* 961 */ { "mu\'i" , BAI , CM_MUhI , SSM_BAI , "because of motive" }, /* 962 */ { "mu\'o" , COI , CM_MUhO , SSM_COI , "over" }, /* 963 */ { "mu\'u" , BAI , CM_MUhU , SSM_BAI , "exemplified by" }, /* 964 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 965 */ { "my" , BY , CM_MY , SSM_BY2 , "m" }, /* 966 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 967 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 968 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 969 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 970 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 971 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 972 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 973 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 974 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 975 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 976 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 977 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 978 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 979 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 980 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 981 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 982 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 983 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 984 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 985 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 986 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 987 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 988 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 989 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 990 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 991 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 992 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 993 */ { "na" , NA , CM_NA , SSM_NA , "bridi negator" }, /* 994 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 995 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 996 */ { "nai" , NAI , CM_NAI , SSM_NAI , "negate last word" }, /* 997 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 998 */ { "nau" , CUhE , CM_NAU , SSM_CUhE , "reference point" }, /* 999 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1000 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1001 */ { "na\'a" , BY , CM_NAhA , SSM_BY1 , "cancel shifts" }, /* 1002 */ { "na\'e" , NAhE , CM_NAhE , SSM_NAhE , "scalar contrary" }, /* 1003 */ { "na\'i" , UI , CM_NAhI , SSM_UI3a , "metalinguistic not" }, /* 1004 */ { "na\'o" , TAhE , CM_NAhO , SSM_TAhE , "typically" }, /* 1005 */ { "na\'u" , NAhU , CM_NAhU , SSM_NAhU , "selbri to operator" }, /* 1006 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1007 */ { "ne" , GOI , CM_NE , SSM_GOI , "incidental phrase" }, /* 1008 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1009 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1010 */ { "nei" , GOhA , CM_NEI , SSM_GOhA , "current bridi" }, /* 1011 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1012 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1013 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1014 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1015 */ { "ne\'a" , FAhA , CM_NEhA , SSM_FAhA3 , "next to" }, /* 1016 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1017 */ { "ne\'i" , FAhA , CM_NEhI , SSM_FAhA3 , "within" }, /* 1018 */ { "ne\'o" , VUhU , CM_NEhO , SSM_VUhU3 , "factorial" }, /* 1019 */ { "ne\'u" , FAhA , CM_NEhU , SSM_FAhA1 , "south of" }, /* 1020 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1021 */ { "ni" , NU , CM_NI , SSM_NU , "amount abstract" }, /* 1022 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1023 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1024 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1025 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1026 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1027 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1028 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1029 */ { "ni\'a" , FAhA , CM_NIhA , SSM_FAhA2 , "below" }, /* 1030 */ { "ni\'e" , NIhE , CM_NIhE , SSM_NIhE , "selbri to operand" }, /* 1031 */ { "ni\'i" , BAI , CM_NIhI , SSM_BAI , "because of logic" }, /* 1032 */ { "ni\'o" , NIhO , CM_NIhO , SSM_NIhO , "new topic" }, /* 1033 */ { "ni\'u" , PA , CM_NIhU , SSM_PA3 , "negative number" }, /* 1034 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1035 */ { "no" , PA , CM_NO , SSM_PA1 , "0" }, /* 1036 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1037 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1038 */ { "noi" , NOI , CM_NOI , SSM_NOI , "incidental clause" }, /* 1039 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1040 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1041 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1042 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1043 */ { "no\'a" , GOhA , CM_NOhA , SSM_GOhA , "next outer bridi" }, /* 1044 */ { "no\'e" , NAhE , CM_NOhE , SSM_NAhE , "scalar midpoint not" }, /* 1045 */ { "no\'i" , NIhO , CM_NOhI , SSM_NIhO , "old topic" }, /* 1046 */ { "no\'o" , PA , CM_NOhO , SSM_PA5 , "typical value" }, /* 1047 */ { "no\'u" , GOI , CM_NOhU , SSM_GOI , "incidental identity" }, /* 1048 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1049 */ { "nu" , NU , CM_NU , SSM_NU , "event abstract" }, /* 1050 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1051 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1052 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1053 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1054 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1055 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1056 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1057 */ { "nu\'a" , NUhA , CM_NUhA , SSM_NUhA , "operator to selbri" }, /* 1058 */ { "nu\'e" , COI , CM_NUhE , SSM_COI , "promise" }, /* 1059 */ { "nu\'i" , NUhI , CM_NUhI , SSM_NUhI , "start termset" }, /* 1060 */ { "nu\'o" , CAhA , CM_NUhO , SSM_CAhA , "can but has not" }, /* 1061 */ { "nu\'u" , NUhU , CM_NUhU , SSM_NUhU , "end termset" }, /* 1062 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1063 */ { "ny" , BY , CM_NY , SSM_BY2 , "n" }, /* 1064 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1065 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1066 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1067 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1068 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1069 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1070 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1071 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1072 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1073 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1074 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1075 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1076 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1077 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1078 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1079 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1080 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1081 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1082 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1083 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1084 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1085 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1086 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1087 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1088 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1089 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1090 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1091 */ { "pa" , PA , CM_PA , SSM_PA1 , "1" }, /* 1092 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1093 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1094 */ { "pai" , PA , CM_PAI , SSM_PA5 , "pi" }, /* 1095 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1096 */ { "pau" , UI , CM_PAU , SSM_UI3a , "question follows" }, /* 1097 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1098 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1099 */ { "pa\'a" , BAI , CM_PAhA , SSM_BAI , "in addition to" }, /* 1100 */ { "pa\'e" , UI , CM_PAhE , SSM_UI3 , "justice" }, /* 1101 */ { "pa\'i" , VUhU , CM_PAhI , SSM_VUhU2 , "ratio" }, /* 1102 */ { "pa\'o" , FAhA , CM_PAhO , SSM_FAhA3 , "transfixing" }, /* 1103 */ { "pa\'u" , BAI , CM_PAhU , SSM_BAI , "having component" }, /* 1104 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1105 */ { "pe" , GOI , CM_PE , SSM_GOI , "restrictive phrase" }, /* 1106 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1107 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1108 */ { "pei" , CAI , CM_PEI , SSM_CAI , "emotion ?" }, /* 1109 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1110 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1111 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1112 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1113 */ { "pe\'a" , UI , CM_PEhA , SSM_UI6 , "start figurative" }, /* 1114 */ { "pe\'e" , PEhE , CM_PEhE , SSM_PEhE , "termset conn mark" }, /* 1115 */ { "pe\'i" , UI , CM_PEhI , SSM_UI2 , "I opine" }, /* 1116 */ { "pe\'o" , PEhO , CM_PEhO , SSM_PEhO , "fore mex operator" }, /* 1117 */ { "pe\'u" , COI , CM_PEhU , SSM_COI , "please" }, /* 1118 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1119 */ { "pi" , PA , CM_PI , SSM_PA3 , "decimal point" }, /* 1120 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1121 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1122 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1123 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1124 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1125 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1126 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1127 */ { "pi\'a" , VUhU , CM_PIhA , SSM_VUhU4 , "matrix of rows" }, /* 1128 */ { "pi\'e" , PA , CM_PIhE , SSM_PA3 , "digit separator" }, /* 1129 */ { "pi\'i" , VUhU , CM_PIhI , SSM_VUhU1 , "times" }, /* 1130 */ { "pi\'o" , BAI , CM_PIhO , SSM_BAI , "used by" }, /* 1131 */ { "pi\'u" , JOI , CM_PIhU , SSM_JOI , "cross product" }, /* 1132 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1133 */ { "po" , GOI , CM_PO , SSM_GOI , "is specific to" }, /* 1134 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1135 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1136 */ { "poi" , NOI , CM_POI , SSM_NOI , "restrictive clause" }, /* 1137 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1138 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1139 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1140 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1141 */ { "po\'a" , UI , CM_POhA , SSM_UI6 , "end figurative" }, /* 1142 */ { "po\'e" , GOI , CM_POhE , SSM_GOI , "which belongs to" }, /* 1143 */ { "po\'i" , BAI , CM_POhI , SSM_BAI , "in the sequence" }, /* 1144 */ { "po\'o" , UI , CM_POhO , SSM_UI3b , "uniquely" }, /* 1145 */ { "po\'u" , GOI , CM_POhU , SSM_GOI , "restrictive identity" }, /* 1146 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1147 */ { "pu" , PU , CM_PU , SSM_PU , "before" }, /* 1148 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1149 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1150 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1151 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1152 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1153 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1154 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1155 */ { "pu\'a" , BAI , CM_PUhA , SSM_BAI , "pleased by" }, /* 1156 */ { "pu\'e" , BAI , CM_PUhE , SSM_BAI , "by process" }, /* 1157 */ { "pu\'i" , CAhA , CM_PUhI , SSM_CAhA , "can and has" }, /* 1158 */ { "pu\'o" , ZAhO , CM_PUhO , SSM_ZAhO , "anticipative" }, /* 1159 */ { "pu\'u" , NU , CM_PUhU , SSM_NU1 , "process abstract" }, /* 1160 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1161 */ { "py" , BY , CM_PY , SSM_BY2 , "p" }, /* 1162 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1163 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1164 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1165 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1166 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1167 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1168 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1169 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1170 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1171 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1172 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1173 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1174 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1175 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1176 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1177 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1178 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1179 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1180 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1181 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1182 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1183 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1184 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1185 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1186 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1187 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1188 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1189 */ { "ra" , KOhA , CM_RA , SSM_KOhA5 , "recent sumti" }, /* 1190 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1191 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1192 */ { "rai" , BAI , CM_RAI , SSM_BAI , "with superlative" }, /* 1193 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1194 */ { "rau" , PA , CM_RAU , SSM_PA4 , "enough" }, /* 1195 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1196 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1197 */ { "ra\'a" , BAI , CM_RAhA , SSM_BAI , "pertained to by" }, /* 1198 */ { "ra\'e" , PA , CM_RAhE , SSM_PA3 , "repeating decimal" }, /* 1199 */ { "ra\'i" , BAI , CM_RAhI , SSM_BAI , "from source" }, /* 1200 */ { "ra\'o" , RAhO , CM_RAhO , SSM_RAhO , "pro-assign update" }, /* 1201 */ { "ra\'u" , UI , CM_RAhU , SSM_UI3 , "chiefly" }, /* 1202 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1203 */ { "re" , PA , CM_RE , SSM_PA1 , "2" }, /* 1204 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1205 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1206 */ { "rei" , PA , CM_REI , SSM_PA2 , "hex digit E" }, /* 1207 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1208 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1209 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1210 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1211 */ { "re\'a" , VUhU , CM_REhA , SSM_VUhU4 , "transpose" }, /* 1212 */ { "re\'e" , UI , CM_REhE , SSM_UI4 , "spiritual" }, /* 1213 */ { "re\'i" , COI , CM_REhI , SSM_COI , "ready to receive" }, /* 1214 */ { "re\'o" , FAhA , CM_REhO , SSM_FAhA3 , "adjacent to" }, /* 1215 */ { "re\'u" , ROI , CM_REhU , SSM_ROI , "ordinal tense" }, /* 1216 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1217 */ { "ri" , KOhA , CM_RI , SSM_KOhA5 , "last sumti" }, /* 1218 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1219 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1220 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1221 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1222 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1223 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1224 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1225 */ { "ri\'a" , BAI , CM_RIhA , SSM_BAI , "because of cause" }, /* 1226 */ { "ri\'e" , UI , CM_RIhE , SSM_UI5 , "release of emotion" }, /* 1227 */ { "ri\'i" , BAI , CM_RIhI , SSM_BAI , "experienced by" }, /* 1228 */ { "ri\'o" , VUhU , CM_RIhO , SSM_VUhU4 , "integral" }, /* 1229 */ { "ri\'u" , FAhA , CM_RIhU , SSM_FAhA2 , "on the right of" }, /* 1230 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1231 */ { "ro" , PA , CM_RO , SSM_PA4 , "each" }, /* 1232 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1233 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1234 */ { "roi" , ROI , CM_ROI , SSM_ROI , "quantified tense" }, /* 1235 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1236 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1237 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1238 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1239 */ { "ro\'a" , UI , CM_ROhA , SSM_UI4 , "social" }, /* 1240 */ { "ro\'e" , UI , CM_ROhE , SSM_UI4 , "mental" }, /* 1241 */ { "ro\'i" , UI , CM_ROhI , SSM_UI4 , "emotional" }, /* 1242 */ { "ro\'o" , UI , CM_ROhO , SSM_UI4 , "physical" }, /* 1243 */ { "ro\'u" , UI , CM_ROhU , SSM_UI4 , "sexual" }, /* 1244 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1245 */ { "ru" , KOhA , CM_RU , SSM_KOhA5 , "earlier sumti" }, /* 1246 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1247 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1248 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1249 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1250 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1251 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1252 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1253 */ { "ru\'a" , UI , CM_RUhA , SSM_UI2 , "I postulate" }, /* 1254 */ { "ru\'e" , CAI , CM_RUhE , SSM_CAI , "weak emotion" }, /* 1255 */ { "ru\'i" , TAhE , CM_RUhI , SSM_TAhE , "continuously" }, /* 1256 */ { "ru\'o" , BY , CM_RUhO , SSM_BY1 , "Cyrillic shift" }, /* 1257 */ { "ru\'u" , FAhA , CM_RUhU , SSM_FAhA2 , "surrounding" }, /* 1258 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1259 */ { "ry" , BY , CM_RY , SSM_BY2 , "r" }, /* 1260 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1261 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1262 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1263 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1264 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1265 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1266 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1267 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1268 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1269 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1270 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1271 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1272 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1273 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1274 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1275 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1276 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1277 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1278 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1279 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1280 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1281 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1282 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1283 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1284 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1285 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1286 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1287 */ { "sa" , SA , CM_SA , SSM_SA , "erase utterance" }, /* 1288 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1289 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1290 */ { "sai" , CAI , CM_SAI , SSM_CAI , "strong emotion" }, /* 1291 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1292 */ { "sau" , BAI , CM_SAU , SSM_BAI , "requiring" }, /* 1293 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1294 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1295 */ { "sa\'a" , UI , CM_SAhA , SSM_UI3a , "editorial insertion" }, /* 1296 */ { "sa\'e" , UI , CM_SAhE , SSM_UI3 , "precisely speaking" }, /* 1297 */ { "sa\'i" , VUhU , CM_SAhI , SSM_VUhU4 , "matrix of columns" }, /* 1298 */ { "sa\'o" , VUhU , CM_SAhO , SSM_VUhU4 , "derivative" }, /* 1299 */ { "sa\'u" , UI , CM_SAhU , SSM_UI3 , "simply speaking" }, /* 1300 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1301 */ { "se" , SE , CM_SE , SSM_SE , "2nd conversion" }, /* 1302 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1303 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1304 */ { "sei" , SEI , CM_SEI , SSM_SEI , "discursive bridi" }, /* 1305 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1306 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1307 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1308 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1309 */ { "se\'a" , UI , CM_SEhA , SSM_UI5 , "self-sufficiency" }, /* 1310 */ { "se\'e" , BY , CM_SEhE , SSM_BY1 , "character code" }, /* 1311 */ { "se\'i" , UI , CM_SEhI , SSM_UI5 , "self-oriented" }, /* 1312 */ { "se\'o" , UI , CM_SEhO , SSM_UI2 , "I know internally" }, /* 1313 */ { "se\'u" , SEhU , CM_SEhU , SSM_SEhU , "end discursive" }, /* 1314 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1315 */ { "si" , SI , CM_SI , SSM_SI , "erase word" }, /* 1316 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1317 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1318 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1319 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1320 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1321 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1322 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1323 */ { "si\'a" , UI , CM_SIhA , SSM_UI3b , "similarly" }, /* 1324 */ { "si\'e" , MOI , CM_SIhE , SSM_MOI , "portion selbri" }, /* 1325 */ { "si\'i" , VUhU , CM_SIhI , SSM_VUhU4 , "sigma summation" }, /* 1326 */ { "si\'o" , NU , CM_SIhO , SSM_NU , "concept abstract" }, /* 1327 */ { "si\'u" , BAI , CM_SIhU , SSM_BAI , "aided by" }, /* 1328 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1329 */ { "so" , PA , CM_SO , SSM_PA1 , "9" }, /* 1330 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1331 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1332 */ { "soi" , SOI , CM_SOI , SSM_SOI , "reciprocal sumti" }, /* 1333 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1334 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1335 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1336 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1337 */ { "so\'a" , PA , CM_SOhA , SSM_PA4 , "almost all" }, /* 1338 */ { "so\'e" , PA , CM_SOhE , SSM_PA4 , "most" }, /* 1339 */ { "so\'i" , PA , CM_SOhI , SSM_PA4 , "many" }, /* 1340 */ { "so\'o" , PA , CM_SOhO , SSM_PA4 , "several" }, /* 1341 */ { "so\'u" , PA , CM_SOhU , SSM_PA4 , "few" }, /* 1342 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1343 */ { "su" , SU , CM_SU , SSM_SU , "erase discourse" }, /* 1344 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1345 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1346 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1347 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1348 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1349 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1350 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1351 */ { "su\'a" , UI , CM_SUhA , SSM_UI2 , "I generalize" }, /* 1352 */ { "su\'e" , PA , CM_SUhE , SSM_PA4 , "at most" }, /* 1353 */ { "su\'i" , VUhU , CM_SUhI , SSM_VUhU1 , "plus" }, /* 1354 */ { "su\'o" , PA , CM_SUhO , SSM_PA4 , "at least" }, /* 1355 */ { "su\'u" , NU , CM_SUhU , SSM_NU , "unspecif abstract" }, /* 1356 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1357 */ { "sy" , BY , CM_SY , SSM_BY2 , "s" }, /* 1358 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1359 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1360 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1361 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1362 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1363 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1364 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1365 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1366 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1367 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1368 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1369 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1370 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1371 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1372 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1373 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1374 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1375 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1376 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1377 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1378 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1379 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1380 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1381 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1382 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1383 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1384 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1385 */ { "ta" , KOhA , CM_TA , SSM_KOhA6 , "that there" }, /* 1386 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1387 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1388 */ { "tai" , BAI , CM_TAI , SSM_BAI , "in form" }, /* 1389 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1390 */ { "tau" , LAU , CM_TAU , SSM_LAU , "shift next lerfu" }, /* 1391 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1392 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1393 */ { "ta\'a" , COI , CM_TAhA , SSM_COI , "interruption" }, /* 1394 */ { "ta\'e" , TAhE , CM_TAhE , SSM_TAhE , "habitually" }, /* 1395 */ { "ta\'i" , BAI , CM_TAhI , SSM_BAI , "by method" }, /* 1396 */ { "ta\'o" , UI , CM_TAhO , SSM_UI3 , "by the way" }, /* 1397 */ { "ta\'u" , UI , CM_TAhU , SSM_UI3a , "making a tanru" }, /* 1398 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1399 */ { "te" , SE , CM_TE , SSM_SE , "3rd conversion" }, /* 1400 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1401 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1402 */ { "tei" , TEI , CM_TEI , SSM_TEI , "composite lerfu" }, /* 1403 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1404 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1405 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1406 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1407 */ { "te\'a" , VUhU , CM_TEhA , SSM_VUhU2 , "to the power" }, /* 1408 */ { "te\'e" , FAhA , CM_TEhE , SSM_FAhA3 , "bordering" }, /* 1409 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1410 */ { "te\'o" , PA , CM_TEhO , SSM_PA5 , "exponential e" }, /* 1411 */ { "te\'u" , TEhU , CM_TEhU , SSM_TEhU , "end mex converters" }, /* 1412 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1413 */ { "ti" , KOhA , CM_TI , SSM_KOhA6 , "this here" }, /* 1414 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1415 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1416 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1417 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1418 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1419 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1420 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1421 */ { "ti\'a" , FAhA , CM_TIhA , SSM_FAhA2 , "behind" }, /* 1422 */ { "ti\'e" , UI , CM_TIhE , SSM_UI2 , "I hear" }, /* 1423 */ { "ti\'i" , BAI , CM_TIhI , SSM_BAI , "suggested by" }, /* 1424 */ { "ti\'o" , SEI , CM_TIhO , SSM_SEI , "mex precedence" }, /* 1425 */ { "ti\'u" , BAI , CM_TIhU , SSM_BAI , "associated with time" }, /* 1426 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1427 */ { "to" , TO , CM_TO , SSM_TO , "start parenthesis" }, /* 1428 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1429 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1430 */ { "toi" , TOI , CM_TOI , SSM_TOI , "end parenthesis" }, /* 1431 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1432 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1433 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1434 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1435 */ { "to\'a" , BY , CM_TOhA , SSM_BY1 , "lower-case shift" }, /* 1436 */ { "to\'e" , NAhE , CM_TOhE , SSM_NAhE , "polar opposite" }, /* 1437 */ { "to\'i" , TO , CM_TOhI , SSM_TO , "editorial unquote" }, /* 1438 */ { "to\'o" , FAhA , CM_TOhO , SSM_FAhA4 , "away from point" }, /* 1439 */ { "to\'u" , UI , CM_TOhU , SSM_UI3 , "in brief" }, /* 1440 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1441 */ { "tu" , KOhA , CM_TU , SSM_KOhA6 , "that yonder" }, /* 1442 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1443 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1444 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1445 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1446 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1447 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1448 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1449 */ { "tu\'a" , LAhE , CM_TUhA , SSM_LAhE , "the bridi implied by" }, /* 1450 */ { "tu\'e" , TUhE , CM_TUhE , SSM_TUhE , "start text scope" }, /* 1451 */ { "tu\'i" , BAI , CM_TUhI , SSM_BAI , "associated with site" }, /* 1452 */ { "tu\'o" , PA , CM_TUhO , SSM_PA5 , "null operand" }, /* 1453 */ { "tu\'u" , TUhU , CM_TUhU , SSM_TUhU , "end text scope" }, /* 1454 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1455 */ { "ty" , BY , CM_TY , SSM_BY2 , "t" }, /* 1456 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1457 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1458 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1459 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1460 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1461 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1462 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1463 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1464 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1465 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1466 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1467 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1468 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1469 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1470 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1471 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1472 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1473 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1474 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1475 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1476 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1477 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1478 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1479 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1480 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1481 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1482 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1483 */ { "va" , VA , CM_VA , SSM_VA , "there at" }, /* 1484 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1485 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1486 */ { "vai" , PA , CM_VAI , SSM_PA2 , "hex digit F" }, /* 1487 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1488 */ { "vau" , VAU , CM_VAU , SSM_VAU , "end simple bridi" }, /* 1489 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1490 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1491 */ { "va\'a" , VUhU , CM_VAhA , SSM_VUhU3 , "additive inverse" }, /* 1492 */ { "va\'e" , MOI , CM_MOI , SSM_MOI , "scale selbri" }, /* 1493 */ { "va\'i" , UI , CM_VAhI , SSM_UI3 , "in other words" }, /* 1494 */ { "va\'o" , BAI , CM_VAhO , SSM_BAI , "under conditions" }, /* 1495 */ { "va\'u" , BAI , CM_VAhU , SSM_BAI , "benefiting from" }, /* 1496 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1497 */ { "ve" , SE , CM_VE , SSM_SE , "4th conversion" }, /* 1498 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1499 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1500 */ { "vei" , VEI , CM_VEI , SSM_VEI , "left bracket" }, /* 1501 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1502 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1503 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1504 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1505 */ { "ve\'a" , VEhA , CM_VEhA , SSM_VEhA , "small space interval" }, /* 1506 */ { "ve\'e" , VEhA , CM_VEhE , SSM_VEhA , "whole space interval" }, /* 1507 */ { "ve\'i" , VEhA , CM_VEhI , SSM_VEhA , "tiny space interval" }, /* 1508 */ { "ve\'o" , VEhO , CM_VEhO , SSM_VEhO , "right bracket" }, /* 1509 */ { "ve\'u" , VEhA , CM_VEhU , SSM_VEhA , "big space interval" }, /* 1510 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1511 */ { "vi" , VA , CM_VI , SSM_VA , "here at" }, /* 1512 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1513 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1514 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1515 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1516 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1517 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1518 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1519 */ { "vi\'a" , VIhA , CM_VIhA , SSM_VIhA , "2-space interval" }, /* 1520 */ { "vi\'e" , VIhA , CM_VIhE , SSM_VIhA , "4-space interval" }, /* 1521 */ { "vi\'i" , VIhA , CM_VIhI , SSM_VIhA , "1-space interval" }, /* 1522 */ { "vi\'o" , COI , CM_VIhO , SSM_COI , "wilco" }, /* 1523 */ { "vi\'u" , VIhA , CM_VIhU , SSM_VIhA , "3-space interval" }, /* 1524 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1525 */ { "vo" , PA , CM_VO , SSM_PA1 , "4" }, /* 1526 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1527 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1528 */ { "voi" , NOI , CM_VOI , SSM_NOI , "descriptive clause" }, /* 1529 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1530 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1531 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1532 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1533 */ { "vo\'a" , KOhA , CM_VOhA , SSM_KOhA4 , "x1 it" }, /* 1534 */ { "vo\'e" , KOhA , CM_VOhE , SSM_KOhA4 , "x2 it" }, /* 1535 */ { "vo\'i" , KOhA , CM_VOhI , SSM_KOhA4 , "x3 it" }, /* 1536 */ { "vo\'o" , KOhA , CM_VOhO , SSM_KOhA4 , "x4 it" }, /* 1537 */ { "vo\'u" , KOhA , CM_VOhU , SSM_KOhA4 , "x5 it" }, /* 1538 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1539 */ { "vu" , VA , CM_VU , SSM_VA , "yonder at" }, /* 1540 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1541 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1542 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1543 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1544 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1545 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1546 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1547 */ { "vu\'a" , FAhA , CM_VUhA , SSM_FAhA1 , "west of" }, /* 1548 */ { "vu\'e" , UI , CM_VUhE , SSM_UI5 , "virtue" }, /* 1549 */ { "vu\'i" , LAhE , CM_VUhI , SSM_LAhE , "the sequence of" }, /* 1550 */ { "vu\'o" , VUhO , CM_VUhO , SSM_VUhO , "long scope relative" }, /* 1551 */ { "vu\'u" , VUhU , CM_VUhU , SSM_VUhU1 , "minus" }, /* 1552 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1553 */ { "vy" , BY , CM_VY , SSM_BY2 , "v" }, /* 1554 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1555 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1556 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1557 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1558 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1559 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1560 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1561 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1562 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1563 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1564 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1565 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1566 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1567 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1568 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1569 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1570 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1571 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1572 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1573 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1574 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1575 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1576 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1577 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1578 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1579 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1580 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1581 */ { "xa" , PA , CM_XA , SSM_PA1 , "6" }, /* 1582 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1583 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1584 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1585 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1586 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1587 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1588 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1589 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1590 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1591 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1592 */ { "xa\'o" , ZAhO , CM_XAhO , SSM_ZAhO , "infrafective" }, /* 1593 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1594 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1595 */ { "xe" , SE , CM_XE , SSM_SE , "5th conversion" }, /* 1596 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1597 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1598 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1599 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1600 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1601 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1602 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1603 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1604 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1605 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1606 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1607 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1608 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1609 */ { "xi" , XI , CM_XI , SSM_XI , "subscript" }, /* 1610 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1611 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1612 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1613 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1614 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1615 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1616 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1617 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1618 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1619 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1620 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1621 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1622 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1623 */ { "xo" , PA , CM_XO , SSM_PA5 , "number ?" }, /* 1624 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1625 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1626 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1627 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1628 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1629 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1630 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1631 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1632 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1633 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1634 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1635 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1636 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1637 */ { "xu" , UI , CM_XU , SSM_UI6 , "true-false ?" }, /* 1638 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1639 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1640 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1641 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1642 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1643 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1644 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1645 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1646 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1647 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1648 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1649 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1650 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1651 */ { "xy" , BY , CM_XY , SSM_BY2 , "x" }, /* 1652 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1653 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1654 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1655 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1656 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1657 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1658 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1659 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1660 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1661 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1662 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1663 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1664 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1665 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1666 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1667 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1668 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1669 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1670 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1671 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1672 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1673 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1674 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1675 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1676 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1677 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1678 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1679 */ { "za" , ZI , CM_ZA , SSM_ZI , "medium time" }, /* 1680 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1681 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1682 */ { "zai" , LAU , CM_ZAI , SSM_LAU , "select alphabet" }, /* 1683 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1684 */ { "zau" , BAI , CM_ZAU , SSM_BAI , "approved by" }, /* 1685 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1686 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1687 */ { "za\'a" , UI , CM_ZAhA , SSM_UI2 , "I observe" }, /* 1688 */ { "za\'e" , BAhE , CM_ZAhE , SSM_BAhE , "nonce-word next" }, /* 1689 */ { "za\'i" , NU , CM_ZAhI , SSM_NU1 , "state abstract" }, /* 1690 */ { "za\'o" , ZAhO , CM_ZAhO , SSM_ZAhO , "superfective" }, /* 1691 */ { "za\'u" , PA , CM_ZAhU , SSM_PA3 , "greater than" }, /* 1692 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1693 */ { "ze" , PA , CM_ZE , SSM_PA1 , "7" }, /* 1694 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1695 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1696 */ { "zei" , ZEI , CM_ZEI , SSM_ZEI , "lujvo glue" }, /* 1697 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1698 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1699 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1700 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1701 */ { "ze\'a" , ZEhA , CM_ZEhA , SSM_ZEhA , "medium time interval" }, /* 1702 */ { "ze\'e" , ZEhA , CM_ZEhE , SSM_ZEhA , "whole time interval" }, /* 1703 */ { "ze\'i" , ZEhA , CM_ZEhI , SSM_ZEhA , "short time interval" }, /* 1704 */ { "ze\'o" , FAhA , CM_ZEhO , SSM_FAhA4 , "outward" }, /* 1705 */ { "ze\'u" , ZEhA , CM_ZEhU , SSM_ZEhA , "long time interval" }, /* 1706 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1707 */ { "zi" , ZI , CM_ZI , SSM_ZI , "short time" }, /* 1708 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1709 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1710 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1711 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1712 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1713 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1714 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1715 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1716 */ { "zi\'e" , ZIhE , CM_ZIhE , SSM_ZIhE , "rel clause joiner" }, /* 1717 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1718 */ { "zi\'o" , KOhA , CM_ZIhO , SSM_KOhA7 , "nonexistent it" }, /* 1719 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1720 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1721 */ { "zo" , ZO , CM_ZO , SSM_ZO , "1-word quote" }, /* 1722 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1723 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1724 */ { "zoi" , ZOI , CM_ZOI , SSM_ZOI , "non-Lojban quote" }, /* 1725 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1726 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1727 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1728 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1729 */ { "zo\'a" , FAhA , CM_ZOhA , SSM_FAhA4 , "tangential to" }, /* 1730 */ { "zo\'e" , KOhA , CM_ZOhE , SSM_KOhA7 , "unspecif it" }, /* 1731 */ { "zo\'i" , FAhA , CM_ZOhI , SSM_FAhA4 , "inward" }, /* 1732 */ { "zo\'o" , UI , CM_ZOhO , SSM_UI5 , "humorously" }, /* 1733 */ { "zo\'u" , ZOhU , CM_ZOhU , SSM_ZOhU , "end prenex" }, /* 1734 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1735 */ { "zu" , ZI , CM_ZU , SSM_ZI , "long time" }, /* 1736 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1737 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1738 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1739 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1740 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1741 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1742 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1743 */ { "zu\'a" , FAhA , CM_ZUhA , SSM_FAhA2 , "on the left of" }, /* 1744 */ { "zu\'e" , BAI , CM_ZUhE , SSM_BAI , "with actor" }, /* 1745 */ { "zu\'i" , KOhA , CM_ZUhI , SSM_KOhA7 , "typical it" }, /* 1746 */ { "zu\'o" , NU , CM_ZUhO , SSM_NU1 , "activity abstract" }, /* 1747 */ { "zu\'u" , UI , CM_ZUhU , SSM_UI3 , "on the one hand" }, /* 1748 */ { "" , UNKNOWN, CM_UNKNOWN , SSM_UNKNOWN , "" }, /* 1749 */ { "zy" , BY , CM_ZY , SSM_BY2 , "z" } /* 1750 */ }; char *selmao_names[] = { "A", "BAI", "BAhE", "BE", "BEI", "BEhO", "BIhI", "BO", "BOI", "BU", "BY1", "BY2", "CAI", "CAhA", "CEI", "CO", "COI", "CU", "CUhE", "DAhO", "DOI", "DOhU", "FA", "FAhA1", "FAhA2", "FAhA3", "FAhA4", "FAhO", "FEhE", "FEhU", "FIhO", "FOI", "FUhA", "FUhE", "FUhO", "GA", "GAhO", "GEhU", "GI", "GIhA", "GOI", "GOhA", "GUhA", "I", "JA", "JAI", "JOI", "JOhI", "KE", "KEI", "KEhE", "KI", "KOhA1", "KOhA2", "KOhA3", "KOhA4", "KOhA5", "KOhA6", "KOhA7", "KU", "KUhE", "KUhO", "LA", "LAU", "LAhE", "LE", "LEhU", "LI", "LIhU", "LOhO", "LOhU", "LU", "LUhU", "MAI", "MAhO", "ME", "MEhU", "MOI", "MOhE", "MOhI", "NA", "NAI", "NAhE", "NAhU", "NIhE", "NIhO", "NOI", "NU", "NU1", "NUhA", "NUhI", "NUhU", "PA1", "PA2", "PA3", "PA4", "PA5", "PEhA", "PEhO", "POhA", "PU", "RAhO", "ROI", "SA", "SE", "SEI", "SEhU", "SI", "SOI", "SU", "TAhE", "TEI", "TEhU", "TO", "TOI", "TUhE", "TUhU", "UI1", "UI2", "UI3", "UI3a", "UI3b", "UI4", "UI5", "UI6", "UI7", "VA", "VAU", "VEI", "VEhA", "VEhO", "VIhA", "VUhO", "VUhU0", "VUhU1", "VUhU2", "VUhU3", "VUhU4", "XI", "Y", "ZAhO", "ZEI", "ZEhA", "ZI", "ZIhE", "ZO", "ZOI", "ZOhU", /* Codes added manually to bring old cmavo file up to date */ "BIhE", "CEhE", "KOhA8", "PEhE" }; jbofihe-0.38/cmavotab.h100644 765 764 33725 7350750735 14114 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/cmavotab.h,v 1.4 2001/08/08 21:33:08 richard Exp $ Definition of the record type used for the cmavo table. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef CMAVOTAB_H #define CMAVOTAB_H /*+ To stop multiple inclusions. +*/ typedef enum { CM_UNKNOWN = -1, CM_A = 14, CM_AI = 17, CM_AU = 19, CM_AhA = 22, CM_AhE = 23, CM_AhI = 24, CM_AhO = 25, CM_AhU = 26, CM_E = 28, CM_EI = 31, CM_EhA = 36, CM_EhE = 37, CM_EhI = 38, CM_EhO = 39, CM_EhU = 40, CM_I = 42, CM_IA = 43, CM_IE = 44, CM_II = 45, CM_IO = 46, CM_IU = 47, CM_IhA = 50, CM_IhE = 51, CM_IhI = 52, CM_IhO = 53, CM_IhU = 54, CM_O = 56, CM_OI = 59, CM_OhA = 64, CM_OhE = 65, CM_OhI = 66, CM_OhO = 67, CM_OhU = 68, CM_U = 70, CM_UA = 71, CM_UE = 72, CM_UI = 73, CM_UO = 74, CM_UU = 75, CM_UhA = 78, CM_UhE = 79, CM_UhI = 80, CM_UhO = 81, CM_UhU = 82, CM_Y = 84, CM_YhY = 97, CM_BA = 112, CM_BAI = 115, CM_BAU = 117, CM_BAhA = 120, CM_BAhE = 121, CM_BAhI = 122, CM_BAhO = 123, CM_BAhU = 124, CM_BE = 126, CM_BEI = 129, CM_BEhA = 134, CM_BEhE = 135, CM_BEhI = 136, CM_BEhO = 137, CM_BEhU = 138, CM_BI = 140, CM_BIhE = 149, CM_BIhI = 150, CM_BIhO = 151, CM_BIhU = 152, CM_BO = 154, CM_BOI = 157, CM_BU = 168, CM_BUhA = 176, CM_BUhE = 177, CM_BUhI = 178, CM_BUhO = 179, CM_BUhU = 180, CM_BY = 182, CM_CA = 210, CM_CAI = 213, CM_CAU = 215, CM_CAhA = 218, CM_CAhE = 219, CM_CAhI = 220, CM_CAhO = 221, CM_CAhU = 222, CM_CE = 224, CM_CEI = 227, CM_CEhA = 232, CM_CEhE = 233, CM_CEhI = 234, CM_CEhO = 235, CM_CEhU = 236, CM_CI = 238, CM_CIhE = 247, CM_CIhI = 248, CM_CIhO = 249, CM_CIhU = 250, CM_CO = 252, CM_COI = 255, CM_COhA = 260, CM_COhE = 261, CM_COhI = 262, CM_COhO = 263, CM_COhU = 264, CM_CU = 266, CM_CUhA = 274, CM_CUhE = 275, CM_CUhI = 276, CM_CUhO = 277, CM_CUhU = 278, CM_CY = 280, CM_DA = 308, CM_DAI = 311, CM_DAU = 313, CM_DAhA = 316, CM_DAhE = 317, CM_DAhI = 318, CM_DAhO = 319, CM_DAhU = 320, CM_DE = 322, CM_DEI = 325, CM_DEhA = 330, CM_DEhE = 331, CM_DEhI = 332, CM_DEhO = 333, CM_DEhU = 334, CM_DI = 336, CM_DIhA = 344, CM_DIhE = 345, CM_DIhI = 346, CM_DIhO = 347, CM_DIhU = 348, CM_DO = 350, CM_DOI = 353, CM_DOhA = 358, CM_DOhE = 359, CM_DOhI = 360, CM_DOhO = 361, CM_DOhU = 362, CM_DU = 364, CM_DUhA = 372, CM_DUhE = 373, CM_DUhI = 374, CM_DUhO = 375, CM_DUhU = 376, CM_DY = 378, CM_FA = 406, CM_FAI = 409, CM_FAU = 411, CM_FAhA = 414, CM_FAhE = 415, CM_FAhI = 416, CM_FAhO = 417, CM_FAhU = 418, CM_FE = 420, CM_FEI = 423, CM_FEhA = 428, CM_FEhE = 429, CM_FEhI = 430, CM_FEhO = 431, CM_FEhU = 432, CM_FI = 434, CM_FIhA = 442, CM_FIhE = 443, CM_FIhI = 444, CM_FIhO = 445, CM_FIhU = 446, CM_FO = 448, CM_FOI = 451, CM_FOhA = 456, CM_FOhE = 457, CM_FOhI = 458, CM_FOhO = 459, CM_FOhU = 460, CM_FU = 462, CM_FUhA = 470, CM_FUhE = 471, CM_FUhI = 472, CM_FUhO = 473, CM_FUhU = 474, CM_FY = 476, CM_GA = 504, CM_GAI = 507, CM_GAU = 509, CM_GAhA = 512, CM_GAhE = 513, CM_GAhI = 514, CM_GAhO = 515, CM_GAhU = 516, CM_GE = 518, CM_GEI = 521, CM_GEhA = 526, CM_GEhE = 527, CM_GEhI = 528, CM_GEhO = 529, CM_GEhU = 530, CM_GI = 532, CM_GIhA = 540, CM_GIhE = 541, CM_GIhI = 542, CM_GIhO = 543, CM_GIhU = 544, CM_GO = 546, CM_GOI = 549, CM_GOhA = 554, CM_GOhE = 555, CM_GOhI = 556, CM_GOhO = 557, CM_GOhU = 558, CM_GU = 560, CM_GUhA = 568, CM_GUhE = 569, CM_GUhI = 570, CM_GUhO = 571, CM_GUhU = 572, CM_GY = 574, CM_JA = 602, CM_JAI = 605, CM_JAU = 607, CM_JAhA = 610, CM_JAhE = 611, CM_JAhI = 612, CM_JAhO = 613, CM_JE = 616, CM_JEI = 619, CM_JEhA = 624, CM_JEhE = 625, CM_JEhI = 626, CM_JEhO = 627, CM_JEhU = 628, CM_JI = 630, CM_JIhA = 638, CM_JIhE = 639, CM_JIhI = 640, CM_JIhO = 641, CM_JIhU = 642, CM_JO = 644, CM_JOI = 647, CM_JOhA = 652, CM_JOhE = 653, CM_JOhI = 654, CM_JOhO = 655, CM_JOhU = 656, CM_JU = 658, CM_JUhA = 666, CM_JUhE = 667, CM_JUhI = 668, CM_JUhO = 669, CM_JUhU = 670, CM_JY = 672, CM_KA = 700, CM_KAI = 703, CM_KAU = 705, CM_KAhA = 708, CM_KAhE = 709, CM_KAhI = 710, CM_KAhO = 711, CM_KAhU = 712, CM_KE = 714, CM_KEI = 717, CM_KEhA = 722, CM_KEhE = 723, CM_KEhI = 724, CM_KEhO = 725, CM_KEhU = 726, CM_KI = 728, CM_KIhA = 736, CM_KIhE = 737, CM_KIhI = 738, CM_KIhO = 739, CM_KIhU = 740, CM_KO = 742, CM_KOI = 745, CM_KOhA = 750, CM_KOhE = 751, CM_KOhI = 752, CM_KOhO = 753, CM_KOhU = 754, CM_KU = 756, CM_KUhA = 764, CM_KUhE = 765, CM_KUhI = 766, CM_KUhO = 767, CM_KUhU = 768, CM_KY = 770, CM_LA = 798, CM_LAI = 801, CM_LAU = 803, CM_LAhA = 806, CM_LAhE = 807, CM_LAhI = 808, CM_LAhO = 809, CM_LAhU = 810, CM_LE = 812, CM_LEI = 815, CM_LEhA = 820, CM_LEhE = 821, CM_LEhI = 822, CM_LEhO = 823, CM_LEhU = 824, CM_LI = 826, CM_LIhA = 834, CM_LIhE = 835, CM_LIhI = 836, CM_LIhO = 837, CM_LIhU = 838, CM_LO = 840, CM_LOI = 843, CM_LOhA = 848, CM_LOhE = 849, CM_LOhI = 850, CM_LOhO = 851, CM_LOhU = 852, CM_LU = 854, CM_LUhA = 862, CM_LUhE = 863, CM_LUhI = 864, CM_LUhO = 865, CM_LUhU = 866, CM_LY = 868, CM_MA = 896, CM_MAI = 899, CM_MAU = 901, CM_MAhA = 904, CM_MAhE = 905, CM_MAhI = 906, CM_MAhO = 907, CM_MAhU = 908, CM_ME = 910, CM_MEI = 913, CM_MEhA = 918, CM_MEhE = 919, CM_MEhI = 920, CM_MEhO = 921, CM_MEhU = 922, CM_MI = 924, CM_MIhA = 932, CM_MIhE = 933, CM_MIhI = 934, CM_MIhO = 935, CM_MIhU = 936, CM_MO = 938, CM_MOI = 941, CM_MOhA = 946, CM_MOhE = 947, CM_MOhI = 948, CM_MOhO = 949, CM_MOhU = 950, CM_MU = 952, CM_MUhA = 960, CM_MUhE = 961, CM_MUhI = 962, CM_MUhO = 963, CM_MUhU = 964, CM_MY = 966, CM_NA = 994, CM_NAI = 997, CM_NAU = 999, CM_NAhA = 1002, CM_NAhE = 1003, CM_NAhI = 1004, CM_NAhO = 1005, CM_NAhU = 1006, CM_NE = 1008, CM_NEI = 1011, CM_NEhA = 1016, CM_NEhI = 1018, CM_NEhO = 1019, CM_NEhU = 1020, CM_NI = 1022, CM_NIhA = 1030, CM_NIhE = 1031, CM_NIhI = 1032, CM_NIhO = 1033, CM_NIhU = 1034, CM_NO = 1036, CM_NOI = 1039, CM_NOhA = 1044, CM_NOhE = 1045, CM_NOhI = 1046, CM_NOhO = 1047, CM_NOhU = 1048, CM_NU = 1050, CM_NUhA = 1058, CM_NUhE = 1059, CM_NUhI = 1060, CM_NUhO = 1061, CM_NUhU = 1062, CM_NY = 1064, CM_PA = 1092, CM_PAI = 1095, CM_PAU = 1097, CM_PAhA = 1100, CM_PAhE = 1101, CM_PAhI = 1102, CM_PAhO = 1103, CM_PAhU = 1104, CM_PE = 1106, CM_PEI = 1109, CM_PEhA = 1114, CM_PEhE = 1115, CM_PEhI = 1116, CM_PEhO = 1117, CM_PEhU = 1118, CM_PI = 1120, CM_PIhA = 1128, CM_PIhE = 1129, CM_PIhI = 1130, CM_PIhO = 1131, CM_PIhU = 1132, CM_PO = 1134, CM_POI = 1137, CM_POhA = 1142, CM_POhE = 1143, CM_POhI = 1144, CM_POhO = 1145, CM_POhU = 1146, CM_PU = 1148, CM_PUhA = 1156, CM_PUhE = 1157, CM_PUhI = 1158, CM_PUhO = 1159, CM_PUhU = 1160, CM_PY = 1162, CM_RA = 1190, CM_RAI = 1193, CM_RAU = 1195, CM_RAhA = 1198, CM_RAhE = 1199, CM_RAhI = 1200, CM_RAhO = 1201, CM_RAhU = 1202, CM_RE = 1204, CM_REI = 1207, CM_REhA = 1212, CM_REhE = 1213, CM_REhI = 1214, CM_REhO = 1215, CM_REhU = 1216, CM_RI = 1218, CM_RIhA = 1226, CM_RIhE = 1227, CM_RIhI = 1228, CM_RIhO = 1229, CM_RIhU = 1230, CM_RO = 1232, CM_ROI = 1235, CM_ROhA = 1240, CM_ROhE = 1241, CM_ROhI = 1242, CM_ROhO = 1243, CM_ROhU = 1244, CM_RU = 1246, CM_RUhA = 1254, CM_RUhE = 1255, CM_RUhI = 1256, CM_RUhO = 1257, CM_RUhU = 1258, CM_RY = 1260, CM_SA = 1288, CM_SAI = 1291, CM_SAU = 1293, CM_SAhA = 1296, CM_SAhE = 1297, CM_SAhI = 1298, CM_SAhO = 1299, CM_SAhU = 1300, CM_SE = 1302, CM_SEI = 1305, CM_SEhA = 1310, CM_SEhE = 1311, CM_SEhI = 1312, CM_SEhO = 1313, CM_SEhU = 1314, CM_SI = 1316, CM_SIhA = 1324, CM_SIhE = 1325, CM_SIhI = 1326, CM_SIhO = 1327, CM_SIhU = 1328, CM_SO = 1330, CM_SOI = 1333, CM_SOhA = 1338, CM_SOhE = 1339, CM_SOhI = 1340, CM_SOhO = 1341, CM_SOhU = 1342, CM_SU = 1344, CM_SUhA = 1352, CM_SUhE = 1353, CM_SUhI = 1354, CM_SUhO = 1355, CM_SUhU = 1356, CM_SY = 1358, CM_TA = 1386, CM_TAI = 1389, CM_TAU = 1391, CM_TAhA = 1394, CM_TAhE = 1395, CM_TAhI = 1396, CM_TAhO = 1397, CM_TAhU = 1398, CM_TE = 1400, CM_TEI = 1403, CM_TEhA = 1408, CM_TEhE = 1409, CM_TEhO = 1411, CM_TEhU = 1412, CM_TI = 1414, CM_TIhA = 1422, CM_TIhE = 1423, CM_TIhI = 1424, CM_TIhO = 1425, CM_TIhU = 1426, CM_TO = 1428, CM_TOI = 1431, CM_TOhA = 1436, CM_TOhE = 1437, CM_TOhI = 1438, CM_TOhO = 1439, CM_TOhU = 1440, CM_TU = 1442, CM_TUhA = 1450, CM_TUhE = 1451, CM_TUhI = 1452, CM_TUhO = 1453, CM_TUhU = 1454, CM_TY = 1456, CM_VA = 1484, CM_VAI = 1487, CM_VAU = 1489, CM_VAhA = 1492, CM_VAhI = 1494, CM_VAhO = 1495, CM_VAhU = 1496, CM_VE = 1498, CM_VEI = 1501, CM_VEhA = 1506, CM_VEhE = 1507, CM_VEhI = 1508, CM_VEhO = 1509, CM_VEhU = 1510, CM_VI = 1512, CM_VIhA = 1520, CM_VIhE = 1521, CM_VIhI = 1522, CM_VIhO = 1523, CM_VIhU = 1524, CM_VO = 1526, CM_VOI = 1529, CM_VOhA = 1534, CM_VOhE = 1535, CM_VOhI = 1536, CM_VOhO = 1537, CM_VOhU = 1538, CM_VU = 1540, CM_VUhA = 1548, CM_VUhE = 1549, CM_VUhI = 1550, CM_VUhO = 1551, CM_VUhU = 1552, CM_VY = 1554, CM_XA = 1582, CM_XAhO = 1593, CM_XE = 1596, CM_XI = 1610, CM_XO = 1624, CM_XU = 1638, CM_XY = 1652, CM_ZA = 1680, CM_ZAI = 1683, CM_ZAU = 1685, CM_ZAhA = 1688, CM_ZAhE = 1689, CM_ZAhI = 1690, CM_ZAhO = 1691, CM_ZAhU = 1692, CM_ZE = 1694, CM_ZEI = 1697, CM_ZEhA = 1702, CM_ZEhE = 1703, CM_ZEhI = 1704, CM_ZEhO = 1705, CM_ZEhU = 1706, CM_ZI = 1708, CM_ZIhE = 1717, CM_ZIhO = 1719, CM_ZO = 1722, CM_ZOI = 1725, CM_ZOhA = 1730, CM_ZOhE = 1731, CM_ZOhI = 1732, CM_ZOhO = 1733, CM_ZOhU = 1734, CM_ZU = 1736, CM_ZUhA = 1744, CM_ZUhE = 1745, CM_ZUhI = 1746, CM_ZUhO = 1747, CM_ZUhU = 1748, CM_ZY = 1750 } __attribute__ ((packed)) CmavoCodes; typedef enum { SSM_UNKNOWN = -1, SSM_A = 0, SSM_BAI = 1, SSM_BAhE = 2, SSM_BE = 3, SSM_BEI = 4, SSM_BEhO = 5, SSM_BIhI = 6, SSM_BO = 7, SSM_BOI = 8, SSM_BU = 9, SSM_BY1 = 10, SSM_BY2 = 11, SSM_CAI = 12, SSM_CAhA = 13, SSM_CEI = 14, SSM_CO = 15, SSM_COI = 16, SSM_CU = 17, SSM_CUhE = 18, SSM_DAhO = 19, SSM_DOI = 20, SSM_DOhU = 21, SSM_FA = 22, SSM_FAhA1 = 23, SSM_FAhA2 = 24, SSM_FAhA3 = 25, SSM_FAhA4 = 26, SSM_FAhO = 27, SSM_FEhE = 28, SSM_FEhU = 29, SSM_FIhO = 30, SSM_FOI = 31, SSM_FUhA = 32, SSM_FUhE = 33, SSM_FUhO = 34, SSM_GA = 35, SSM_GAhO = 36, SSM_GEhU = 37, SSM_GI = 38, SSM_GIhA = 39, SSM_GOI = 40, SSM_GOhA = 41, SSM_GUhA = 42, SSM_I = 43, SSM_JA = 44, SSM_JAI = 45, SSM_JOI = 46, SSM_JOhI = 47, SSM_KE = 48, SSM_KEI = 49, SSM_KEhE = 50, SSM_KI = 51, SSM_KOhA1 = 52, SSM_KOhA2 = 53, SSM_KOhA3 = 54, SSM_KOhA4 = 55, SSM_KOhA5 = 56, SSM_KOhA6 = 57, SSM_KOhA7 = 58, SSM_KU = 59, SSM_KUhE = 60, SSM_KUhO = 61, SSM_LA = 62, SSM_LAU = 63, SSM_LAhE = 64, SSM_LE = 65, SSM_LEhU = 66, SSM_LI = 67, SSM_LIhU = 68, SSM_LOhO = 69, SSM_LOhU = 70, SSM_LU = 71, SSM_LUhU = 72, SSM_MAI = 73, SSM_MAhO = 74, SSM_ME = 75, SSM_MEhU = 76, SSM_MOI = 77, SSM_MOhE = 78, SSM_MOhI = 79, SSM_NA = 80, SSM_NAI = 81, SSM_NAhE = 82, SSM_NAhU = 83, SSM_NIhE = 84, SSM_NIhO = 85, SSM_NOI = 86, SSM_NU = 87, SSM_NU1 = 88, SSM_NUhA = 89, SSM_NUhI = 90, SSM_NUhU = 91, SSM_PA1 = 92, SSM_PA2 = 93, SSM_PA3 = 94, SSM_PA4 = 95, SSM_PA5 = 96, SSM_PEhA = 97, SSM_PEhO = 98, SSM_POhA = 99, SSM_PU = 100, SSM_RAhO = 101, SSM_ROI = 102, SSM_SA = 103, SSM_SE = 104, SSM_SEI = 105, SSM_SEhU = 106, SSM_SI = 107, SSM_SOI = 108, SSM_SU = 109, SSM_TAhE = 110, SSM_TEI = 111, SSM_TEhU = 112, SSM_TO = 113, SSM_TOI = 114, SSM_TUhE = 115, SSM_TUhU = 116, SSM_UI1 = 117, SSM_UI2 = 118, SSM_UI3 = 119, SSM_UI3a = 120, SSM_UI3b = 121, SSM_UI4 = 122, SSM_UI5 = 123, SSM_UI6 = 124, SSM_UI7 = 125, SSM_VA = 126, SSM_VAU = 127, SSM_VEI = 128, SSM_VEhA = 129, SSM_VEhO = 130, SSM_VIhA = 131, SSM_VUhO = 132, SSM_VUhU0 = 133, SSM_VUhU1 = 134, SSM_VUhU2 = 135, SSM_VUhU3 = 136, SSM_VUhU4 = 137, SSM_XI = 138, SSM_Y = 139, SSM_ZAhO = 140, SSM_ZEI = 141, SSM_ZEhA = 142, SSM_ZI = 143, SSM_ZIhE = 144, SSM_ZO = 145, SSM_ZOI = 146, SSM_ZOhU = 147, /* The following ones were manually added, to fix up the missing entries from the cmavo file. */ SSM_BIhE = 148, SSM_CEhE = 149, SSM_KOhA8 = 150, SSM_PEhE = 151 } __attribute__ ((packed)) SelmaoCodes; typedef struct { char *cmavo; short selmao; /* as per tokens in rpc.tab.h at parse level (e.g. KOhA) */ CmavoCodes code; SelmaoCodes ssm_code; /* e.g. KOhA2 */ char *meaning; } __attribute__ ((packed)) CmavoCell; extern CmavoCell cmavo_table[]; extern char *selmao_names[]; #endif /* CMAVOTAB_H */ jbofihe-0.38/config.pl100644 765 764 5454 7350750735 13727 0ustar richardruser# $Header: /cvs/src/jbofihe/config.pl,v 1.20 2001/08/03 20:39:54 richard Exp $ # # To be run with perl. This builds Makefile from Makefile.in, # substituting things whose location varies on different systems, and # has to be looked for. # # There is no #! at the top because perl isn't installed in the same # place on all systems. # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # $prefix="/usr/local"; $debug=0; $profile=0; $mmap=1; $plist=0; $embed=0; $plist=0; while ($_ = shift @ARGV) { if (/^--help/ || /^-h/) { &print_help(); exit 0; } elsif (/^--prefix=(.*)$/) { $prefix = $1; } elsif (/^-p/) { $prefix = shift @ARGV; } elsif (/^--profile$/) { $profile = 1; } elsif (/^--plist$/) { $plist = 1; } elsif (/^--debug$/) { $debug = 1; } elsif (/^--nommap$/) { $mmap = 0; } elsif (/^--embed$/) { $embed = 1; } } if ($plist) { $defines .= " -DPLIST"; $cmafihe_ldopts=" -lPropList"; } else { $cmafihe_ldopts=""; } $optdebug = $debug ? " -g -Wall" : " -O2"; if ($profile) { $optdebug .= " -pg"; } $mmap_flag = $mmap ? " -DHAVE_MMAP=1" : ""; $defines .= $mmap_flag; if ($debug) { $defines .= " -DEXPOSE_SIGNALS"; } if ($embed) { $dictdata_c = "dictdata.c"; $defines .= " -DEMBEDDED_DICTIONARY"; } else { $dictdata_c = ""; } open(IN, "Makefile"); while () { s/\@\@PREFIX\@\@/$prefix/eg; s/\@\@OPTDEBUG\@\@/$optdebug/eg; s/\@\@CMAFIHE_LDOPTS\@\@/$cmafihe_ldopts/eg; s/\@\@DEFINES\@\@/$defines/eg; s/\@\@DICTDATA_C\@\@/$dictdata_c/eg; print OUT; } close(IN); close(OUT); sub print_help { print < Set installation directory parent (default=/usr/local) -p Ditto --profile Build for profiling --debug Build a debuggable version --nommap Don't use mmap for reading the dictionary file --embed Embed minimal dictionary directly into jbofihe program --plist Enable PropList output of vocabulary in cmafihe (requires libPropList from http://www.windowmaker.org) EOF } jbofihe-0.38/configure100755 765 764 2254 7350750736 14030 0ustar richardruser#!/bin/sh # $Header: /cvs/src/jbofihe/configure,v 1.2 2001/03/21 23:04:50 richard Exp $ # Copyright (C) Richard P. Curnow 2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # Configure script which will be invoked by people who just want to try # building in the conventional way without reading the instructions. It's # unlikely somebody doing this will want the bother of building + installing # the translation dictionary properly, so embed it. echo "Configuring to build with an embedded dictionary" echo "(Run perl config.pl directly to set other options)" perl config.pl --embed $* jbofihe-0.38/connect.c100644 765 764 25166 7350750736 13745 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/connect.c,v 1.4 2000/10/14 06:58:10 richard Exp $ Do processing to do with forethought and afterthought connectives, e.g. grouping NA, SE and NAI onto the bare connective to work out a combined truth function that may be glossed as a whole. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "nodes.h" #include "nonterm.h" #include "functions.h" #include "rpc_tab.h" #include "cmavotab.h" static char *truth_ex[] = { "FFFF", "FFFT", "FFTF", "FFTT", "FTFF", "FTFT", "FTTF", "FTTT", "TFFF", "TFFT", "TFTF", "TFTT", "TTFF", "TTFT", "TTTF", "TTTT", "QQQQ" }; /*+ Index as follows : 8*(index in (a,e,o,u) [0..3]) + (4 if se-converted) + (2 if first term negated) + (1 if second term negated) +*/ static int main_table[] = { 0xe, 0xd, 0xb, 0x7, 0xe, 0xd, 0xb, 0x7, 0x8, 0x4, 0x2, 0x1, 0x8, 0x4, 0x2, 0x1, 0x9, 0x6, 0x6, 0x9, 0x9, 0x6, 0x6, 0x9, 0xc, 0xc, 0x3, 0x3, 0xa, 0x5, 0xa, 0x5, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }; typedef enum { TR_OTHER = -1, TR_A = 0, TR_E = 1, TR_O = 2, TR_U = 3, TR_Q = 4 } TruthFunction; /*++++++++++++++++++++++++++++++++++++++ static int generate_truth_index int neg1 int conv int neg2 TruthFunction func ++++++++++++++++++++++++++++++++++++++*/ static int generate_truth_index(int neg1, int conv, int neg2, TruthFunction func) { int index, result; assert(func != TR_OTHER); index = (8*(int)func) + 4*(conv ? 1:0) + 2*(neg1 ? 1:0) + (neg2 ? 1:0); result = main_table[index]; #if 0 fprintf(stderr, "func=%d conv=%d neg1=%d neg2=%d index=%d result=%d (%s)\n", (int)func, conv, neg1, neg2, index, result, truth_ex[result]); #endif return result; } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x TruthFunction func ++++++++++++++++++++++++++++++++++++++*/ static void process_afterthought(TreeNode *x, TruthFunction func) { TreeNode *na, *se, *nai; int neg1, neg2, conv; int index; XConnective *xcon; na = find_nth_cmavo_child(x, 1, NA); se = find_nth_cmavo_child(x, 1, SE); nai = find_nth_cmavo_child(x, 1, NAI); neg1 = na ? 1 : 0; conv = se ? 1 : 0; neg2 = nai ? 1 : 0; index = generate_truth_index(neg1, conv, neg2, func); /* Bind property to x */ xcon = prop_connective(x, YES); xcon->pos = CNP_AFTER; /* Can be pointer to this fixed table below */ xcon->pattern = truth_ex[index]; return; } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_jek(TreeNode *x) { TreeNode *key; char *text; TruthFunction func; key = find_nth_cmavo_child(x, 1, JA); assert(key); text = cmavo_table[key->data.cmavo.code].cmavo; if (!strcmp(text, "ja")) { func = TR_A; } else if (!strcmp(text, "je")) { func = TR_E; } else if (!strcmp(text, "jo")) { func = TR_O; } else if (!strcmp(text, "ju")) { func = TR_U; } else if (!strcmp(text, "je'i")) { func = TR_Q; } else { func = TR_OTHER; } if (func != TR_OTHER) { process_afterthought(x, func); } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_ek(TreeNode *x) { TreeNode *key; char *text; TruthFunction func; key = find_nth_cmavo_child(x, 1, A); assert(key); text = cmavo_table[key->data.cmavo.code].cmavo; if (!strcmp(text, "a")) { func = TR_A; } else if (!strcmp(text, "e")) { func = TR_E; } else if (!strcmp(text, "o")) { func = TR_O; } else if (!strcmp(text, "u")) { func = TR_U; } else if (!strcmp(text, "ji")) { func = TR_Q; } else { func = TR_OTHER; } if (func != TR_OTHER) { process_afterthought(x, func); } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_gihek(TreeNode *x) { TreeNode *key; char *text; TruthFunction func; key = find_nth_cmavo_child(x, 1, GIhA); assert(key); text = cmavo_table[key->data.cmavo.code].cmavo; if (!strcmp(text, "gi'a")) { func = TR_A; } else if (!strcmp(text, "gi'e")) { func = TR_E; } else if (!strcmp(text, "gi'o")) { func = TR_O; } else if (!strcmp(text, "gi'u")) { func = TR_U; } else if (!strcmp(text, "gi'i")) { func = TR_Q; } else { func = TR_OTHER; } if (func != TR_OTHER) { process_afterthought(x, func); } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x TruthFunction func ++++++++++++++++++++++++++++++++++++++*/ static void process_forethought(TreeNode *x, TruthFunction func) { TreeNode *se, *nai1, *nai2, *gik; int neg1, neg2, conv; int index; XConnective *xcon; gik = find_nth_child(x->parent, 1, GIK); assert(gik); se = find_nth_cmavo_child(x, 1, SE); nai1 = find_nth_cmavo_child(x, 1, NAI); nai2 = find_nth_cmavo_child(gik, 1, NAI); neg1 = nai1 ? 1 : 0; conv = se ? 1 : 0; neg2 = nai2 ? 1 : 0; index = generate_truth_index(neg1, conv, neg2, func); /* Bind property to x (=gek/guhek) */ xcon = prop_connective(x, YES); xcon->pos = CNP_GE; /* Can be pointer to this fixed table below */ xcon->pattern = truth_ex[index]; /* Bind property to gik */ xcon = prop_connective(gik, YES); xcon->pos = CNP_GI; /* Can be pointer to this fixed table below */ xcon->pattern = truth_ex[index]; return; } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_guhek(TreeNode *x) { TreeNode *key; char *text; TruthFunction func; key = find_nth_cmavo_child(x, 1, GUhA); assert(key); text = cmavo_table[key->data.cmavo.code].cmavo; if (!strcmp(text, "gu'a")) { func = TR_A; } else if (!strcmp(text, "gu'e")) { func = TR_E; } else if (!strcmp(text, "gu'o")) { func = TR_O; } else if (!strcmp(text, "gu'u")) { func = TR_U; } else if (!strcmp(text, "gu'i")) { func = TR_Q; } else { func = TR_OTHER; } if (func != TR_OTHER) { process_forethought(x, func); } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *gek TreeNode *gi ++++++++++++++++++++++++++++++++++++++*/ static void process_joik_gi(TreeNode *gek, TreeNode *gi) { TreeNode *nai2, *mid_gik, *joik; int neg1, neg2; XConnective *xcon; mid_gik = find_nth_child(gek->parent, 1, GIK); assert(mid_gik); joik = find_nth_child(gek, 1, JOIK); assert(joik); nai2 = find_nth_cmavo_child(mid_gik, 1, NAI); neg1 = 0; /* inconsistently with everything else, you can't negate the first phrase */ neg2 = nai2 ? 1 : 0; /* Bind property to gek */ xcon = prop_connective(gek, YES); xcon->pos = CNP_GE_JOIK; xcon->js = joik; xcon->neg1 = neg1; xcon->neg2 = neg2; /* Bind property to mid_gik */ xcon = prop_connective(mid_gik, YES); xcon->pos = CNP_GI_JOIK; xcon->js = joik; xcon->neg1 = neg1; xcon->neg2 = neg2; return; } /*++++++++++++++++++++++++++++++++++++++ TreeNode *gek TreeNode *gik ++++++++++++++++++++++++++++++++++++++*/ static void process_stag_gik(TreeNode *gek, TreeNode *gik) { TreeNode *nai1, *nai2, *mid_gik, *stag; int neg1, neg2; XConnective *xcon; mid_gik = find_nth_child(gek->parent, 1, GIK); assert(mid_gik); stag = find_nth_child(gek, 1, STAG); assert(stag); nai1 = find_nth_cmavo_child(gik, 1, NAI); nai2 = find_nth_cmavo_child(mid_gik, 1, NAI); neg1 = nai1 ? 1 : 0; neg2 = nai2 ? 1 : 0; /* Bind property to gek */ xcon = prop_connective(gek, YES); xcon->pos = CNP_GE_STAG; xcon->js = stag; xcon->neg1 = neg1; xcon->neg2 = neg2; /* Bind property to mid_gik */ xcon = prop_connective(mid_gik, YES); xcon->pos = CNP_GI_STAG; xcon->js = stag; xcon->neg1 = neg1; xcon->neg2 = neg2; return; } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_gek(TreeNode *x) { TreeNode *key; char *text; TruthFunction func; key = find_nth_cmavo_child(x, 1, GA); if (!key) { TreeNode *gi, *gik; gik = find_nth_child(x, 1, GIK); gi = find_nth_cmavo_child(x, 1, GI); assert (gik || gi); if (gi) { process_joik_gi(x, gi); } else { process_stag_gik(x, gik); } } else { text = cmavo_table[key->data.cmavo.code].cmavo; if (!strcmp(text, "ga")) { func = TR_A; } else if (!strcmp(text, "ge")) { func = TR_E; } else if (!strcmp(text, "go")) { func = TR_O; } else if (!strcmp(text, "gu")) { func = TR_U; } else if (!strcmp(text, "ge'i")) { func = TR_Q; } else { func = TR_OTHER; } if (func != TR_OTHER) { process_forethought(x, func); } } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void traverse_tree(TreeNode *x) { int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; /* Process specific types of node */ switch (nt->type) { case GIHEK: process_gihek(x); break; case EK: process_ek(x); break; case JEK: case JEK_OPT_KE: case JEK_OPT_KEBO: process_jek(x); break; case GUHEK: process_guhek(x); break; case GEK: process_gek(x); break; default: break; } nc = nt->nchildren; for (i=0; ichildren[i]; traverse_tree(c); } } } /*++++++++++++++++++++++++++++++++++++++ The outermost routine for connectives processing, visible from outside TreeNode *top ++++++++++++++++++++++++++++++++++++++*/ void connectives_processing(TreeNode *top) { traverse_tree(top); } jbofihe-0.38/conversion.c100644 765 764 37361 7350750736 14501 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/conversion.c,v 1.14 2001/03/09 22:18:55 richard Exp $ Work out how to gloss certain node types depending on the sequence of SE cmavo that precede them. Work out the context that various selbri components occur in, to determine which gloss to use. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ /* Perform handling to do with conversion (se,te etc) */ #include #include "nodes.h" #include "functions.h" #include "rpc_tab.h" #include "cmavotab.h" /*++++++++++++++++++++++++++++++ Lookup which place is exchanged for a cmavo of selma'o SE ++++++++++++++++++++++++++++++*/ static int lookup_converted_place(TreeNode *se_cmavo) { char *se; int conv; se = cmavo_table[se_cmavo->data.cmavo.code].cmavo; if (!strcmp(se, "se")) { conv = 2; } else if (!strcmp(se, "te")) { conv = 3; } else if (!strcmp(se, "ve")) { conv = 4; } else if (!strcmp(se, "xe")) { conv = 5; } else { assert(0); /* No other cmavo in selma'o SE hopefully */ } return conv; } /*++++++++++++++++++++++++++++++ Go through the parse tree and mark all SE BAI cmavo with extension records on the BAI. Simple recursive traversal over the whole parse tree. ++++++++++++++++++++++++++++++*/ static void conv_tag_se_bai(TreeNode *x) { TreeNode *c, *c1, *c2; int nc, i; int conv; XBaiConversion *ext; XDontGloss *edg; struct nonterm *nt; if (x->type == N_NONTERM) { nt = &x->data.nonterm; switch (nt->type) { case SE_BAI: c1 = strip_attitudinal(nt->children[0]); assert(c1->data.cmavo.selmao == SE); c2 = nt->children[1]; conv = lookup_converted_place(c1); ext = prop_bai_conversion(c2, YES); ext->conv = conv; /* Tag the SE cmavo so we don't display a gloss for it later. */ edg = prop_dont_gloss(c1, YES); break; case BAI1: c1 = nt->children[0]; ext = prop_bai_conversion(c1, YES); ext->conv = 1; break; default: /* Traverse down through children */ nc = nt->nchildren; for (i=0; ichildren[i]; conv_tag_se_bai(c); } break; } } else { /* Nothing to do, the se_bai construction can only occur as a non-terminal */ } } /*++++++++++++++++++++++++++++++ Take a tanru_unit_2 node found by the downward scan, and work outwards gathering conversion operators. TreeNode *tu2 The tu2 node (ancestor of apply_to) TreeNode *apply_to The tu_2 node that wants the conversion applying to it when the glossing is done later. ++++++++++++++++++++++++++++++*/ static void compute_tu2_conv(TreeNode *tu2, TreeNode *apply_to) { /* If the node already has a conversion on it, it must be something whose conversion was determined in terms.c processing. */ if (prop_conversion(apply_to, NO)) { return; } else { /* places[1] is which place of the base word the x1 of the bridi corresponds to. zero means x1 is a jai construction. */ int places[6]; int i; TreeNode *x = tu2; for (i=1; i<=5; i++) { places[i] = i; } /* Barf on JAI constructions for now, fix that up later */ for (;;) { switch (x->data.nonterm.type) { case SE_TU2: { int p, t; XDontGloss *edg; TreeNode *se = strip_attitudinal(child_ref(x, 0)); assert (se->data.cmavo.selmao == SE); p = lookup_converted_place(se); t = places[1]; places[1] = places[p]; places[p] = t; edg = prop_dont_gloss(se, YES); } x = x->parent; break; /* This block just need to go up a level and keep scanning */ case TANRU_UNIT_2: case NAHE_TU2: case TANRU_UNIT_1: case TANRU_UNIT: case SELBRI_6: case SELBRI_5: case SELBRI_3: case KE_SELBRI_3: case KE_SELBRI3_TU2: x = x->parent; break; case JAI_TU2: case JAI_TAG_TU2: /* current x1 of the bridi lost into the fai place, no way to recover this later (no SE which exchanges fai with a normal place!). */ places[1] = 0; x = x->parent; break; case SELBRI_4: /* Depends on whether we're immediately below an outermost selbri_3 as to whether we close the conversion now or propagate. */ if ((x->parent-> data.nonterm.type == SELBRI_3) && (x->parent->parent->data.nonterm.type == SELBRI_3)) { /* close */ XConversion *ext; ext = prop_conversion(apply_to, YES); ext->conv = places[1]; return; } else { x = x->parent; } break; case SELBRI_2: /* done in all cases */ { XConversion *ext; ext = prop_conversion(apply_to, YES); ext->conv = places[1]; return; } break; default: fprintf(stderr, "Unexpected case!!\n"); assert(0); break; } } } } /*++++++++++++++++++++++++++++++ Scan down the tree looking for BRIVLA, abstractions and other forms of tanru_unit_2 that may be subject to conversion (SE) operators. Work back up the syntax tree, accumulating conversions, until coming to something that indicates no more conversions apply to this tanru_unit_2. ++++++++++++++++++++++++++++++*/ static void conv_mark_tu2s(TreeNode *x) { int nc, i; TreeNode *c; struct nonterm *nt; nt = &x->data.nonterm; if (x->type == N_NONTERM) { nc = nt->nchildren; for (i=0; ichildren[i]; conv_mark_tu2s(c); } } else if (x->type == N_BRIVLA) { compute_tu2_conv(x->parent, x); } else if ((x->type == N_CMAVO) && (x->data.cmavo.selmao == NU)) { TreeNode *y; y = x->parent; assert(y->type == N_NONTERM); while (y->data.nonterm.type != TANRU_UNIT_2) { y = y->parent; assert(y->type == N_NONTERM); } compute_tu2_conv(y, x); } } /*+ State used to track the nearest enclosing ancestor node which determines the form +*/ typedef enum { GS_NONE, GS_MAIN_SELBRI, GS_SUMTI, GS_JAI, GS_MODAL } GlossState; /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void conv_mark_gloss_types(TreeNode *x, GlossState g) { struct nonterm *nt; int nc, i; TreeNode *c; XGlosstype *gt; GlossState ng; if (x->type == N_NONTERM) { #if 0 fprintf(stderr, "MGT called on nonterm ty=%s gs=%d\n", nonterm_names[x->data.nonterm.type], g); #endif nt = &x->data.nonterm; nc = nt->nchildren; switch (nt->type) { case MAIN_SELBRI: case METALINGUISTIC_MAIN_SELBRI: ng = GS_MAIN_SELBRI; break; case JAI_TAG_TU2: case JAI_TU2: { TreeNode *cjai; cjai = child_ref(x, 0); if (g != GS_NONE) { gt = prop_glosstype(cjai, YES); if (g == GS_MAIN_SELBRI || g == GS_JAI) { gt->in_selbri = 1; } else { gt->in_selbri = 0; } } } ng = GS_JAI; break; case SUMTI: ng = GS_SUMTI; break; case FREE: case OPERAND_3: case MEX_OPERATOR: ng = GS_NONE; /* Review later what to do with these ones */ break; case COMPLEX_TENSE_MODAL: ng = GS_MODAL; break; default: ng = g; break; } for (i=0; ichildren[i]; conv_mark_gloss_types(c, ng); } } else { #if 0 if (x->type == N_BRIVLA) { fprintf(stderr, "MGT called on brivla %s gs=%d\n", x->data.brivla.word, g); } if (x->type == N_CMAVO) { fprintf(stderr, "MGT called on cmavo %s gs=%d\n", cmavo_table[x->data.cmavo.code].cmavo, g); } #endif if ((x->type == N_BRIVLA) || (x->type == N_ZEI) || ((x->type == N_CMAVO) && (x->data.cmavo.selmao == NU))) { if (g != GS_NONE) { gt = prop_glosstype(x, YES); /* In something like 'le jai ca cusku' we want to treat 'cusku' as a 'verb' rather than a 'noun' when glossing */ if (g == GS_MAIN_SELBRI || g == GS_JAI) { gt->in_selbri = 1; } else { gt->in_selbri = 0; } } } } } /*++++++++++++++++++++++++++++++++++++++ Scan the entire parse tree for selbri. Descend into each one to work out which tanru_unit_2's inside it correspond to tertau', i.e. need to be considered as nouns or verbs (rather than adjectives) for glossing. TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void selbri_scan(TreeNode *x, int is_tertau) { struct nonterm *nt; int nc, i; TreeNode *c; nt = &x->data.nonterm; nc = nt->nchildren; if (x->type == N_NONTERM) { nt = &x->data.nonterm; nc = nt->nchildren; if (is_tertau) { switch (nt->type) { case SELBRI: break; case SELBRI_1: break; case SELBRI_2: break; case SELBRI_3: break; case SELBRI_4: { TreeNode *cs4, *cs5, *cks3, *cs3; cs4 = x; while (nch(cs4) > 1) { cs5 = find_nth_child(cs4, 1, SELBRI_5); cks3 = find_nth_child(cs4, 1, KE_SELBRI_3); if (cs5) { selbri_scan(cs5, 1); } if (cks3) { cs3 = find_nth_child(cks3, 1, SELBRI_3); /* This is like a new selbri_3, only the last selbri_4 has tertau status, with the prefixes being adjectival */ selbri_scan(cs3, 0); } cs4 = find_nth_child(cs4, 1, SELBRI_4); } /* Mop up final child */ cs5 = find_nth_child(cs4, 1, SELBRI_5); selbri_scan(cs5, 1); } break; case SELBRI_5: { TreeNode *cs5, *cs6; cs5 = x; do { cs6 = find_nth_child(cs5, 1, SELBRI_6); selbri_scan(cs6, 1); cs5 = find_nth_child(cs5, 1, SELBRI_5); } while (cs5); } break; case SELBRI_6: { TreeNode *cs6, *tu; cs6 = x; do { tu = find_nth_child(cs6, 1, TANRU_UNIT); if (tu) { selbri_scan(tu, 1); } /* There is a clever hack here. In the NAhE guhek selbri gik selbri_6 case, we don't need to bother about processing the selbri - the selbri_3 within it will get picked up eventually anyway by scanning the whole tree for selbri_3's. */ cs6 = find_nth_child(cs6, 1, SELBRI_6); } while (cs6); } break; case TANRU_UNIT: { TreeNode *ctu1, *ctu; ctu = x; do { ctu1 = find_nth_child(ctu, 1, TANRU_UNIT_1); selbri_scan(ctu1, 1); ctu = find_nth_child(ctu, 1, TANRU_UNIT); } while (ctu); } break; case TANRU_UNIT_1: { TreeNode *ctu2; ctu2 = find_nth_child(x, 1, TANRU_UNIT_2); selbri_scan(ctu2, 1); } break; case TANRU_UNIT_2: { TreeNode *c; c = child_ref(x, 0); if (c->type == N_BRIVLA || c->type == N_ZEI) { XGlosstype *gt; gt = prop_glosstype(c, YES); gt->is_tertau = 1; } else if (c->type == N_NONTERM) { switch (c->data.nonterm.type) { case AUGMENTED: { TreeNode *cc; cc = strip_attitudinal(c); if (cc->type == N_BRIVLA) { XGlosstype *gt; gt = prop_glosstype(cc, YES); gt->is_tertau = 1; } } break; case SE_TU2: case JAI_TU2: case NAHE_TU2: { TreeNode *cc; cc = find_nth_child(c, 1, TANRU_UNIT_2); selbri_scan(cc, 1); } break; case JAI_TAG_TU2: { TreeNode *cc, *cjai; XGlosstype *gt; cjai = child_ref(c, 0); gt = prop_glosstype(cjai, YES); gt->is_tertau = 1; cc = find_nth_child(c, 1, TANRU_UNIT_2); selbri_scan(cc, 1); } break; case ABSTRACTION: { TreeNode *nns; TreeNode *nu; XGlosstype *gt; nns = child_ref(c, 0); while (nns) { nu = find_nth_cmavo_child(nns, 1, NU); gt = prop_glosstype(nu, YES); gt->is_tertau = 1; nns = find_nth_child(nns, 1, NU_NAI_SEQ); } } break; default: break; } } } break; default: break; } } else { /* If it's a selbri_3 that hasn't been scanned yet, need to do it. The ideas is that in a selbri_2, the tertau is the last selbri_4 term within the selbri_3 term either at the head, or before the first CO. This selbri_4 is the last term of the outermost selbri_3, if it's a tanru with multiple components. */ if (nt->type == SELBRI_3 && !prop_done_s3(x, NO)) { /* Find final selbri_4 */ TreeNode *cs4, *cs3; XDoneS3 *xds3; #if 0 fprintf(stderr, "Here B\n"); #endif cs3 = x; cs4 = find_nth_child(cs3, 1, SELBRI_4); do { xds3 = prop_done_s3(cs3, YES); cs3 = find_nth_child(cs3, 1, SELBRI_3); } while (cs3); /* Actively scan down into selbri4 */ #if 0 fprintf(stderr, "Here A\n"); #endif selbri_scan(cs4, 1); } } /* In all cases, scan downwards to look for other selbri that haven't been tackled yet */ for (i=0; ichildren[i]; selbri_scan(c, 0); } } else { /* Nothing to do */ } } /*++++++++++++++++++++++++++++++ Do all conversion stages ++++++++++++++++++++++++++++++*/ void do_conversions(TreeNode *top) { conv_tag_se_bai(top); conv_mark_tu2s(top); conv_mark_gloss_types(top, GS_NONE); selbri_scan(top, 0); } jbofihe-0.38/dict2inc.pl100644 765 764 2637 7350750736 14162 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/dict2inc.pl,v 1.2 2001/06/19 20:54:06 richard Exp $ # Script to read in a load of dictionary data, sort it, and write it out in the # form of a C structure initialisation. This can be used for embedding the # dictionary within the software binary itself. # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # %def = (); while (<>) { chomp; if (/^[ \t]*#/) { next; } if (/^([^:]+):([^:]+)/) { my $word = $1; my $def = $2; $def =~ s/\"/\\"/go; $def{$word} = $def; } } $n = 0; print "static Keyval dict[] = {"; for $x (sort keys %def) { print "," if ($n++); print "\n "; print "{ \"".$x."\", \"".$def{$x}."\"}"; } print "};\n\n"; print "static int n_entries = $n;\n\n"; jbofihe-0.38/dictaccs.c100644 765 764 11134 7350750736 14057 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dictaccs.c,v 1.1 2001/03/04 23:01:18 richard Exp $ Low level routines for accessing the dictionary. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include #include "functions.h" #include "canonluj.h" #include "morf.h" #ifndef DEFAULT_DICTIONARY #define DEFAULT_DICTIONARY "smujmaji.dat" #endif #include #include #ifdef HAVE_MMAP #include #include #endif typedef struct { char *key; char *val; } Keyval; #ifdef EMBEDDED_DICTIONARY #include "dictdata.c" #else static Keyval *dict = NULL; static int n_entries = 0; #endif #ifndef EMBEDDED_DICTIONARY static int inited = 0; /*++++++++++++++++++++++++++++++++++++++ Read a 'long' integer from file avoiding endianness problems. static unsigned long get_long FILE *in ++++++++++++++++++++++++++++++++++++++*/ static unsigned long get_long(FILE *in) { unsigned long a, b, c, d; /* Avoid endian-ness problem if we were to use fwrite */ a = getc(in); b = getc(in); c = getc(in); d = getc(in); return (a << 24) | (b << 16) | (c << 8) | (d << 0); } /*++++++++++++++++++++++++++++++++++++++ Read the database to build the transaction list. FILE *in ++++++++++++++++++++++++++++++++++++++*/ static void read_database(FILE *in) { typedef struct { int klen; int vlen; } Entry; Entry *entries; int i, len; struct stat sb; off_t offset; int result; char *dict_base = NULL; n_entries = get_long(in); entries = new_array(Entry, n_entries); dict = new_array(Keyval, n_entries); for (i=0; i l) { m = (h + l) >> 1; r = strcmp(key, dict[m].key); if (r == 0) goto found; if (m == l) break; if (r < 0) h = m; else l = m; } return NULL; found: return dict[m].val; } jbofihe-0.38/dictaccs.h100644 765 764 2207 7350750736 14045 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dictaccs.h,v 1.1 2001/03/04 23:01:18 richard Exp $ Low level dictionary routines header ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef DICTACCS_H #define DICTACCS_H extern char * dict_lookup(char *key); #endif /* DICTACCS_H */ jbofihe-0.38/doskit.be100644 765 764 2442 7350750736 13725 0ustar richardruser#!/bin/sh # $Header: /cvs/src/jbofihe/doskit.be,v 1.7 2001/07/31 20:46:12 richard Exp $ # The flow for building the DOS binary-only release is # 1. Make usual Unix source release # 2. Unpack a copy of the Unix source kit # 3. Run doskit.fe # 4. Boot into DOS and make the executables # 5. Run some basic sanity checks # 6. Reboot Linux and run this script if [ ! -d /dosc/jbofihe ]; then echo "You need to mount /dosc first!" exit 1 fi make jbofihe.txt make cmafihe.txt make smujajgau.txt make jvocuhadju.txt make vlatai.txt cp /dosc/jbofihe/jbofihe.exe . cp /dosc/jbofihe/cmafihe.exe . cp /dosc/jbofihe/jvocuhad.exe ./jvocuhad.exe cp /dosc/jbofihe/smujajga.exe ./smujajga.exe cp /dosc/jbofihe/vlatai.exe . cp /dosc/djgpp/bin/cwsdpmi.exe . cp /dosc/djgpp/bin/cwsdpmi.doc . mv README.DOS README.DOS.tmp perl -pe 'chomp; print $_."\r\n";' < README.DOS.tmp > README.DOS perl -pe 'chomp; print $_."\r\n";' < COPYING > COPYING.txt mv smujajgau.txt smujajga.txt mv jvocuhadju.txt jvocuhad.txt zip -9 jbofihe.zip COPYING.txt zip -9 jbofihe.zip cwsdpmi.doc cwsdpmi.exe zip -9 jbofihe.zip cmafihe.exe jbofihe.exe jvocuhad.exe smujajga.exe vlatai.exe zip -9 jbofihe.zip jbofihe.txt cmafihe.txt smujajga.txt jvocuhad.txt vlatai.txt zip -9 jbofihe.zip smujmaji.dat echo "Now copy jbofihe.zip to jbofv_vv.zip" jbofihe-0.38/doskit.fe100644 765 764 2135 7350750736 13730 0ustar richardruser#!/bin/sh # $Header: /cvs/src/jbofihe/doskit.fe,v 1.10 2001/07/31 20:46:12 richard Exp $ # The flow for building the DOS binary-only release is # 1. Make usual Unix source release # 2. Unpack a copy of the Unix source kit # 3. Run this script # 4. Boot into DOS and make the executables # 5. Run some basic sanity checks # 6. Reboot Linux and run doskit.be if [ ! -d /dosc/jbofihe ]; then echo "You need to mount /dosc first!" exit 1 fi if [ ! -r Makefile ]; then echo "You need to perl config.pl first" echo " e.g. perl config.pl" exit 1 fi if [ ! -r smujmaji.dat ]; then # Don't do this twice if a failure occurs below (i.e. if /dosc isn't # mounted!) make dictionary fi make rpc_tab.c make rpc_full.c make stag.c make canonluj.inc make morf_lex.c make morfvlex.c make morf_dfa.c make bctables.c make trctabs.c make trcftabs.c make elitabs.c cp *.c *.h smujmaji.dat canonluj.inc Makefile.dos /dosc/jbofihe echo "Now reboot into DOS and do" echo "gcc -O2 -o minitouc minitouc.c" echo "minitouc *.*" echo "del *.o" echo "make -f makefile.dos progs" echo "Then reboot Linux" jbofihe-0.38/elide.c100644 765 764 52010 7350750736 13362 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/elide.c,v 1.7 2001/03/01 22:40:44 richard Exp $ Monitor passage of elidable tokens into the parser, and determine whether one or more of them could be discarded with no change in meaning of the text. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ /* Define to get lots of extra debug info */ #define TRACE_SR 0 #define YYSTYPE TreeNode * #include #include "nodes.h" #include "rpc_tab.h" #include "cmavotab.h" #include "functions.h" #include "elide.h" /* Include table built from Bison output, that has a bitmap of which tokens are shiftable in which states */ #include "elitabs.c" /* Command line options -se & -sev */ extern int show_elisions; extern int show_elisions_verbose; /* Structure for holding 1 bit flags */ typedef struct { /* Is token is BOI or VEhO */ unsigned boiveho:1; /* Flags indicating whether a rule of type 'subscript' was reduced *prior* to this token being shifted */ unsigned subscript_before:1; /* Flag indicating whether token is one of the private markers NUMBER_ROI, NUMBER_MOI, NUMBER_MEI */ unsigned tok_is_number_marker:1; } OneBitFlags; /* Structure + single instance for buffering a sequence of zero or more potentially elidable separators/terminators followed by a single non-elidable symbol. */ struct { int n; /* Number of tokens buffered */ int max; /* Current size of dynamic arrays */ int rp; /* Index of next token to be read */ int sp; /* Index of next token to be shifted */ TokenType *buf; /* Token buffer */ /* conflicts array works as follows ... conflicts[k] has (k-1) bits in it. If the jth bit is set, it means the kth entry of buf could have been shifted in one of the reducing states that is encountered prior to the jth entry of buf being shifted. */ unsigned long **conflicts; OneBitFlags *flags; } tokbuf = { 0, 0, 0, 0, NULL, NULL, NULL }; /* Flag indicating that previous token was PA prior to tokens being read into the tokbuf. */ static int prev_token_was_pa_etc = 0; static int cur_token_was_pa_etc = 0; /*++++++++++++++++++++++++++++++++++++++ Called to set a flag bit ++++++++++++++++++++++++++++++++++++++*/ static inline void set_conflict(int could_be_shifted, int lookahead) { int j = lookahead; int k = could_be_shifted; int bank = j >> 5; unsigned long mask = 1UL << (j & 31); tokbuf.conflicts[k][bank] |= mask; } /*++++++++++++++++++++++++++++++++++++++ Called to check if a flag bit is set ++++++++++++++++++++++++++++++++++++++*/ static inline int is_set(int could_be_shifted, int lookahead) { int j = lookahead; int k = could_be_shifted; int bank = j >> 5; unsigned long mask = 1UL << (j & 31); return !!(tokbuf.conflicts[k][bank] & mask); } /*++++++++++++++++++++++++++++++++++++++ Detect whether a token can shift in a state ++++++++++++++++++++++++++++++++++++++*/ static inline int can_shift_in_state(int state, int value) { int offset = value - CODE_OFFSET; int block = offset >> 5; unsigned long mask = 1UL << (offset & 31); block += state * BLOCKS_PER_STATE; return !!(elitab[block] & mask); } /*++++++++++++++++++++++++++++++++++++++ Clear all flag bits ++++++++++++++++++++++++++++++++++++++*/ static void clear_conflicts(void) { int k, j; for (k = 0; k < tokbuf.n; k++) { for (j = 0; j <= (k>>5); j++) { tokbuf.conflicts[k][j] = 0UL; } } } /*++++++++++++++++++++++++++++++++++++++ Called to increase the size of the token buffer. ++++++++++++++++++++++++++++++++++++++*/ static void grow_buffer(void) { int i; int first; int nblocks; first = tokbuf.max; tokbuf.max += 32; nblocks = tokbuf.max >> 5; tokbuf.buf = grow_array(TokenType, tokbuf.max, tokbuf.buf); tokbuf.conflicts = grow_array(unsigned long *, tokbuf.max, tokbuf.conflicts); tokbuf.flags = grow_array(OneBitFlags, tokbuf.max, tokbuf.flags); for (i=first; i < tokbuf.max; i++) { tokbuf.conflicts[i] = (unsigned long *) Malloc(sizeof(unsigned long) * nblocks); } } /*++++++++++++++++++++++++++++++++++++++ Return 1 if the cmavo is elidable ++++++++++++++++++++++++++++++++++++++*/ static int token_is_elidable(YYSTYPE tok, int *is_boiveho) { if (!tok) return 0; /* end of string */ if (tok->type != N_CMAVO) return 0; *is_boiveho = 0; switch (cmavo_table[tok->data.cmavo.code].code) { case CM_BEhO: case CM_CU: case CM_FEhU: case CM_GEhU: case CM_KEI: case CM_KEhE: case CM_KU: case CM_KUhE: case CM_KUhO: case CM_LIhU: case CM_LOhO: case CM_LUhU: case CM_MEhU: case CM_NUhU: case CM_TEhU: case CM_TUhU: case CM_VAU: /* Any of these is elidable, with the exception that if the cmavo has indicators or 'free' terms attached to it, the meaning would obviously change if it were omitted; in this case, it functions as a 'peg' on which to hang indicators/'free' terms that apply to the entire construction it terminates. */ if (tok->data.cmavo.followed_by_free == 1) return 0; if (tok->ui_next != (TreeNode *)&tok->ui_next) { return 0; } else { return 1; } break; /* These 3 can *never* have 'free' terms bound to them, because they only ever terminate sub-rules of 'free' themselves. Hence it is only relevant whether they are followed by indicators. */ case CM_DOhU: case CM_SEhU: case CM_TOI: if (tok->ui_next != (TreeNode *)&tok->ui_next) { return 0; } else { return 1; } break; case CM_BOI: case CM_VEhO: *is_boiveho = 1; /* These two have to be handled specially. Because of the way they appear in the 'subscript' rules, the appearance of a 'free' term afterwards is not enough to force them to be included. They are unlike SEhU, DOhU, TOI because those can *never* have a 'free' term attached to them. BOI and VEhO can (within 'quantifier'). Hence, BOI and VEhO have to be speculatively kept elidable, and a check made later on as to whether one of the subscript rules is reduced after they have been shifted. */ if (tok->ui_next != (TreeNode *)&tok->ui_next) { return 0; } else { return 1; } break; default: return 0; break; } } /*++++++++++++++++++++++++++++++++++++++ Detect whether a token is one of the private marker tokens that categ.c inserts to ease the parser's task ++++++++++++++++++++++++++++++++++++++*/ static int token_is_number_marker(TreeNode *x) { int result; if (x) { if (x->type == N_MARKER) { switch (x->data.marker.tok) { case PRIVATE_NUMBER_ROI: case PRIVATE_NUMBER_MAI: case PRIVATE_NUMBER_MOI: result = 1; break; default: result = 0; break; } } else { result = 0; } } else { result = 0; } return result; } /*++++++++++++++++++++++++++++++++++++++ Emit the sequence of elidable cmavo + line/col no. information ++++++++++++++++++++++++++++++++++++++*/ static void emit_elidable_sequence(void) { int i; putchar('\''); for (i=0; i 0) putchar(' '); printf("%s", cmavo_table[tok->data.cmavo.code].cmavo); } putchar ('\''); if (tokbuf.n > 2) { printf("\n (from line %d col %d to line %d col %d)\n", tokbuf.buf[0].yylval->start_line, tokbuf.buf[0].yylval->start_column, tokbuf.buf[tokbuf.n - 2].yylval->start_line, tokbuf.buf[tokbuf.n - 2].yylval->start_column); } else { printf(" (at line %d col %d)\n", tokbuf.buf[0].yylval->start_line, tokbuf.buf[0].yylval->start_column); } } /*++++++++++++++++++++++++++++++++++++++ Print banner out for the report on minimal sequences (only do it before the first successful reduction in word count is about to be printed.) ++++++++++++++++++++++++++++++++++++++*/ static void show_banner_for_minimal_paterns(void) { printf("The words "); emit_elidable_sequence(); printf("could be safely reduced to any of these minimal patterns:\n"); } /*++++++++++++++++++++++++++++++++++++++ Recursive function to determine a minimal but sufficient set of elidables which forces the text to have the same meaning. By 'minimal' is meant : retaining any more of the original elidables is superfluous, yet removing any of the 'minimal' set causes the meaning to change. int tok_idx Index into the tokbuf.tok array corr. to the token which is to be prevented from shifting in an earlier reducing state int *later_indices List of indices of tokens further to the right which are already required to be kept int next_index The next entry in the list to be filled. ++++++++++++++++++++++++++++++++++++++*/ static void show_minimal_elidables(int tok_idx, int *later_indices, int next_index, int prev_can_shift_at, int *patcount) { int can_shift_at; for (can_shift_at = tok_idx - 1; can_shift_at >= 0; can_shift_at--) { if (is_set(tok_idx, can_shift_at)) { break; } } if (can_shift_at < 0) { /* This token could not shift any earlier, so is safe as a first guard token. Print results out */ if (next_index < tokbuf.n - 1) { /* A strict reduction in word count has been achieved. */ int i; if (*patcount == 1) { show_banner_for_minimal_paterns(); } printf (" Pattern %d : ", *patcount); ++*patcount; for (i=next_index-1; i>=0; i--) { TreeNode *tok = tokbuf.buf[later_indices[i]].yylval; printf (" %s", cmavo_table[tok->data.cmavo.code].cmavo); } printf("\n"); } } else { /* This token could have shifted earlier. Some token between the can_shift_at posn. and the one before the tok_idx position is required to guard. */ int i; for (i=can_shift_at; i < tok_idx; i++) { /* Eliminate cases where a shorter minimal sequence would be achieved by just discarding tokens to the right (in particular, the most recent token on the right. In effect, the one we're about to pick to guard it would have guarded the one following it too anyway, making it pointless. */ if (i >= prev_can_shift_at) break; /* No point considering any others */ later_indices[next_index] = i; /* Recursive call to scan the tokens to the left of the new guard token */ show_minimal_elidables(i, later_indices, next_index + 1, can_shift_at, patcount); } } } /*++++++++++++++++++++++++++++++++++++++ Generate report for verbose mode ++++++++++++++++++++++++++++++++++++++*/ static void produce_verbose_report(void) { int i, j; for (i=0; idata.cmavo.code].cmavo; } printf(" <- %s\n", text); } else { printf("%s|", is_set(i, j) ? "X" : " "); } } } } /*++++++++++++++++++++++++++++++++++++++ Trace shifts by the parser. When an elidable is shifted, we can cease checking for whether anything coming after it could have been shifted in a state where a reduction took place ++++++++++++++++++++++++++++++++++++++*/ void elide_trace_shift(int yystate, int yychar) { if (!show_elisions) return; #if TRACE_SR printf("Shift called in state %d\n", yystate); #endif tokbuf.sp = tokbuf.rp; if (tokbuf.sp == tokbuf.n) { /* do reporting - the non-elidable has been shifted */ int i, any_set=0; int nn; /* Fix-up code for BOI & VEhO. If one of these is followed by something that starts a 'free' term, it is not until we know whether the BOI/VEhO was reduced at the end of a subscript (rather than a quantifier) that we can determine whether the BOI/VEhO has to be treated as non-elidable or not */ nn = tokbuf.n; /* less typing */ #if 0 printf("nn=%d\n", nn); fflush(stdout); for (i=0; idata.cmavo.followed_by_free : 0); fflush(stdout); } printf("\n"); #endif if (tokbuf.flags[nn-2].boiveho && !tokbuf.flags[nn-1].subscript_before && tokbuf.buf[nn-2].yylval->data.cmavo.followed_by_free) { /* BOI/VEhO occurred at the end of a quantifier; if it was at the end of a subscript, the parser would have reduced the subscript before getting to the point where the 'free'-starting token could shift. Therefore, the following 'free' term is attached to the BOI/VEhO itself rather than being a peer of the subscript the BOI/VEhO is the end of, so back up to make BOI/VEhO the non-elidable 'NEXT TOKEN' in the report. */ #if 0 printf("Retreated one token for boi/ve'o\n"); #endif tokbuf.n--; } #if 0 printf("bv0=%d ptp=%d tnm[n-1]=%d\n", tokbuf.flags[0].boiveho, prev_token_was_pa_etc, tokbuf.flags[tokbuf.n - 1].tok_is_number_marker); #endif /* If non-elidable was a marker that precedes numbers, see whether first elidable in the buffer is boi or ve'o, and whether this was preceded by a token that would merge with the number if all the intervening elidables were discarded. If so, insert a synthetic conflict by pretending that the marker is shiftable prior to the boi/ve'o. This will provide the required reporting later. */ if (tokbuf.flags[0].boiveho && prev_token_was_pa_etc && tokbuf.flags[tokbuf.n - 1].tok_is_number_marker) { set_conflict(tokbuf.n - 1, 0); } if (show_elisions_verbose && (tokbuf.n > 1)) { printf("Early shift hazards for words "); emit_elidable_sequence(); produce_verbose_report(); putchar('\n'); } #if TRACE_SR printf("Got here, shift sp=n\n"); #endif for (i=0; i 1)) { printf("You could omit "); switch (tokbuf.n) { case 2: printf("the word"); break; case 3: printf("both the words"); break; default: printf("all the words"); break; } putchar(' '); emit_elidable_sequence(); putchar('\n'); } else if (any_set) { /* array of indices for elidables that must be kept */ int *idxs = new_array(int, tokbuf.n); /* sized for worst case */ int patcount = 1; show_minimal_elidables(tokbuf.n - 1, idxs, 0, tokbuf.n, &patcount); if (patcount > 1) printf("\n"); Free(idxs); } } else { int i; #if TRACE_SR printf("Got here, shift sp!=n, state=%d\n", yystate); #endif for (i=tokbuf.rp; i= LO_SUBSCRIPT) && (yyn <= HI_SUBSCRIPT)) { #if 0 printf("Setting sb[%d]=1\n", tokbuf.sp); fflush(stdout); #endif tokbuf.flags[tokbuf.sp].subscript_before = 1; } if (tokbuf.sp == tokbuf.rp) { /* Bison has not read the lookahead token. Therefore, any reduction occurring now must be just a automatic reduction, with no option to shift based on the lookahead token type. Consequently, there is no option of shifting a token further on in the chain. */ #if TRACE_SR printf("Reduce called in state %d for rule %d, no check\n", yystate, yyn); #endif } else { /* Otherwise, check which later tokens could have shifted in the state being reduced. Any that can shift will imply the need for an earlier token to be present to guard against the shift happening */ #if TRACE_SR printf("Reduce called in state %d for rule %d\n", yystate, yyn); #endif for (i=tokbuf.rp; i #include #include #include #include "nodes.h" #include "rpc_tab.h" #include "functions.h" /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void handle_si(TreeNode *toks) { TreeNode *x, *y, *nt, *z; TreeNode *ntt, *t; int require, si_got; for (x = toks->next; x != toks; x = nt) { nt = x->next; if (x->type == N_CMAVO && x->data.cmavo.selmao == SI) { y = x->prev; if (y == toks) { fprintf(stderr, "Unmatched SI at start of input, line %d column %d\n", x->start_line, x->start_column); continue; } require = 1; switch (y->type) { case N_ZOI: require = 4; break; case N_ZO: require = 2; break; case N_LOhU: require = 3; break; case N_BRIVLA: case N_CMAVO: case N_CMENE: require = 1; break; case N_BROKEN_ERASURE: require = y->data.erasure.defects; break; default: fprintf(stderr, "Unrecognized token type %d before SI\n", y->type); fflush(stderr); assert(0); } z = x->next; si_got = 1; while ((si_got < require) && (z != toks)) { if ((z->type == N_CMAVO) && (z->data.cmavo.selmao == SI)) { si_got ++; z = z->next; } else { break; } } if (si_got < require) { y->type = N_BROKEN_ERASURE; y->data.erasure.defects = require - si_got; } else { delete_node(y); } for (t = x; t != z; t = ntt) { ntt = t->next; delete_node(t); } nt = z; } } } /*++++++++++++++++++++++++++++++ Handle the 'sa' erasure cmavo. The definition this is working to is to erase back to something in the same selma'o as the word which follows. If this hits the start of the text, erase everything up to the sa. ++++++++++++++++++++++++++++++*/ static void handle_sa(TreeNode *toks) { TreeNode *x, *y, *nt; for (x = toks->next; x != toks; x = nt) { nt = x->next; /* If x is last token, no following token to determine the type of what to erase back to. In this case, the SA is ignored (which will cause a parse error later.) The alternative is to treat it as erasing the entire text, which seems heavy-handed. */ if (nt == toks) break; if ((x->type != N_CMAVO) || (x->data.cmavo.selmao != SA)) continue; for (y = x->prev; y != toks; y = y->prev) { if ((y->type == nt->type) && (((y->type == N_CMAVO) && (y->data.cmavo.selmao == nt->data.cmavo.selmao)) || (y->type != N_CMAVO))) { break; } } if (y == toks) y = toks->next; while (y != nt) { TreeNode *ntt = y->next; delete_node(y); y = ntt; } } } /*++++++++++++++++++++++++++++++ NIhO, LU, TUhE, and TO. ++++++++++++++++++++++++++++++*/ static void handle_su(TreeNode *toks) { TreeNode *x, *y, *nt; for (x = toks->next; x != toks; x = nt) { nt = x->next; if ((x->type == N_CMAVO) && (x->data.cmavo.selmao == SU)) { if ((nt != toks) && (nt->type == N_CMAVO) && (nt->data.cmavo.selmao == SU)) { /* double SU, delete all text up to date */ TreeNode *u, *nu, *ntt; ntt = nt->next; for (u = toks->next; u != ntt; u = nu) { nu = u->next; delete_node(u); } nt = ntt; } else { /* single SU */ for (y = x->prev; y != toks; y = y->prev) { if ((y->type == N_CMAVO) && ((y->data.cmavo.selmao == NIhO) || (y->data.cmavo.selmao == LU) || (y->data.cmavo.selmao == TUhE) || (y->data.cmavo.selmao == TO))) { break; } } if (y == toks) y = toks->next; while (y != nt) { TreeNode *ntt = y->next; delete_node(y); y = ntt; } } } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ void do_erasures(TreeNode *toks) { handle_si(toks); handle_sa(toks); handle_su(toks); } jbofihe-0.38/errorscan.c100644 765 764 3604 7350750736 14263 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/errorscan.c,v 1.1 2000/04/19 21:30:01 richard Exp $ Scan syntax tree for suspicious constructions that are hard to detect during the parse phase. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" /* ================================================== */ void error_scan(TreeNode *x) { struct nonterm *nt; TreeNode *c; int i, nc; if (x->type == N_NONTERM) { nt = &x->data.nonterm; nc = nt->nchildren; for (i=0; ichildren[i]; error_scan(c); } if (nt->type == FRAGMENT) { TreeNode *c1; c1 = child_ref(x, 0); if ((c1->type == N_NONTERM) && (c1->data.nonterm.type == TERMS)) { fprintf(stderr, "Warning: Sentence may be missing selbri at line %d column %d?\n", x->start_line, x->start_column); } } } else { } } /* ================================================== */ jbofihe-0.38/extradict100644 765 764 14072 7350750737 14055 0ustar richardruser################################################################################ # $Header: /cvs/src/jbofihe/extradict,v 1.28 2001/08/08 21:33:08 richard Exp $ # # This file contains a number of additions to the glossing dictionary extending # what the LLG files at ftp://xiron.pc.helsinki.fi/pub/lojban/wordlists # provide. It is very much 'work in progress' # # Changes to common cmavo etc a:or be'o: be: : bei:and bo: : boi: : cai:intense co:of-type cu:is/does da:X de:Y di:Z di'a:resume doi:O! e:and fa: : fai: : fe: : fe'u: : fi'a:what role has?: fi'o:modal of.. fi: : fo'a:he/she/it fo'e:he/she/it fo'i:he/she/it fo'o:he/she/it fo'u:he/she/it fo: : fu: : ga:either(or) ge:both(and) ge'u: gi'a:or gi'e:and gi:and/or goi:equivalently i:`.' ja:or je:and ka:property of ke'a:it ke'e: : ke: : kei: : ko'a:he/she/it ko'e:he/she/it ko'i:he/she/it ko'o:he/she/it ko'u:he/she/it ku'o: ku: : la: : lai:between them le:the lei:between them the li'u:$CLOSEQUOTE lo:any/some loi:the mass of all lu:$OPENQUOTE mei:-some mi:I, me moi:-st/nd/th mu'e:point-event of na'e:not na:not ne:,associated with..., noi:,which.., nu:event of pe:associated with pe'a:figurative po:of poi:which ro:every roi:-times to'e:opposite of to'i:editor-( toi:):left blank, should indicate via bracketing xu:yes/no? zi'e:and jai: : li'i:experience of me:amongst those that are ko:YOU! do'u: :end vocative se'u: :end discursive sei:discursive ri:the latter ra:the former:A bit shaky! li:No.: pi'e:- to:(: pi:. vu'o: : tu'a: :action to do with ja'a:{AFFIRM} zo'u:({- as for) vau: :end simple bridi xa'o:insufficient za'o:excessive cai:extreme sai:strong ru'e:weak cu'i:neutral # I'm not sure these are right, but the refgram doesn't cover # what CAI followed by NAI means. ru'enai:not weak sainai:not strong cainai:not extreme pimei:partial piso'aroi:almost all the time piso'eroi:most of the time piso'oroi:some of the time jai_v:being the jai_n: : jai_a: : jai:[modal] pu@TERM:before pu@NOUN:earlier pu@SELBRI:was/did pu@LINK:earlier, pu@CONNECT:earlier ca@TERM:when ca@NOUN:current ca@SELBRI:is/does ca@LINK:at the same time, ca@CONNECT:when ca@JAI:time of ba@TERM:after ba@NOUN:later ba@SELBRI:will be ba@LINK:later, ba@CONNECT:later ca'o@TERM:during ca'o@NOUN:ongoing ca'o@SELBRI:in progress ca'o@LINK:during that, ca'o@CONNECT:during that ca'o@JAI:time of pu'o@TERM:prior to pu'o@NOUN:yet-to-be pu'o@SELBRI:yet-to-be pu'o@LINK:prior to that, pu'o@CONNECT:prior to that pu'o@JAI:aftermath of ba'o@TERM:after ba'o@NOUN:finished ba'o@SELBRI:finished ba'o@LINK:after that, ba'o@CONNECT:after that ba'o@JAI:precursor of co'a@TERM:at the start of co'a@NOUN:still-to-start co'a@SELBRI:start to co'a@LINK:at the start of that, co'a@CONNECT:at the start of that co'a@JAI:thing starting at the time of co'u@TERM:at the end of co'u@NOUN:completed co'u@SELBRI:completed co'u@LINK:at the end of that, co'u@CONNECT:at the end of that co'u@JAI:thing ending at the time of puzi@SELBRI:just before puza@SELBRI:somewhat before puzu@SELBRI:a long time before cazi@SELBRI:at this time caza@SELBRI:around this time cazu@SELBRI:vaguely around this time bazi@SELBRI:just after baza@SELBRI:somewhat after bazu@SELBRI:a long time after vi@TERM:near to vi@NOUN:nearby vi@SELBRI:nearby vi@LINK:there, vi@CONNECT:there vi@JAI:location of va@TERM:some distance from va@NOUN:somewhat distant va@SELBRI:some distance away va@LINK:some distance away, va@CONNECT:some distance away va@JAI:middle distance from vu@TERM:a long way from vu@NOUN:distant vu@SELBRI:remotely vu@LINK:in the distance, vu@CONNECT:in the distance vu@JAI:long distance from ga'u@TERM:above ga'u@NOUN:(upwards)- ga'u@SELBRI:upwards ga'u@LINK:above, ga'u@CONNECT:above ga'u@JAI:below zu'a@TERM:to the left of zu'a@NOUN:(to the left)- zu'a@SELBRI:to the left zu'a@LINK:to the left, zu'a@CONNECT:to the left zu'a@JAI:to the right of # Afterthought connectives FFFF@AFTER:[IMPOSSIBLE!] FFFT@AFTER:[not that, and also not] FFTF@AFTER:[not that, however] FFTT@AFTER:[not that, whether or not] FTFF@AFTER:[but not] FTFT@AFTER:[or not, but certainly not] FTTF@AFTER:[one of LHS or RHS, but not both] FTTT@AFTER:[LHS and RHS not both true] TFFF@AFTER:and TFFT@AFTER:[if and only if] TFTF@AFTER:[or not, but certainly] TFTT@AFTER:[only if / implies] TTFF@AFTER:[whether or not] TTFT@AFTER:[if / implied by] TTTF@AFTER:and/or TTTT@AFTER:[IMPOSSIBLE!] QQQQ@AFTER:[connective?] # Forethought connectives FFFF@GE:[IMPOSSIBLE!] FFFF@GI:[IMPOSSIBLE!] FFFT@GE:[not] FFFT@GI:[and also not] FFTF@GE:[not] FFTF@GI:[however] FFTT@GE:[not] FFTT@GI:[whether or not] FTFF@GE: : FTFF@GI:[but not] FTFT@GE:[whether or not] FTFT@GI:[certainly not] FTTF@GE:[precisely one of] FTTF@GI:[and] FTTT@GE:[not both] FTTT@GI:[and] TFFF@GE:both TFFF@GI:and TFFT@GE: : TFFT@GI:[if and only if] TFTF@GE:[whether or not] TFTF@GI:[certainly] TFTT@GE:[if] TFTT@GI:[then] TTFF@GE: : TTFF@GI:[whether or not] TTFT@GE: TTFT@GI:[implied by] TTTF@GE:either TTTF@GI:and/or TTTT@GE:[IMPOSSIBLE!] TTTT@GI:[IMPOSSIBLE!] QQQQ@GE: : QQQQ@GI:[connective?] ka'a:with go-er nu1:D;event* of ka1:S;property of ni1:S;amount of ni2:D;scale* for measurement jei1:S;truth value of jei2:D;epistemology li'i1:D;experience* of li'i2:D;experiencer* of si'o1:D;idea* of si'o2:P;with idea si'o2n:person with idea si'o2v:having idea of si'o2t:person with idea si'o2a:with idea of du'u1:S;fact that du'u2:S;fact expressed by su'u1:S;abstract nature of za'i1:S;state of zu'o1:S;activity of pu'u1:S;process of mu'e1:D;point event* of me1:S;referent of #%d mei1:D;#%d-some mei2:D;set* with #%d members mei2t:formed from set mei3:D;property* of subset mei3t:with property moi1:P;#%dth moi2:D;ordered set moi3:D;ordering rules si'e1:D;#%dth portion si'e2:P;portioned cu'o1:D;event with prob. #%d cu'o2:S;event conditions cu'o2t:under conditions va'e:scale selbri va'e1:R;at position #%d on scale va'e2:S;scale va'e2t:on scale bau@JAI:language of bi'e:hi priority ce'e: : ce'u:lambda ju'e:vague connective pe'e:respectively re'u:nth time +bi'e:BIhE +ce'e:CEhE +ce'u:KOhA8 +ju'e:JOI +pe'e:PEhE +re'u:ROI +pe'a:UI +po'a:UI # Letters a.bu:"a" e.bu:"e" i.bu:"i" o.bu:"o" u.bu:"u" y'y.bu:"h" ky.bu:"q" vy.bu:"w" denpa.bu:"." slaku.bu:"," jbofihe-0.38/functions.c100644 765 764 43731 7350750737 14323 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/functions.c,v 1.10 2001/03/01 22:40:44 richard Exp $ General functions. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include "functions.h" #include "nonterm.h" #include "rpc_tab.h" /* command line option */ extern int insert_elidables; /*++++++++++++++++++++++++++++++ Go through children in a node and chain them onto that parent. Also, set the start line/column of the nonterminal to that of the first child. ++++++++++++++++++++++++++++++*/ static void mark_children(TreeNode *parent) { int i; struct nonterm *nt; TreeNode *c; assert(parent->type == N_NONTERM); nt = & parent->data.nonterm; for (i=0; inchildren; i++) { c = nt->children[i]; c->parent = parent; } if (nt->nchildren > 0) { parent->start_line = nt->children[0]->start_line; parent->start_column = nt->children[0]->start_column; } else { parent->start_line = 0; parent->start_column = 0; } } /*++++++++++++++++++++++++++++++++++++++ Compress child array to remove NULLs. This situation should only arise if one of the children is the result of matching an error token, and has no proper contents (e.g. paragraph). Without this, the mark_children function will blow up. ++++++++++++++++++++++++++++++++++++++*/ static void compress_children(TreeNode *parent) { int i, j; struct nonterm *nt; assert(parent->type == N_NONTERM); nt = & parent->data.nonterm; j = 0; for (i=0; inchildren; i++) { if (nt->children[j] = nt->children[i]) j++; } nt->nchildren = j; return; } /*++++++++++++++++++++++++++++++++++++++ Return a new dynamically allocated token / node. TreeNode * new_node Return the new node. ++++++++++++++++++++++++++++++++++++++*/ TreeNode * new_node(void) { TreeNode *result = new(TreeNode); result->ext = NULL; result->bahe = NULL; result->ui_next = result->ui_prev = (TreeNode *) &result->ui_next; result->eols = 0; return result; } /*++++++++++++++++++++++++++++++ Create new non-terminal nodes ++++++++++++++++++++++++++++++*/ TreeNode * new_elidable(int code, int selmao) { TreeNode *result; if (insert_elidables) { result = new_node(); result->type = N_CMAVO; result->start_line = result->start_column = 0; result->data.cmavo.code = code; result->data.cmavo.selmao = selmao; prop_elidable(result, YES); } else { result = NULL; } return result; } /*++++++++++++++++++++++++++++++ Create new non-terminal nodes ++++++++++++++++++++++++++++++*/ TreeNode * new_node_0(NonTerm nt) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 0; result->data.nonterm.children = NULL; result->data.nonterm.brackets = BR_NONE; /* only arises for empty TEXT anyway */ result->start_line = result->start_column = 0; return result; } /*++++++++++++++++++++++++++++++++++++++ TreeNode * new_node_1 NonTerm nt TreeNode *c1 ++++++++++++++++++++++++++++++++++++++*/ TreeNode * new_node_1(NonTerm nt, TreeNode *c1) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 1; result->data.nonterm.children = new_array(TreeNode *, 1); result->data.nonterm.children[0] = c1; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } /*++++++++++++++++++++++++++++++++++++++ TreeNode * new_node_2 NonTerm nt TreeNode *c1 TreeNode *c2 ++++++++++++++++++++++++++++++++++++++*/ TreeNode * new_node_2(NonTerm nt, TreeNode *c1, TreeNode *c2) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 2; result->data.nonterm.children = new_array(TreeNode *, 2); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } /*++++++++++++++++++++++++++++++++++++++ TreeNode * new_node_3 NonTerm nt TreeNode *c1 TreeNode *c2 TreeNode *c3 ++++++++++++++++++++++++++++++++++++++*/ TreeNode * new_node_3(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 3; result->data.nonterm.children = new_array(TreeNode *, 3); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ TreeNode * new_node_4(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 4; result->data.nonterm.children = new_array(TreeNode *, 4); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ TreeNode * new_node_5(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 5; result->data.nonterm.children = new_array(TreeNode *, 5); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_6(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 6; result->data.nonterm.children = new_array(TreeNode *, 6); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_7(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 7; result->data.nonterm.children = new_array(TreeNode *, 7); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_8(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 8; result->data.nonterm.children = new_array(TreeNode *, 8); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; result->data.nonterm.children[7] = c8; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_9(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 9; result->data.nonterm.children = new_array(TreeNode *, 9); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; result->data.nonterm.children[7] = c8; result->data.nonterm.children[8] = c9; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_10(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 10; result->data.nonterm.children = new_array(TreeNode *, 10); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; result->data.nonterm.children[7] = c8; result->data.nonterm.children[8] = c9; result->data.nonterm.children[9] = c10; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_11(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10, TreeNode *c11) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 11; result->data.nonterm.children = new_array(TreeNode *, 11); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; result->data.nonterm.children[7] = c8; result->data.nonterm.children[8] = c9; result->data.nonterm.children[9] = c10; result->data.nonterm.children[10] = c11; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } TreeNode * new_node_12(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10, TreeNode *c11, TreeNode *c12) { TreeNode *result; result = new_node(); result->type = N_NONTERM; result->data.nonterm.type = nt; result->data.nonterm.nchildren = 12; result->data.nonterm.children = new_array(TreeNode *, 12); result->data.nonterm.children[0] = c1; result->data.nonterm.children[1] = c2; result->data.nonterm.children[2] = c3; result->data.nonterm.children[3] = c4; result->data.nonterm.children[4] = c5; result->data.nonterm.children[5] = c6; result->data.nonterm.children[6] = c7; result->data.nonterm.children[7] = c8; result->data.nonterm.children[8] = c9; result->data.nonterm.children[9] = c10; result->data.nonterm.children[10] = c11; result->data.nonterm.children[11] = c12; compress_children(result); mark_children(result); result->data.nonterm.brackets = BR_NONE; return result; } /*++++++++++++++++++++++++++++++ Check whether a node is non-terminal of a particular type ++++++++++++++++++++++++++++++*/ void type_check(TreeNode *x, NonTerm type) { assert((x->type == N_NONTERM) && (x->data.nonterm.type == type)); } /*++++++++++++++++++++++++++++++++++++++ Return number of children a nonterminal has static int nch The number TreeNode *x The nonterminal. ++++++++++++++++++++++++++++++++++++++*/ int nch(TreeNode *x) { assert(x->type == N_NONTERM); return x->data.nonterm.nchildren; } /*++++++++++++++++++++++++++++++++++++++ Return a reference to a particular child within a non-terminal, checking that the index is in bounds. static TreeNode * child_ref Returned reference TreeNode *x The nonterminal. int i The index (0..n-1) ++++++++++++++++++++++++++++++++++++++*/ TreeNode * child_ref(TreeNode *x, int i) { struct nonterm *nt; assert(x->type == N_NONTERM); assert(i>=0); nt = & x->data.nonterm; assert(i < nt->nchildren); return nt->children[i]; } /*++++++++++++++++++++++++++++++ Find the nth node (counting from 1) of a particular type amongst the children of node x. Return null if there aren't any. Trap if x is terminal. ++++++++++++++++++++++++++++++*/ TreeNode * find_nth_child(TreeNode *x, int n, NonTerm type) { struct nonterm *nt; TreeNode *c; int i, nc, togo; assert(x->type == N_NONTERM); nt = & x->data.nonterm; togo = n; nc = nt->nchildren; for (i=0; ichildren[i]; if ((c->type == N_NONTERM) && (c->data.nonterm.type == type)) { --togo; if (togo == 0) { return c; } } } return NULL; } /*++++++++++++++++++++++++++++++ Find the nth node (counting from 1) of a particular type amongst the children of node x. Return null if there aren't any. Trap if x is terminal. If one of the immediate children is a nonterm of type AUGMENTED, drill down into that. This allows the child we are looking for to have attitudinals attached to it. TreeNode * find_nth_cmavo_child The returned child, NULL if not found TreeNode *x The parent child whose children are to be searched int n The index of the child to find (starting from 1 for the first) int selmao The selmao of the child being sought. ++++++++++++++++++++++++++++++*/ TreeNode * find_nth_cmavo_child(TreeNode *x, int n, int selmao) { struct nonterm *nt, *ntc; TreeNode *c, *cc; int i, j, nc, ncc, togo; assert(x->type == N_NONTERM); nt = & x->data.nonterm; togo = n; nc = nt->nchildren; for (i=0; ichildren[i]; if ((c->type == N_CMAVO) && (c->data.cmavo.selmao == selmao)) { --togo; if (togo == 0) { return c; } } else if ((c->type == N_NONTERM) && (c->data.nonterm.type == AUGMENTED)) { ntc = & c->data.nonterm; ncc = ntc->nchildren; for (j=0; jchildren[j]; if ((cc->type == N_CMAVO) && (cc->data.cmavo.selmao == selmao)) { --togo; if (togo == 0) { return cc; } } } } } return NULL; } /*++++++++++++++++++++++++++++++++++++++ Given a treenode, either it is a cmavo, or it's an AUGMENTED with a non-attitudinal cmavo amongst the children. Find the child with the right selmao, and trap if there isn't one. ++++++++++++++++++++++++++++++++++++++*/ TreeNode * strip_attitudinal(TreeNode *x) { if (x->type == N_CMAVO) { return x; } else if (x->type == N_NONTERM) { TreeNode **child, **child0; int N; struct nonterm *nt; nt = &(x->data.nonterm); assert(nt->type == AUGMENTED); N = nt->nchildren; child = child0 = nt->children; while (((*child)->type == N_CMAVO) && ((*child)->data.cmavo.selmao == BAhE)) { child++; assert ((child - child0) < N); } return *child; } } /*++++++++++++++++++++++++++++++++++++++ If node is augmented, get main internal cmavo. ++++++++++++++++++++++++++++++++++++++*/ TreeNode * maybe_strip_attitudinal(TreeNode *x) { if ((x->type == N_NONTERM) && (x->data.nonterm.type == AUGMENTED)) { return strip_attitudinal(x); } else { return x; } } /*++++++++++++++++++++++++++++++++++++++ Return 1 if all children are cmavo int is_simple_nonterm TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ int is_simple_nonterm(TreeNode *x) { int ok; int nc; int i; struct nonterm *nt; TreeNode *c; assert(x->type == N_NONTERM); nt = &x->data.nonterm; nc = nt->nchildren; ok = 1; for (i=0; ichildren[i]; if (c->type == N_NONTERM) { ok = 0; break; } } return ok; } /*++++++++++++++++++++++++++++++++++++++ Turn a string into uppercase. Can only deal with one string at a time. ++++++++++++++++++++++++++++++++++++++*/ char * make_uppercase(char *s) { static char buffer[1024]; char *p; strcpy(buffer, s); p = buffer; while (*p) *p = toupper(*p), p++; return buffer; } jbofihe-0.38/functions.h100644 765 764 15323 7350750737 14324 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/functions.h,v 1.13 2001/06/22 22:17:14 richard Exp $ Prototypes for functions ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef FUNCTIONS_H #define FUNCTIONS_H /*+ To stop multiple inclusions. +*/ #include #include #include "nonterm.h" #include "nodes.h" #include "output.h" #define new_string(s) strcpy((char *) Malloc(1+strlen(s)), (s)) #define extend_string(x,s) (strcat(Realloc(x, (strlen(x)+strlen(s)+1)), s)) #define new(T) (T *) Malloc(sizeof(T)) #define new_array(T, n) (T *) Malloc(sizeof(T) * (n)) #define grow_array(T, n, oldX) (T *) ((oldX) ? Realloc(oldX, (sizeof(T) * (n))) : Malloc(sizeof(T) * (n))) /* In functions.c */ TreeNode *new_node(void); TreeNode *new_elidable(int code, int selmao); TreeNode * new_node_0(NonTerm nt); TreeNode * new_node_1(NonTerm nt, TreeNode *c1); TreeNode * new_node_2(NonTerm nt, TreeNode *c1, TreeNode *c2); TreeNode * new_node_3(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3); TreeNode * new_node_4(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4); TreeNode * new_node_5(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5); TreeNode * new_node_6(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6); TreeNode * new_node_7(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7); TreeNode * new_node_8(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8); TreeNode * new_node_9(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9); TreeNode * new_node_10(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10); TreeNode * new_node_11(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10, TreeNode *c11); TreeNode * new_node_12(NonTerm nt, TreeNode *c1, TreeNode *c2, TreeNode *c3, TreeNode *c4, TreeNode *c5, TreeNode *c6, TreeNode *c7, TreeNode *c8, TreeNode *c9, TreeNode *c10, TreeNode *c11, TreeNode *c12); extern void type_check(TreeNode *x, NonTerm type); extern TreeNode * child_ref(TreeNode *x, int i); extern int nch(TreeNode *x); extern TreeNode *find_nth_child(TreeNode *x, int n, NonTerm type); extern TreeNode *find_nth_cmavo_child(TreeNode *x, int n, int selmao); extern TreeNode *strip_attitudinal(TreeNode *x); extern TreeNode *maybe_strip_attitudinal(TreeNode *x); extern int is_simple_nonterm(TreeNode *x); extern char *make_uppercase(char *s); /* In categ.c */ void categorize_tokens(TreeNode *head); /* In lex2.c */ void lex2_initialise(void); void add_token(TreeNode *tok); void mark_eol(void); void delete_node(TreeNode *x); void free_node(TreeNode *x); void show_tokens(void); void preprocess_tokens(void); void error_advance(int code); int yylex(void); void print_last_toks(void); /* Return dynamically allocated string */ char *build_string_from_nodes(TreeNode *start, TreeNode *end); char *build_string_from_node(TreeNode *the_node); /* In erasure.c */ void do_erasures(TreeNode *toks); /* In lex1.c */ void parse_file(FILE *f); /* In tree.c */ void compress_singletons(TreeNode *x); void print_parse_tree(TreeNode *x); void print_bracketed_text(TreeNode *top, int gloss); void expand_bahe_ui(TreeNode *top); /* In translate.c */ char * translate(char *word); typedef enum { TCX_NOUN = 0, TCX_VERB = 1, TCX_QUAL = 2, TCX_TAG = 3 } TransContext; char *translate_unknown(char *w, int place, TransContext ctx); char *adv_translate(char *w, int place, TransContext ctx); /* In output.c */ extern void add_bracketing_tags(TreeNode *top); extern void do_output(TreeNode *top, DriverVector *driver); /* In properties.c */ #define YES 1 #define NO 0 extern XConversion *prop_conversion(TreeNode *x, int create); extern XBaiConversion *prop_bai_conversion(TreeNode *x, int create); extern XDontGloss *prop_dont_gloss(TreeNode *x, int create); extern XTermVectors *prop_term_vectors(TreeNode *x, int create); extern XTermVector *prop_term_vector(TreeNode *x, int create); extern XTermTags *prop_term_tags(TreeNode *x, int create); extern XGlosstype *prop_glosstype(TreeNode *x, int create); extern XDoneTU1 *prop_done_tu1(TreeNode *x, int create); extern XDoneS3 *prop_done_s3(TreeNode *x, int create); extern XTenseCtx *prop_tense_ctx(TreeNode *x, int create); extern XNegIndicator *prop_neg_indicator(TreeNode *x, int create); extern XCaiIndicator *prop_cai_indicator(TreeNode *x, int create); extern XConnective *prop_connective(TreeNode *x, int create); extern XAntecedent *prop_antecedent(TreeNode *x, int create); extern XRequireBrac *prop_require_brac(TreeNode *x, int create); extern XRelClauseLink *prop_rel_clause_link(TreeNode *x, int create); extern XContainsKeha *prop_contains_keha(TreeNode *x, int create); extern XElidable *prop_elidable(TreeNode *x, int create); /* In conversion.c */ extern void do_conversions(TreeNode *top); /* In terms.c */ extern void terms_processing(TreeNode *top); /* In memory.c */ extern void *Malloc(size_t n); extern void *Realloc(void *old, size_t n); extern void Free(void *x); extern void print_memory_statistics(void); /* In tenses.c */ extern void tense_processing(TreeNode *top); /* In connect.c */ extern void connectives_processing(TreeNode *top); /* In relative.c */ extern void relative_clause_processing (TreeNode *top); /* In errorscan.c */ extern void error_scan (TreeNode *x); #endif /* FUNCTIONS_H */ jbofihe-0.38/htmlout.c100644 765 764 16201 7350750737 13777 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/htmlout.c,v 1.2 2001/05/28 21:30:15 richard Exp $ Driver for producing HTML output from the glosser. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" #include "output.h" typedef enum { ST_OPEN, ST_TEXT, ST_CLOSE, ST_START } States; static States state; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void initialise(void) { state = ST_START; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_prologue(void) { printf("\n" "\n" "Lojban translation\n" "\n"); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_epilog(void) { printf("\n"); } /* Number of end of lines that are pending. (These are only inserted when we have closed a sequence of close brackets, i.e. before the next open bracket or ordinary text.) */ static int pending_eols = 0; /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void clear_eols(void) { if (pending_eols > 0) { printf("\n

\n"); state = ST_OPEN; pending_eols = 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void set_eols(int eols) { pending_eols += eols; } #define PRINT_SUB printf("%d", subscript) /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_open_bracket(BracketType type, int subscript) { clear_eols(); switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf("("); PRINT_SUB; break; case BR_SQUARE: printf("["); PRINT_SUB; break; case BR_BRACE: printf("{"); PRINT_SUB; break; case BR_ANGLE: printf("<"); PRINT_SUB; break; case BR_CEIL: printf("("); PRINT_SUB; break; case BR_FLOOR: printf("("); PRINT_SUB; break; case BR_TRIANGLE: printf("<<"); PRINT_SUB; break; } state = ST_OPEN; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_close_bracket(BracketType type, int subscript) { switch (state) { case ST_START: case ST_CLOSE: case ST_TEXT: break; case ST_OPEN: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf(")"); PRINT_SUB; break; case BR_SQUARE: printf("]"); PRINT_SUB; break; case BR_BRACE: printf("}"); PRINT_SUB; break; case BR_ANGLE: printf(">"); PRINT_SUB; break; case BR_CEIL: printf(")"); PRINT_SUB; break; case BR_FLOOR: printf(")"); PRINT_SUB; break; case BR_TRIANGLE: printf(">>"); PRINT_SUB; break; } state = ST_CLOSE; } /*++++++++++++++++++++++++++++++ Make a string safe for setting with HTML. static char * make_htmlsafe char *s ++++++++++++++++++++++++++++++*/ static char * make_htmlsafe(char *s) { static char buf[2048]; char *p, *q; p = s; q = buf; while (*p) { switch (*p) { case '&': strcpy(q, "&"); q += 5; break; case '<': strcpy(q, "<"); q += 4; break; case '>': strcpy(q, ">"); q += 4; break; default: *q++ = *p++; break; } } *q = 0; return buf; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_lojban_text(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf("\n"); break; } printf("%s", text); state = ST_TEXT; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_special(char *text) { if (!strcmp(text, "$LEFTARROW")) { printf("<-"); } else if (!strcmp(text, "$OPENQUOTE")) { printf("""); } else if (!strcmp(text, "$CLOSEQUOTE")) { printf("""); } } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_translation(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf("\n"); break; } if (text[0] == '$') { write_special(text); } else { printf("%s", make_htmlsafe(text)); } state = ST_TEXT; } /*+ +*/ static int first_tag; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tags(void) { printf("["); first_tag = 1; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void end_tags(void) { printf(":] "); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tag(void) { if (!first_tag) { printf(", "); } first_tag = 0; } /*++++++++++++++++++++++++++++++++++++++ char *brivla int place char *trans ++++++++++++++++++++++++++++++++++++++*/ static void write_tag_text(char *brivla, char *place, char *trans, int brac) { if (brac) { printf("%s%s (%s)\n", brivla, place, make_htmlsafe(trans)); } else { printf("%s%s %s\n", brivla, place, make_htmlsafe(trans)); } } static void write_partial_tag_text(char *t)/*{{{*/ { printf("%s", t); } /*}}}*/ DriverVector html_driver =/*{{{*/ { initialise, write_prologue, write_epilog, write_open_bracket, write_close_bracket, set_eols, write_lojban_text, write_translation, start_tags, end_tags, start_tag, write_tag_text, write_partial_tag_text };/*}}}*/ jbofihe-0.38/jbofihe.1100644 765 764 13221 7350750737 13626 0ustar richardruser.TH "jbofihe" 1L "January 2001" .SH NAME jbofihe \- Lojban parser / grammar checker / word glosser .SH SYNOPSIS .B jbofihe [-v] [ -h | --help | -? ] [ -k ] [ -t ] [-tf ] [ -l ] [ -b ] [ -x ] [ -H ] [ -m ] [ -w width ] [-ie] [-re] [-se] [-sev] [-cr] [-bt] [filename] .SH DESCRIPTION .I jbofihe is a program that reads a piece of Lojban text and checks it for grammatical correctness. If it passes, the output will show the nesting of the major grammatical constructs by means of bracketing. Also, words will have their approximate English translations shown. Some of these translations are context-dependent. .SH OPTIONS .TP .B -v Show the program version and exit. .TP .B -h Show help page .TP .B --help Show help page .TP .B -? Show help page .TP .B -k Display lists of tokens after parse and after pseudo-token insertion (mainly useful for debugging the lexer and parser). .TP .B -t Produce a syntax tree on stdout. Nodes with only one child will be filtered out. .TP .B -tf Produce a full syntax tree on stdout, including nodes with only one child. .TP .B -l Produce output for typesetting with LaTeX. .TP .B -x Produce plain text output. .TP .B -w width Set the width of the screen (in characters) for the -x option. .TP .B -H Produce HTML output .TP .B -b Produce output in 'block' mode, where each block shows the Lojban, the English gloss and a term tag where applicable. The default is 'running' mode, with term tags, Lojban and the English gloss all on the same line. Only applicable to -l and -x (not to -h). .TP .B -m Show the amount of memory used by the processing. .TP .B -ie Display elided separators and terminators in the output. They are shown in upper case, to distinguish them from those originally present in the input text. .TP .B -re Require the input text to have all elidable cmavo actually present. (May be useful for forcing the user to think about the grammatical structure of the input text more carefully when debugging parse errors.) .TP .B -se Show any elidable cmavo that were present unnecessarily in the input text. Where a sequence of elidable cmavo occur, but not all could have been elided, a list of possible 'minimal' sequences is shown. Each 'minimal' sequence is such that : removing any words from it would cause the meaning of the text to change (or make it ungrammatical); yet preserving any more of the original words is unnecessary to preserve the meaning and grammatical correctness of the text. Note, -se and -re are mutually incompatible. If both switches are specified, -re is assumed. .TP .B -sev For each sequence of elidable cmavo, show where later ones could be valid before earlier ones, and where the non-elidable word at the end of the sequence could have been valid earlier in the sequence. [This information is used to determine the output of -se, so this is a verbose mode for -se]. .TP .B -cr Allow lujvo to contain the cultural rafsi forms CCVVCy (CCVVCV at end of word) described in section 4.16 of the Reference Grammar. This affects recognition of valid lujvo and fu'ivla forms (the latter since it affects the recognition of slinku'i failures). .TP .B -bt Show backtrace through the pending parser states when a syntax error occurs. This may give some insight into what the parser was expecting to see next, to help in fixing the error. .IP The backtrace comes in three parts. The first part is a list of rules which are automatically reduced when the erroneous word is encountered. In the extreme case, when everything prior to the erroneous word constitutes a complete text in its own right, the reduction sequence will go right the way to the rule which matches a complete text. Generally though, this will not be the case. .IP The second part of the report shows the conditions where the grammar requires the next word to be of a type other than that which actually appeared. All the active rules are shown (with periods showing the active points), followed by a list of word classes (i.e. selma'o or BRIVLA/CMENE etc) that would have been valid at this point. .IP The third part of the report shows the pending states on the parser stack. This may give some information on whereabouts at a wider level the problem situation has occurred. .TP .B filename The name of the file containing text to be parsed. If omitted, the text is read from standard input. .SH EXIT STATUS .TP .B 0 The text was scanned and parsed successfully - the text was grammatically valid Lojban. .TP .B "1/2" The text had grammatical errors that were detected by the main parsing algorithm. .TP .B 3 The text contained words whose structure was not valid Lojban. No grammatical checking of the text was performed; the grammatical function of the erroneous word(s) could not be determined. .SH SEE ALSO .PP .TP .B cmafihe A program which does English word glossing without the grammar parsing and checking stage. This is useful to get words quickly looked up when studying someone else's text which contains many grammatical errors. .TP .B smujajgau A program for compiling binary dictionaries for use by jbofihe .SH FILES .TP .B /usr/local/lib/jbofihe/smujmaji.dat This file contains all the dictionary data compiled (using .I smujajgau ) into a binary format to facilitate lookup and search. .TP .B /usr/local/bin/jbofihe The executable. .SH ENVIRONMENT .TP .B JBOFIHE_DICTIONARY This should point to the name of the file containing the dictionary. The default is /usr/local/lib/jbofihe/smujmaji.dat \".SH CAVEATS .SH BUGS ju'oru'e so'imei (Surely there are many). .SH REFERENCES .TP .B http://go.to/jbofihe Home page for the jbofihe project .TP .B http://www.rrbcurnow.freeuk.com/lojban/ My Lojban page. .TP .B http://www.lojban.org/ Home page of the Lojban community .SH AUTHOR Richard Curnow .B jbofihe-0.38/jvocuhadju.1100644 765 764 3453 7350750737 14350 0ustar richardruser.TH "jvocuhadju" 1L "April 2000" .SH NAME jvocuhadju \- Lujvo picker (based on the rules in the reference grammar.) .SH SYNOPSIS .PP .B jvocuhadju [-v] [-a] [-l] .I tanru-component-1 [ .BR "" ... .I tanru-component-n ] .SH DESCRIPTION .I jvocuhadju is a program that reads a list of tanru-components (gismu or cmavo) on the command line, and constructs the possible short-form lujvo corresponding to those components in sequence. The possible lujvo are displayed ranked in order of desirability, with their scores shown based on the algorithm in the reference grammar. The lowest score is best. .PP Where a tanru-component is a cmavo containing an apostrophe, the apostrophe may be replaced by the letter "h" on the command line. This is a convenience to avoid having to backslash-escape the apostrophe to hide it from the shell. .SH OPTIONS .TP .B -v Show the program version and exit. .TP .B -a List all possible lujvo for the input tanru (default is just the best 8). .TP .B -l Allow 4/5 letter rafsi to be picked even if a 3 letter form is available for any particular tanru component. .TP .B tanru-component-k This is a gismu or cmavo which is one component of the word. Cmavo must have a rafsi corresponding to them. .SH SEE ALSO .PP .TP .B jbofihe Checks Lojban grammar checker and provides English translations of the individual words. .TP .B cmafihe Provides English translations of Lojban words in the input, without checking the grammar. Useful for getting a rough translation of grammatically invalid text. .SH FILES .SH BUGS ju'oru'e so'imei (Surely there are many). .SH REFERENCES .TP .B http://go.to/jbofihe Home page for the jbofihe project .TP .B http://www.lojban.org/ Home page of the Lojban community .TP .B http://www.rrbcurnow.freeuk.com/lojban/ My Lojban page. .SH AUTHOR Richard Curnow .B jbofihe-0.38/jvocuhadju.c100644 765 764 135257 7350750737 14502 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/jvocuhadju.c,v 1.7 2001/07/08 21:48:37 richard Exp $ Program to generate the lujvo form of a given tanru ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "lujvofns.h" #include "version.h" static int uselong = 0; /* Consider lujvo including long rafsi when short ones are available */ static int showall = 0; /* List all lujvo, not just the best MAXLUJVO of them */ static int ends_in_vowel(char *s) { char *p; p = s; while (*p) p++; p--; return is_vowel(*p); } static void chop_last_char(char *s) { char *p; p = s; while (*p) p++; p--; *p = 0; } /* See whether a pair of strings can be joined within a word (i.e. do they have an acceptable consonant pair */ static int can_join(char *s1, char *s2) { char e1, f2; char *p; char trial[3]; int test1, test2, test3; f2 = s2[0]; p = s1; while (*p) p++; p--; e1 = *p; trial[0] = e1; trial[1] = f2; test1 = is_pairok(trial); /* Check pair across join are acceptable middle consonant pair, this is required whether or not the second string starts with a consonant pair */ if (is_consonant(s2[1])) { test2 = is_initialpairok(s2); if (e1 == 'n') { test3 = (strncmp(s2, "dj", 2) && strncmp(s2, "dz", 2) && strncmp(s2, "tc", 2) && strncmp(s2, "ts", 2)); } else { test3 = 1; } return test1 && test2 && test3; } else { return test1; } } /* See whether a pair of consonants at a string join look like an initial pair */ static int initial_join(char *s1, char *s2) { char e1, f2; char *p; char trial[3]; int test1; f2 = s2[0]; p = s1; while (*p) p++; p--; e1 = *p; trial[0] = e1; trial[1] = f2; test1 = is_initialpairok(trial); return test1; } /* Table of all gismu + cmavo which have associated rafsi */ static char *gismu[] = {"bacru", "badna", "badri", "bajra", "bakfu", "bakni", "bakri", "baktu", "balji", "balni", "balre", "balvi", "bancu", "bandu", "banfi", "bangu", "banli", "banro", "banxa", "banzu", "bapli", "barda", "bargu", "barja", "barna", "bartu", "basna", "basti", "batci", "batke", "bavmi", "baxso", "bebna", "bemro", "bende", "bengo", "benji", "bersa", "berti", "besna", "betfu", "betri", "bevri", "bi", "bi'i", "bidju", "bifce", "bikla", "bilga", "bilma", "bilni", "bindo", "binra", "binxo", "birje", "birka", "birti", "bisli", "bitmu", "blabi", "blaci", "blanu", "bliku", "bloti", "bo", "bolci", "bongu", "botpi", "boxfo", "boxna", "bradi", "bratu", "brazo", "bredi", "bridi", "brife", "briju", "brito", "broda", "brode", "brodi", "brodo", "brodu", "bruna", "bu", "bu'a", "budjo", "bukpu", "bumru", "bunda", "bunre", "burcu", "burna", "ca'a", "cabna", "cabra", "cacra", "cadzu", "cafne", "cakla", "calku", "canci", "cando", "cange", "canja", "canko", "canlu", "canpa", "canre", "canti", "carce", "carmi", "carna", "cartu", "carvi", "casnu", "catke", "catlu", "catni", "catra", "caxno", "ce", "ce'i", "ce'o", "cecla", "cecmu", "cedra", "cenba", "censa", "centi", "cerda", "cerni", "certu", "cevni", "cfari", "cfika", "cfila", "cfine", "cfipu", "ci", "ciblu", "cicna", "cidja", "cidni", "cidro", "cifnu", "cigla", "cikna", "cikre", "ciksi", "cilce", "cilmo", "cilre", "cilta", "cimde", "cimni", "cinba", "cindu", "cinfo", "cinje", "cinki", "cinla", "cinmo", "cinri", "cinse", "cinta", "cinza", "cipni", "cipra", "cirko", "cirla", "ciska", "cisma", "ciste", "citka", "citno", "citri", "citsi", "civla", "cizra", "ckabu", "ckafi", "ckaji", "ckana", "ckape", "ckasu", "ckeji", "ckiku", "ckilu", "ckini", "ckire", "ckule", "ckunu", "cladu", "clani", "claxu", "clika", "clira", "clite", "cliva", "clupa", "cmaci", "cmalu", "cmana", "cmavo", "cmene", "cmila", "cmima", "cmoni", "cnano", "cnebo", "cnemu", "cnici", "cnino", "cnisa", "cnita", "co", "co'a", "co'e", "co'u", "cokcu", "condi", "cortu", "cpacu", "cpana", "cpare", "cpedu", "cpina", "cradi", "crane", "creka", "crepu", "cribe", "crida", "crino", "cripu", "crisa", "critu", "ctaru", "ctebi", "cteki", "ctile", "ctino", "ctuca", "cukla", "cukta", "culno", "cumki", "cumla", "cunmi", "cunso", "cuntu", "cupra", "curmi", "curnu", "curve", "cusku", "cutci", "cutne", "cuxna", "da", "da'a", "dacru", "dacti", "dadjo", "dakfu", "dakli", "damba", "damri", "dandu", "danfu", "danlu", "danmo", "danre", "dansu", "danti", "daplu", "dapma", "dargu", "darlu", "darno", "darsi", "darxi", "daski", "dasni", "daspo", "dasri", "datka", "datni", "decti", "degji", "dejni", "dekpu", "dekto", "delno", "dembi", "denci", "denmi", "denpa", "dertu", "derxi", "desku", "detri", "dicra", "dikca", "diklo", "dikni", "dilcu", "dilnu", "dimna", "dinju", "dinko", "dirba", "dirce", "dirgo", "dizlo", "djacu", "djedi", "djica", "djine", "djuno", "do", "donri", "dotco", "draci", "drani", "drata", "drudi", "du", "du'u", "dugri", "dukse", "dukti", "dunda", "dunja", "dunku", "dunli", "dunra", "dzena", "dzipo", "facki", "fadni", "fagri", "falnu", "famti", "fancu", "fange", "fanmo", "fanri", "fanta", "fanva", "fanza", "fapro", "farlu", "farna", "farvi", "fasnu", "fatci", "fatne", "fatri", "febvi", "femti", "fendi", "fengu", "fenki", "fenra", "fenso", "fepni", "fepri", "ferti", "festi", "fetsi", "figre", "filso", "finpe", "finti", "flalu", "flani", "flecu", "fliba", "flira", "fo'a", "fo'e", "fo'i", "foldi", "fonmo", "fonxa", "forca", "fraso", "frati", "fraxu", "frica", "friko", "frili", "frinu", "friti", "frumu", "fukpi", "fulta", "funca", "fusra", "fuzme", "gacri", "gadri", "galfi", "galtu", "galxe", "ganlo", "ganra", "ganse", "ganti", "ganxo", "ganzu", "gapci", "gapru", "garna", "gasnu", "gasta", "genja", "gento", "genxu", "gerku", "gerna", "gidva", "gigdo", "ginka", "girzu", "gismu", "glare", "gleki", "gletu", "glico", "gluta", "gocti", "gotro", "gradu", "grake", "grana", "grasu", "greku", "grusi", "grute", "gubni", "gugde", "gundi", "gunka", "gunma", "gunro", "gunse", "gunta", "gurni", "guska", "gusni", "gusta", "gutci", "gutra", "guzme", "ja", "jabre", "jadni", "jakne", "jalge", "jalna", "jalra", "jamfu", "jamna", "janbe", "janco", "janli", "jansu", "janta", "jarbu", "jarco", "jarki", "jaspu", "jatna", "javni", "jbama", "jbari", "jbena", "jbera", "jbini", "jdari", "jdice", "jdika", "jdima", "jdini", "jduli", "je", "jecta", "jeftu", "jegvo", "jei", "jelca", "jemna", "jenca", "jendu", "jenmi", "jerna", "jersi", "jerxo", "jesni", "jetce", "jetnu", "jgalu", "jganu", "jgari", "jgena", "jgina", "jgira", "jgita", "jibni", "jibri", "jicla", "jicmu", "jijnu", "jikca", "jikru", "jilka", "jilra", "jimca", "jimpe", "jimte", "jinci", "jinga", "jinku", "jinme", "jinru", "jinsa", "jinto", "jinvi", "jinzi", "jipci", "jipno", "jirna", "jisra", "jitfa", "jitro", "jivbu", "jivna", "jmaji", "jmifa", "jmina", "jmive", "jo", "jo'e", "jo'u", "joi", "jordo", "jorne", "ju", "jubme", "judri", "jufra", "jukni", "jukpa", "julne", "jundi", "jungo", "junla", "junri", "junta", "jurme", "jursa", "jutsi", "juxre", "jvinu", "ka", "kabri", "kacma", "kadno", "kafke", "kagni", "kajde", "kajna", "kakne", "kakpa", "kalci", "kalri", "kalsa", "kalte", "kamju", "kamni", "kampu", "kanba", "kancu", "kandi", "kanji", "kanla", "kanro", "kansa", "kantu", "kanxe", "karbi", "karce", "karda", "kargu", "karli", "karni", "katna", "kavbu", "ke", "ke'e", "kecti", "kei", "kelci", "kelvo", "kenra", "kensa", "kerfa", "kerlo", "ketco", "kevna", "kicne", "kijno", "kilto", "kinli", "kisto", "klaji", "klaku", "klama", "klani", "klesi", "klina", "kliru", "kliti", "klupe", "kluza", "kobli", "kojna", "kolme", "komcu", "konju", "korbi", "korcu", "korka", "kosta", "kramu", "krasi", "krati", "krefu", "krici", "krili", "krinu", "krixa", "kruca", "kruji", "kruvi", "ku'a", "kubli", "kucli", "kufra", "kukte", "kulnu", "kumfa", "kumte", "kunra", "kunti", "kurfa", "kurji", "kurki", "kuspe", "kusru", "labno", "lacpu", "lacri", "ladru", "lafti", "lakne", "lakse", "lalxu", "lamji", "lanbi", "lanci", "lanka", "lanli", "lanme", "lante", "lanxe", "lanzu", "larcu", "lasna", "lastu", "latmo", "latna", "lazni", "le'e", "lebna", "lenjo", "lenku", "lerci", "lerfu", "li'i", "libjo", "lidne", "lifri", "lijda", "limna", "lindi", "linji", "linsi", "linto", "lisri", "liste", "litce", "litki", "litru", "livga", "livla", "lo'e", "logji", "lojbo", "loldi", "lorxu", "lubno", "lujvo", "lumci", "lunbe", "lunra", "lunsa", "mabla", "mabru", "macnu", "makcu", "makfa", "maksi", "malsi", "mamta", "manci", "manfo", "manku", "manri", "mansa", "manti", "mapku", "mapni", "mapti", "marbi", "marce", "marde", "margu", "marji", "marna", "marxa", "masno", "masti", "matci", "matli", "matne", "matra", "mavji", "maxri", "mebri", "megdo", "mei", "mekso", "melbi", "meljo", "menli", "mensi", "mentu", "merko", "merli", "mexno", "mi", "midju", "mifra", "mikce", "mikri", "milti", "milxe", "minde", "minji", "minli", "minra", "mintu", "mipri", "mirli", "misno", "misro", "mitre", "mixre", "mlana", "mlatu", "mleca", "mledi", "mluni", "mo'a", "mo'i", "moi", "mokca", "moklu", "molki", "molro", "morji", "morko", "morna", "morsi", "mosra", "mraji", "mrilu", "mruli", "mu", "mu'e", "mucti", "mudri", "mukti", "mulno", "munje", "mupli", "murse", "murta", "muslo", "mutce", "muvdu", "muzga", "na", "na'e", "nabmi", "nakni", "nalci", "namcu", "nanba", "nanca", "nandu", "nanla", "nanmu", "nanvi", "narge", "narju", "natfe", "natmi", "navni", "naxle", "nazbi", "nejni", "nelci", "nenri", "ni", "nibli", "nicte", "nikle", "nilce", "nimre", "ninmu", "nirna", "nitcu", "nivji", "nixli", "no", "no'e", "nobli", "notci", "nu", "nu'o", "nukni", "nupre", "nurma", "nutli", "nuzba", "pa", "pacna", "pagbu", "pagre", "pajni", "palci", "palku", "palne", "palta", "pambe", "panci", "pandi", "panje", "panka", "panlo", "panpi", "panra", "pante", "panzi", "papri", "parbi", "pastu", "patfu", "patlu", "patxu", "pe'a", "pelji", "pelxu", "pemci", "penbi", "pencu", "pendo", "penmi", "pensi", "perli", "pesxu", "petso", "pezli", "pi", "pi'u", "picti", "pijne", "pikci", "pikta", "pilji", "pilka", "pilno", "pimlu", "pinca", "pindi", "pinfu", "pinji", "pinka", "pinsi", "pinta", "pinxe", "pipno", "pixra", "plana", "platu", "pleji", "plibu", "plini", "plipe", "plise", "plita", "plixa", "pluja", "pluka", "pluta", "polje", "polno", "ponjo", "ponse", "porpi", "porsi", "porto", "prali", "prami", "prane", "preja", "prenu", "preti", "prije", "prina", "pritu", "prosa", "pruce", "pruni", "pruxi", "pu'i", "pu'u", "pulce", "pulji", "pulni", "punji", "punli", "purci", "purdi", "purmo", "racli", "ractu", "radno", "rafsi", "ragve", "rakso", "raktu", "ralci", "ralju", "ralte", "randa", "rango", "ranji", "ranmi", "ransu", "ranti", "ranxi", "rapli", "rarna", "ratcu", "ratni", "re", "rebla", "rectu", "remna", "renro", "renvi", "respa", "ricfu", "rigni", "rijno", "rilti", "rimni", "rinci", "rinju", "rinka", "rinsa", "rirci", "rirni", "rirxe", "rismi", "risna", "ritli", "rivbi", "ro", "roi", "rokci", "romge", "ropno", "rorci", "rotsu", "rozgu", "ruble", "rufsu", "runme", "runta", "rupnu", "rusko", "rutni", "sabji", "sabnu", "sacki", "saclu", "sadjo", "sakci", "sakli", "sakta", "salci", "salpo", "salta", "samcu", "sampu", "sance", "sanga", "sanji", "sanli", "sanmi", "sanso", "santa", "sarcu", "sarji", "sarlu", "sarxe", "saske", "satci", "satre", "savru", "sazri", "se", "sefta", "selci", "selfu", "semto", "senci", "senpi", "senta", "senva", "sepli", "serti", "setca", "sevzi", "sfani", "sfasa", "sfofa", "sfubu", "si'o", "siclu", "sicni", "sidbo", "sidju", "sigja", "silka", "silna", "simlu", "simsa", "simxu", "since", "sinma", "sinso", "sinxa", "sipna", "sirji", "sirxo", "sisku", "sisti", "sitna", "sivni", "skaci", "skami", "skapi", "skari", "skicu", "skiji", "skina", "skori", "skoto", "skuro", "slabu", "slaka", "slami", "slanu", "slari", "slasi", "sligu", "slilu", "sliri", "slovo", "sluji", "sluni", "smacu", "smadi", "smaji", "smani", "smoka", "smuci", "smuni", "snada", "snanu", "snidu", "snime", "snipa", "snuji", "snura", "snuti", "so", "so'a", "so'e", "so'i", "so'o", "so'u", "sobde", "sodna", "sodva", "softo", "solji", "solri", "sombo", "sonci", "sorcu", "sorgu", "sovda", "spaji", "spali", "spano", "spati", "speni", "spisa", "spita", "spofu", "spoja", "spuda", "sputu", "sraji", "sraku", "sralo", "srana", "srasu", "srera", "srito", "sruma", "sruri", "stace", "stagi", "staku", "stali", "stani", "stapa", "stasu", "stati", "steba", "steci", "stedu", "stela", "stero", "stici", "stidi", "stika", "stizu", "stodi", "stuna", "stura", "stuzi", "su'e", "su'o", "su'u", "sucta", "sudga", "sufti", "suksa", "sumji", "sumne", "sumti", "sunga", "sunla", "surla", "sutra", "ta", "tabno", "tabra", "tadji", "tadni", "tagji", "talsa", "tamca", "tamji", "tamne", "tanbo", "tance", "tanjo", "tanko", "tanru", "tansi", "tanxe", "tapla", "tarbi", "tarci", "tarla", "tarmi", "tarti", "taske", "tatpi", "tatru", "tavla", "taxfu", "tcaci", "tcadu", "tcana", "tcati", "tcena", "tcica", "tcidu", "tcika", "tcila", "tcima", "tcini", "tcita", "te", "temci", "tenfa", "tengu", "terdi", "terpa", "terto", "ti", "tigni", "tikpa", "tilju", "tinbe", "tinci", "tinsa", "tirna", "tirse", "tirxu", "tisna", "titla", "tivni", "tixnu", "to'e", "toknu", "toldi", "tonga", "tordu", "torni", "traji", "trano", "trati", "trene", "tricu", "trina", "trixe", "troci", "tsali", "tsani", "tsapi", "tsiju", "tsina", "tu", "tubnu", "tugni", "tujli", "tumla", "tunba", "tunka", "tunlo", "tunta", "tuple", "turni", "tutci", "tutra", "va", "vacri", "vajni", "valsi", "vamji", "vamtu", "vanbi", "vanci", "vanju", "vasru", "vasxu", "ve", "ve'e", "vecnu", "venfu", "vensa", "verba", "vi", "vibna", "vidni", "vidru", "vifne", "vikmi", "viknu", "vimcu", "vindu", "vinji", "vipsi", "virnu", "viska", "vitci", "vitke", "vitno", "vlagi", "vlile", "vlina", "vlipa", "vo", "vofli", "voksa", "vorme", "vraga", "vreji", "vreta", "vrici", "vrude", "vrusi", "vu", "vukro", "xa", "xabju", "xadba", "xadni", "xagji", "xagri", "xajmi", "xaksu", "xalbo", "xalka", "xalni", "xamgu", "xampo", "xamsi", "xance", "xanka", "xanri", "xanto", "xarci", "xarju", "xarnu", "xasli", "xasne", "xatra", "xatsi", "xazdo", "xe", "xebni", "xebro", "xecto", "xedja", "xekri", "xelso", "xendo", "xenru", "xexso", "xindo", "xinmo", "xirma", "xislu", "xispo", "xlali", "xlura", "xotli", "xrabo", "xrani", "xriso", "xruba", "xruki", "xrula", "xruti", "xukmi", "xunre", "xurdo", "xusra", "xutla", "za'i", "za'o", "zabna", "zajba", "zalvi", "zanru", "zarci", "zargu", "zasni", "zasti", "zbabu", "zbani", "zbasu", "zbepi", "zdani", "zdile", "ze", "ze'e", "ze'o", "zekri", "zenba", "zepti", "zetro", "zgana", "zgike", "zi'o", "zifre", "zinki", "zirpu", "zivle", "zmadu", "zmiku", "zo'a", "zo'i", "zu'o", "zukte", "zumri", "zungi", "zunle", "zunti", "zutse", "zvati"}; static char *rafsi[] = {"ba'u", "dri", "baj", "baf", "bak", "ba'e", "bav", "bac", "bad", "ban", "bau", "bal", "ba'i", "ba'o", "bax", "baz", "bap", "bai", "bra", "bag", "ba'a", "bar", "bas", "bat", "beb", "bem", "be'o", "bed", "be'e", "beg", "bej", "be'i", "bes", "be'a", "ber", "ben", "bef", "be'u", "bet", "bev", "bei", "biv", "biz", "bic", "bik", "big", "bi'a", "bil", "bid", "bix", "bi'o", "bir", "bit", "bis", "bim", "bi'u", "lab", "bla", "bli", "lot", "blo", "lo'i", "bor", "bol", "boi", "bog", "bo'u", "bot", "bo'i", "bof", "bo'o", "bon", "bo'a", "raz", "red", "bre", "bri", "bif", "bi'e", "bij", "rit", "rod", "bo'e", "bun", "bu'a", "bus", "bu'i", "bul", "buj", "bu'o", "buk", "bu'u", "bum", "bud", "bur", "bu'e", "bru", "caz", "cab", "ca'a", "dzu", "caf", "cak", "cad", "cag", "caj", "ca'o", "cal", "ca'u", "cna", "can", "cam", "cai", "car", "cat", "cav", "snu", "ca'e", "cta", "ca'i", "cax", "cec", "cez", "ce'o", "cel", "ce'a", "cem", "ce'u", "cne", "ces", "cen", "ced", "cer", "cre", "cev", "cei", "cfa", "fik", "fi'a", "cfi", "fi'u", "cib", "blu", "dja", "cid", "dro", "cif", "cig", "cik", "cki", "cic", "cim", "cli", "cil", "cij", "cni", "ci'i", "cin", "cpi", "cip", "cri", "ci'a", "ci'e", "cti", "cit", "ci'o", "cir", "civ", "ciz", "kaf", "kai", "cka", "cap", "cas", "kej", "cke", "kik", "ci'u", "ki'i", "kir", "kul", "cu'e", "ku'u", "lau", "cla", "cau", "lir", "lit", "liv", "li'a", "cup", "cma", "ma'a", "ma'o", "cme", "me'e", "mi'a", "mim", "cmi", "cmo", "co'i", "na'o", "neb", "ne'o", "nem", "ne'u", "nic", "nin", "ni'o", "nis", "nit", "ni'a", "col", "co'a", "com", "co'e", "co'u", "cko", "con", "cno", "coi", "cor", "cro", "cpa", "par", "cpe", "cra", "cek", "rep", "rib", "rid", "ri'o", "rip", "cis", "teb", "tek", "ce'i", "ti'o", "ctu", "cuk", "cku", "clu", "cum", "cu'i", "cul", "cun", "cu'o", "cu'u", "pra", "cru", "cur", "cuv", "cus", "sku", "cuc", "cut", "cux", "cu'a", "dav", "dza", "daz", "dac", "dai", "daj", "dak", "dab", "da'a", "dad", "daf", "dal", "da'u", "dam", "da'e", "dan", "plu", "dap", "dag", "dau", "dar", "da'o", "dax", "da'i", "das", "spo", "sri", "dec", "deg", "dej", "dek", "del", "de'o", "deb", "den", "de'i", "dem", "dep", "de'a", "der", "de'u", "dre", "des", "det", "dir", "dic", "klo", "dik", "dil", "dim", "dij", "di'u", "di'o", "dib", "di'e", "dig", "diz", "dzi", "jac", "jau", "dje", "dei", "dji", "jin", "jun", "ju'o", "don", "doi", "dor", "do'i", "dot", "do'o", "dra", "dat", "rud", "dru", "dub", "du'o", "dum", "dug", "dus", "du'e", "dut", "dud", "du'a", "duj", "duk", "du'u", "dun", "du'i", "dur", "dze", "zip", "zi'o", "fak", "fa'i", "fad", "fag", "fan", "fam", "fa'o", "faz", "fap", "pro", "fal", "fa'u", "far", "fa'a", "fav", "fau", "fac", "fat", "fa'e", "fai", "feb", "fem", "fed", "feg", "fe'u", "fek", "fer", "fe'a", "fen", "fe'o", "fep", "fei", "fre", "fes", "fet", "fe'i", "fig", "fis", "fip", "fi'e", "fin", "fi'i", "fla", "fle", "fli", "fir", "fo'a", "fo'e", "fo'i", "flo", "foi", "fom", "fo'o", "fon", "fro", "fas", "fra", "fax", "fic", "fi'o", "fil", "fit", "fru", "fuk", "fu'i", "ful", "flu", "fun", "fu'a", "fur", "fuz", "fu'e", "gai", "gad", "gaf", "ga'i", "gal", "ga'u", "ga'o", "gan", "gas", "ga'e", "gax", "gaz", "gac", "gap", "gar", "gau", "gat", "gej", "get", "ge'o", "gex", "ger", "ge'u", "gen", "ge'a", "gid", "gi'a", "gig", "gi'o", "gik", "gir", "gri", "gim", "gi'u", "gla", "gek", "gei", "let", "gle", "gic", "gli", "glu", "goc", "got", "rau", "gra", "ga'a", "ras", "rek", "rus", "rut", "gub", "gug", "gu'e", "gud", "gun", "gu'a", "gum", "gur", "gu'o", "gut", "gru", "guk", "gus", "gu'i", "guc", "guz", "zme", "jav", "jad", "ja'i", "jag", "ja'e", "jaf", "jma", "jam", "jab", "jan", "jal", "jas", "jat", "ja'o", "jak", "jap", "ja'a", "jva", "bam", "jba", "jbe", "jer", "bin", "bi'i", "jar", "jdi", "di'a", "din", "di'i", "dul", "jdu", "jev", "jve", "jec", "je'a", "jef", "jeg", "je'o", "jez", "jel", "jme", "jen", "jed", "jem", "jei", "je'i", "jex", "jes", "je'e", "jet", "je'u", "ja'u", "jga", "jai", "jge", "gin", "jgi", "git", "jbi", "jib", "cmu", "jij", "jik", "jil", "jic", "jmi", "jit", "jig", "ji'a", "jim", "jir", "jis", "jiv", "ji'i", "jiz", "jip", "ji'o", "jif", "tro", "jvi", "jaj", "min", "miv", "ji'e", "jov", "jom", "jo'u", "jol", "joi", "jor", "jo'o", "jon", "jo'e", "juv", "jub", "jbu", "juf", "ju'a", "juk", "jup", "ju'e", "jud", "ju'i", "jug", "jul", "jur", "jum", "jus", "jut", "jux", "vin", "ji'u", "kam", "kag", "jde", "ka'e", "kar", "kas", "kat", "kau", "kac", "kad", "kaj", "kal", "ka'o", "kan", "ka'u", "kax", "kab", "ka'a", "kav", "kem", "kep", "ke'e", "kec", "ke'i", "kez", "kel", "kei", "ke'o", "ken", "kes", "kre", "ker", "ket", "tco", "kev", "ke'a", "kic", "ki'e", "kij", "ki'o", "kil", "kis", "laj", "kak", "kla", "lai", "kle", "lei", "kli", "kit", "lup", "lu'e", "luz", "kob", "ko'i", "koj", "ko'a", "kol", "ko'e", "kom", "kon", "ko'u", "kor", "koi", "kro", "kok", "kos", "kra", "ka'i", "ref", "ke'u", "kri", "rin", "ki'u", "kix", "ki'a", "kuc", "ruj", "ruv", "kru", "kuz", "kub", "kuf", "kuk", "klu", "kum", "ku'a", "kun", "kut", "kur", "kuj", "ku'i", "kup", "ku'e", "kus", "lap", "cpu", "lac", "lad", "laf", "la'e", "lak", "la'u", "lam", "la'i", "lal", "lan", "lax", "laz", "lar", "la'a", "la'o", "lem", "leb", "le'a", "len", "le'o", "lek", "lec", "ler", "le'u", "liz", "lib", "li'e", "lif", "fri", "jda", "lim", "lid", "lij", "li'i", "lin", "li'o", "lis", "ste", "lic", "lik", "li'u", "lil", "lom", "loj", "lob", "jbo", "lol", "loi", "lor", "lo'u", "lu'o", "luv", "jvo", "lum", "lu'i", "lub", "lur", "lus", "mal", "mab", "cnu", "ma'u", "maf", "mak", "mas", "mam", "mac", "man", "mar", "map", "mat", "mra", "ma'e", "mad", "mag", "maj", "mai", "max", "sno", "ma'i", "mav", "xri", "meb", "meg", "mem", "mei", "mek", "me'o", "mel", "mle", "mej", "men", "mes", "me'i", "met", "me'u", "mer", "mre", "mex", "mib", "mij", "mif", "mic", "mik", "mil", "mli", "mid", "mi'e", "mi'i", "mir", "mit", "mi'u", "mip", "mis", "mi'o", "tre", "mix", "xre", "mla", "lat", "mec", "me'a", "led", "lun", "mob", "mov", "mom", "moi", "moc", "mol", "mo'u", "mlo", "mo'o", "moj", "mo'i", "mor", "mon", "mo'a", "mro", "mos", "mri", "mru", "mum", "muf", "mut", "mud", "muk", "mu'i", "mul", "mu'o", "muj", "mu'e", "mup", "mur", "mu'a", "mus", "tce", "muv", "mu'u", "muz", "nar", "nal", "nam", "nak", "na'i", "nac", "na'u", "nab", "na'a", "nad", "nau", "nav", "nag", "naj", "naf", "na'e", "nat", "nai", "nax", "xle", "naz", "zbi", "nen", "nel", "nei", "ner", "ne'i", "nil", "nib", "ni'i", "cte", "nik", "ni'e", "nim", "ni'u", "nir", "tcu", "niv", "nix", "xli", "non", "nor", "no'e", "nol", "no'i", "not", "noi", "nun", "nu'o", "nuk", "nup", "nu'e", "num", "nul", "nu'i", "nuz", "pav", "pa'a", "pag", "pau", "gre", "pai", "pac", "pak", "pan", "pad", "pa'o", "pap", "pat", "paz", "pab", "pas", "paf", "pa'u", "pax", "pev", "ple", "pel", "pem", "peb", "pec", "pe'u", "ped", "pe'o", "pen", "pe'i", "pes", "pei", "per", "pex", "pet", "pez", "piz", "piv", "pic", "pi'i", "pil", "pi'a", "pli", "pim", "pi'u", "pid", "pif", "pik", "pis", "pin", "pix", "pi'o", "pir", "xra", "pla", "lej", "le'i", "pib", "pip", "pi'e", "pit", "lix", "luj", "puk", "pu'a", "lut", "lu'a", "plo", "pol", "pon", "po'o", "pos", "po'e", "pop", "po'i", "por", "poi", "pot", "pal", "pam", "pa'i", "pa'e", "pej", "pe'a", "pre", "ret", "rei", "pij", "pri", "ros", "ro'a", "ruc", "ru'e", "pun", "rux", "ru'i", "pus", "puv", "puc", "pu'e", "puj", "pu'i", "pul", "pur", "pru", "pud", "pum", "pu'o", "ra'o", "raf", "rav", "ra'u", "rac", "ral", "ra'e", "rad", "rag", "ra'i", "ram", "ran", "rax", "rap", "rar", "rat", "rel", "reb", "rec", "re'u", "rem", "re'a", "rer", "re'o", "rev", "re'i", "res", "rif", "cfu", "rig", "rij", "ril", "rim", "ri'u", "rik", "ri'a", "rir", "ri'e", "ris", "ri'i", "riv", "rol", "rom", "roi", "rok", "ro'i", "rog", "ron", "ro'o", "ror", "rot", "tsu", "ro'u", "roz", "zgu", "rub", "ble", "ruf", "rum", "rup", "ru'u", "ruk", "ru'o", "run", "sab", "djo", "sak", "sal", "sat", "sla", "sa'o", "sap", "sna", "sag", "sa'a", "saj", "sa'i", "sai", "sa'u", "sra", "sax", "ske", "sa'e", "sav", "vru", "saz", "sel", "sfe", "sle", "sef", "se'u", "sme", "sec", "sen", "set", "sev", "sne", "sep", "sei", "ser", "se'a", "sez", "se'i", "sfa", "sfo", "sub", "su'u", "siz", "sil", "si'i", "sib", "si'o", "dju", "sig", "sik", "mlu", "smi", "sim", "si'u", "si'a", "sni", "sip", "sir", "six", "sis", "sti", "sit", "siv", "sam", "kap", "ska", "ski", "sij", "kin", "sko", "kot", "ko'o", "ku'o", "sau", "sar", "las", "lig", "sli", "lov", "lo'o", "slu", "sma", "smo", "muc", "mun", "smu", "sad", "nan", "nid", "si'e", "nip", "nuj", "nur", "nu'a", "nut", "soz", "soj", "sop", "sor", "so'i", "sos", "sot", "sob", "so'e", "sod", "sof", "slo", "sol", "som", "so'o", "son", "soi", "soc", "sro", "sog", "sov", "so'a", "paj", "san", "spa", "spe", "spi", "pof", "po'u", "poj", "po'a", "spu", "put", "pu'u", "raj", "rak", "ra'a", "sas", "sre", "ru'a", "rur", "sru", "sac", "tak", "sta", "tap", "seb", "tec", "te'i", "sed", "tel", "te'o", "sic", "sid", "ti'i", "tik", "tiz", "sto", "sun", "tur", "su'a", "tuz", "stu", "sup", "su'e", "suz", "su'o", "suv", "suc", "sud", "sfu", "suk", "suj", "sum", "su'i", "sug", "sul", "sur", "sut", "taz", "tab", "tad", "tag", "tal", "taj", "ta'o", "tac", "tau", "tas", "tax", "ta'e", "tar", "tam", "tai", "tra", "ta'i", "tat", "tav", "ta'a", "taf", "ta'u", "cac", "tca", "ten", "tic", "tid", "til", "tim", "ti'a", "ter", "tem", "tei", "tef", "teg", "te'u", "ted", "tep", "te'a", "tet", "tif", "tig", "tip", "tij", "tib", "tin", "tir", "tis", "tit", "tiv", "tix", "ti'u", "tol", "to'e", "tok", "tod", "tog", "to'a", "tor", "to'u", "ton", "to'i", "rai", "ren", "re'e", "ric", "tri", "rix", "ti'e", "toc", "toi", "tsa", "tan", "tsi", "sin", "tuf", "tu'u", "tug", "tu'i", "tuj", "tum", "tu'a", "tub", "tuk", "tul", "tu'o", "tun", "tup", "tu'e", "tru", "tci", "tut", "vaz", "var", "vaj", "vai", "val", "vla", "vam", "va'i", "vat", "vab", "vac", "van", "vas", "vau", "vax", "va'u", "vel", "ve'e", "ven", "ve'u", "vef", "ves", "ver", "ve'a", "viz", "vib", "vir", "vif", "vim", "vi'i", "vik", "vic", "vi'u", "vid", "vij", "vip", "vri", "vis", "vi'a", "vit", "vi'e", "vi'o", "lag", "vil", "vli", "von", "vol", "voi", "vok", "vo'a", "vor", "vro", "vra", "rej", "vei", "vre", "vud", "vu'e", "vus", "vu'i", "vuz", "vur", "vu'o", "xav", "xa'u", "xab", "xad", "xam", "xak", "xal", "xag", "xau", "xap", "xa'o", "xas", "xan", "xa'e", "xar", "xac", "xa'i", "xaj", "xa'a", "xat", "xaz", "zdo", "xel", "xen", "xei", "xeb", "bro", "xet", "cto", "xej", "xe'a", "xek", "xe'i", "xes", "xed", "xe'o", "xer", "xe'u", "xex", "xin", "xim", "xir", "xi'a", "xil", "xi'u", "xip", "xla", "xlu", "xol", "xoi", "rab", "xai", "xis", "xi'o", "xub", "xuk", "rul", "xru", "xum", "xu'i", "xun", "xu'e", "xur", "xu'o", "xus", "xu'a", "xul", "zaz", "za'o", "zan", "za'a", "zaj", "zal", "zar", "zau", "zac", "zai", "zag", "za'u", "zas", "zat", "za'i", "bab", "zba", "zbe", "zda", "zdi", "zel", "ze'e", "zev", "ze'o", "zer", "zei", "zen", "ze'a", "zep", "zet", "zga", "zgi", "gi'e", "zil", "zif", "zi'e", "zin", "zi'i", "zir", "zi'u", "ziv", "vle", "zma", "mau", "zmi", "zon", "zo'a", "zor", "zo'i", "zum", "zuk", "zu'e", "zmu", "zug", "zul", "zun", "zu'i", "zut", "tse", "zva"}; /* Indices, one per gismu/cmavo, pointing to start of associated rafsi in rafsi table */ static int start_indices[] = {0, 1, 1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 9, 11, 13, 14, 15, 16, 18, 19, 20, 20, 21, 22, 22, 23, 24, 24, 24, 24, 25, 27, 29, 30, 32, 34, 35, 36, 38, 39, 41, 42, 43, 43, 44, 45, 46, 47, 48, 49, 49, 51, 51, 52, 53, 54, 56, 57, 57, 58, 59, 62, 63, 65, 67, 69, 71, 73, 73, 73, 74, 76, 77, 79, 80, 81, 82, 83, 83, 83, 83, 85, 87, 88, 90, 92, 93, 94, 96, 97, 97, 98, 99, 100, 100, 101, 102, 102, 103, 103, 104, 105, 106, 107, 109, 110, 111, 111, 111, 113, 114, 115, 116, 117, 118, 119, 120, 120, 121, 122, 123, 124, 126, 128, 128, 129, 130, 131, 132, 133, 134, 136, 137, 139, 140, 140, 141, 142, 143, 143, 144, 145, 146, 147, 148, 149, 149, 150, 151, 152, 153, 154, 154, 154, 154, 154, 154, 155, 155, 155, 156, 157, 158, 158, 158, 159, 160, 161, 161, 162, 162, 163, 164, 166, 167, 167, 168, 169, 169, 170, 171, 172, 173, 174, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 186, 187, 188, 190, 191, 191, 192, 193, 194, 196, 197, 199, 201, 202, 204, 206, 207, 209, 210, 212, 213, 214, 216, 217, 218, 221, 223, 224, 224, 225, 226, 226, 226, 227, 228, 229, 230, 231, 232, 233, 234, 234, 234, 235, 237, 237, 238, 239, 240, 241, 242, 244, 245, 245, 247, 248, 249, 250, 251, 252, 254, 255, 256, 258, 260, 261, 262, 263, 264, 265, 265, 267, 267, 268, 269, 271, 272, 273, 273, 274, 275, 276, 277, 278, 280, 280, 282, 282, 283, 284, 285, 285, 285, 286, 287, 288, 288, 289, 291, 292, 294, 295, 297, 299, 300, 301, 302, 303, 304, 305, 306, 306, 307, 308, 310, 311, 312, 313, 314, 316, 318, 320, 321, 322, 324, 326, 328, 330, 330, 331, 332, 334, 336, 337, 338, 340, 341, 343, 344, 346, 348, 349, 350, 352, 354, 355, 356, 357, 357, 357, 357, 359, 359, 359, 359, 360, 362, 364, 366, 367, 368, 369, 371, 372, 373, 374, 375, 377, 378, 380, 382, 384, 384, 385, 386, 388, 389, 390, 392, 394, 395, 395, 396, 397, 398, 399, 400, 401, 403, 405, 406, 407, 408, 409, 410, 411, 412, 413, 413, 414, 415, 417, 419, 421, 422, 424, 425, 426, 428, 430, 430, 431, 432, 434, 434, 435, 436, 437, 438, 439, 440, 441, 442, 444, 445, 447, 449, 451, 453, 454, 456, 458, 459, 461, 463, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 478, 479, 481, 482, 484, 484, 485, 486, 487, 489, 489, 490, 490, 492, 493, 493, 495, 495, 497, 497, 497, 499, 500, 501, 502, 503, 504, 505, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 516, 517, 518, 518, 519, 521, 523, 525, 527, 528, 530, 531, 532, 533, 534, 535, 537, 537, 538, 539, 540, 541, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 552, 553, 554, 555, 555, 556, 556, 557, 558, 559, 559, 561, 561, 562, 563, 564, 564, 566, 567, 567, 569, 569, 569, 570, 571, 571, 572, 573, 573, 574, 576, 577, 578, 579, 581, 583, 585, 586, 588, 588, 590, 591, 592, 593, 595, 596, 597, 598, 598, 599, 600, 601, 602, 604, 605, 605, 605, 605, 605, 606, 607, 607, 608, 608, 608, 609, 610, 611, 611, 611, 612, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 621, 621, 621, 621, 621, 622, 623, 624, 626, 628, 629, 631, 632, 633, 634, 635, 636, 638, 640, 642, 643, 644, 645, 646, 647, 648, 649, 650, 652, 653, 653, 654, 656, 657, 659, 661, 663, 664, 666, 668, 669, 670, 671, 671, 672, 673, 675, 676, 676, 678, 680, 681, 682, 684, 685, 686, 686, 687, 688, 689, 691, 691, 692, 693, 694, 696, 696, 698, 699, 699, 701, 702, 703, 704, 705, 706, 707, 709, 709, 709, 709, 710, 711, 711, 712, 713, 714, 715, 715, 716, 716, 716, 717, 719, 721, 722, 723, 725, 726, 727, 728, 730, 731, 732, 733, 735, 736, 737, 738, 739, 740, 741, 742, 742, 743, 744, 745, 747, 749, 751, 752, 754, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 768, 769, 770, 770, 770, 771, 771, 772, 773, 774, 775, 776, 778, 778, 779, 780, 781, 781, 781, 781, 781, 782, 783, 784, 785, 787, 789, 791, 792, 793, 795, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 809, 810, 810, 811, 813, 814, 814, 816, 816, 817, 819, 820, 821, 823, 824, 825, 826, 827, 829, 830, 832, 833, 834, 836, 837, 839, 840, 841, 841, 842, 843, 844, 845, 846, 847, 849, 851, 853, 854, 854, 856, 857, 858, 860, 861, 862, 863, 864, 865, 866, 868, 869, 870, 871, 871, 872, 873, 874, 875, 877, 879, 879, 881, 883, 884, 886, 888, 889, 891, 892, 893, 894, 894, 896, 897, 898, 899, 901, 902, 904, 906, 908, 909, 910, 911, 913, 914, 916, 917, 918, 919, 921, 922, 923, 924, 925, 925, 925, 925, 926, 927, 927, 927, 928, 929, 929, 930, 931, 931, 932, 933, 935, 935, 936, 937, 938, 939, 940, 941, 943, 945, 947, 949, 950, 951, 952, 953, 954, 955, 956, 956, 956, 956, 957, 959, 960, 962, 962, 963, 964, 964, 965, 966, 967, 968, 969, 971, 971, 972, 974, 975, 975, 977, 977, 978, 979, 980, 982, 984, 985, 986, 988, 990, 992, 994, 995, 996, 998, 999, 1001, 1002, 1004, 1005, 1006, 1006, 1008, 1010, 1011, 1013, 1014, 1015, 1017, 1017, 1017, 1019, 1020, 1022, 1023, 1025, 1025, 1025, 1026, 1027, 1028, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1036, 1037, 1038, 1039, 1040, 1040, 1041, 1042, 1043, 1045, 1047, 1049, 1051, 1052, 1054, 1055, 1056, 1057, 1058, 1058, 1059, 1061, 1061, 1061, 1062, 1063, 1064, 1064, 1065, 1066, 1067, 1069, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1083, 1084, 1084, 1086, 1088, 1089, 1090, 1090, 1090, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1096, 1096, 1097, 1098, 1100, 1101, 1102, 1103, 1103, 1103, 1104, 1105, 1105, 1106, 1107, 1107, 1108, 1110, 1111, 1112, 1113, 1114, 1116, 1117, 1118, 1119, 1120, 1122, 1124, 1125, 1126, 1128, 1128, 1129, 1130, 1132, 1133, 1134, 1135, 1137, 1138, 1139, 1140, 1140, 1141, 1142, 1144, 1144, 1145, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1162, 1163, 1164, 1164, 1164, 1164, 1165, 1166, 1167, 1168, 1168, 1170, 1171, 1171, 1171, 1171, 1172, 1172, 1173, 1174, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1184, 1185, 1186, 1187, 1188, 1190, 1191, 1192, 1194, 1194, 1195, 1196, 1197, 1198, 1200, 1202, 1204, 1205, 1207, 1208, 1208, 1209, 1210, 1211, 1212, 1212, 1214, 1216, 1217, 1219, 1220, 1221, 1221, 1222, 1223, 1224, 1224, 1225, 1227, 1228, 1228, 1229, 1230, 1230, 1231, 1231, 1231, 1232, 1234, 1235, 1236, 1237, 1238, 1240, 1241, 1242, 1243, 1244, 1246, 1248, 1250, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1258, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1266, 1266, 1267, 1268, 1269, 1269, 1270, 1270, 1271, 1272, 1272, 1272, 1273, 1274, 1276, 1276, 1276, 1277, 1277, 1279, 1280, 1280, 1281, 1282, 1284, 1286, 1287, 1288, 1288, 1288, 1289, 1290, 1291, 1291, 1292, 1294, 1294, 1294, 1295, 1297, 1298, 1300, 1301, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1309, 1309, 1310, 1311, 1311, 1312, 1313, 1314, 1316, 1318, 1319, 1320, 1322, 1324, 1326, 1327, 1327, 1327, 1329, 1330, 1331, 1333, 1335, 1336, 1337, 1337, 1338, 1339, 1340, 1341, 1343, 1344, 1346, 1347, 1348, 1350, 1351, 1353, 1354, 1355, 1356, 1357, 1358, 1360, 1362, 1364, 1365, 1366, 1367, 1368, 1370, 1372, 1373, 1374, 1376, 1377, 1378, 1380, 1381, 1382, 1382, 1383, 1384, 1386, 1387, 1389, 1390, 1391, 1392, 1393, 1395, 1396, 1397, 1398, 1399, 1400, 1400, 1401, 1402, 1404, 1406, 1408, 1409, 1411, 1412, 1412, 1414, 1416, 1417, 1419, 1420, 1421, 1422, 1423, 1423, 1423, 1424, 1425, 1425, 1426, 1426, 1428, 1430, 1431, 1433, 1433, 1434, 1434, 1436, 1437, 1437, 1437, 1437, 1438, 1439, 1441, 1442, 1444, 1446, 1448, 1450, 1452, 1453, 1455, 1457, 1458, 1459, 1460, 1462, 1464, 1465, 1466, 1467, 1469, 1470, 1471, 1473, 1474, 1475, 1476, 1477, 1479, 1481, 1483, 1485, 1486, 1487, 1488, 1490, 1491, 1492, 1494, 1496, 1498, 1499, 1501, 1502, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1510, 1512, 1514, 1515, 1516, 1517, 1519, 1520, 1522, 1524, 1526, 1528, 1530, 1531, 1533, 1535, 1536, 1538, 1539, 1540, 1541, 1543, 1545}; /* For each gismu/cmavo, the number of associated rafsi */ static int n_rafsi[] = {1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 2, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 1, 0, 1, 1, 3, 1, 2, 2, 2, 2, 2, 0, 0, 1, 2, 1, 2, 1, 1, 1, 1, 0, 0, 0, 2, 2, 1, 2, 2, 1, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 2, 0, 2, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 0, 1, 1, 2, 1, 1, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 2, 0, 1, 0, 2, 1, 0, 2, 0, 2, 0, 0, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 0, 2, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 0, 1, 1, 2, 1, 0, 2, 2, 1, 1, 2, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 2, 1, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 2, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 0, 2, 2, 1, 2, 1, 1, 2, 0, 0, 2, 1, 2, 1, 2, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 2, 1, 3, 2, 2, 1, 1, 0, 2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 2, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 2, 1, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 0, 1, 1, 1, 1, 0, 2, 2, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 2, 1, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 1, 0, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 0, 0, 2, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, 2, 1, 0, 2, 2, 1, 2, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 2, 2, 1, 2, 0, 1, 0, 2, 1, 0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1}; #define N(x) (sizeof(x)/sizeof(x[0])) /* Slightly wide definition of 'gismu' since some of the entities with rafsi are cmavo as well */ static int lookup_gismu(char *s) { /* Simple linear search for now */ int n, i, found; n = N(gismu); found = 0; for (i=0; iscore > bb->score) { return 1; } else if (aa->score < bb->score) { return -1; } else { return 0; } } #define MAXLUJVO 8 /* The main lujvo making routine */ static void makelujvo(char **tanru) { char t[MAXT][6]; /* The gismu/cmavo forms passed in */ char r[MAXT][5][6]; /* The possible rafsi, up to 5 per arg */ int nr[MAXT]; /* Number of rafsi per arg */ char g[MAXT]; /* 'Glue' (hyphen) char to insert after respective rafsi (0 for none) */ int nt; /* Number of forms passed in */ int i, j, k, n; int last; int index, si; int c[MAXT]; /* Counters over the rafsi forms for each argument (implements an arbitrarily-nested for loop) */ int check1, check2, check3, check4; i=0; while (*tanru) { strcpy(t[i], *tanru); for (j=0; ; j++) { if (!t[i][j]) break; t[i][j] = tolower(t[i][j]); if (t[i][j] == 'h') t[i][j] = '\''; } index = lookup_gismu(t[i]); if (index < 0) { fprintf(stderr, "Cannot use component [%s] in forming lujvo\n", t[i]); exit(1); } ++tanru; last = !*tanru; /* This is the last one */ n = n_rafsi[index]; si = start_indices[index]; if (last) { /* Use 5 letter rafsi and any short rafsi must end in a vowel */ j = 0; for (k=0; k 2) && (is_cvv(r[0][c[0]]) || is_cvav(r[0][c[0]]))) { /* Require r or n hyphen to stop initial cmavo falling off */ if (r[1][c[1]][0] == 'r') { g[0] = 'n'; } else { g[0] = 'r'; } } else { check1 = (nt == 2); check2 = is_cvv(r[0][c[0]]) || is_cvav(r[0][c[0]]); check3 = is_ccv(r[1][c[1]]); check4 = is_ccvcv(r[1][c[1]]); if (check1 && check2 && (!check3 || check4)) { if (r[1][c[1]][0] == 'r') { g[0] = 'n'; } else { g[0] = 'r'; } } } /* Insert y hyphens where necessary due to non-permissible consonant pairs. */ for (i=0; iMAXLUJVO)) nl = MAXLUJVO; for (i=0; i #include #include #include #include "functions.h" #include "output.h" #include "latex.h" typedef enum { ST_OPEN, ST_TEXT, ST_CLOSE, ST_START } States; static States state; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void initialise(void) { state = ST_START; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_prologue(void) { printf("\\documentclass[10pt]{article}\n" "\\usepackage{geometry}\n" "\\ifx\\pdftexversion\\underfined\n" "\\usepackage[dvips]{graphicx}\n" "\\else\n" "\\usepackage[pdftex]{graphicx}\n" "\\pdfcompresslevel=9\n" "\\fi" "\\def\\rmdefault{phv}\n" "\\def\\mddefault{mc}\n" "\\def\\bfdefault{bc}\n" "\\geometry{left=0.75in,top=0.5in,bottom=0.5in,right=0.75in,noheadfoot}\n" "\\pagestyle{empty}\n" "\\setlength{\\parindent}{0pt}\n" "\\font\\zd = pzdr at 10pt\n" ); printf("\\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}\n" "\\DeclareMathDelimiter\\ulcorner{4}{AMSa}{\"70}{AMSa}{\"70}\n" "\\DeclareMathDelimiter\\urcorner{5}{AMSa}{\"71}{AMSa}{\"71}\n" "\\DeclareMathDelimiter\\llcorner{4}{AMSa}{\"78}{AMSa}{\"78}\n" "\\DeclareMathDelimiter\\lrcorner{5}{AMSa}{\"79}{AMSa}{\"79}\n"); printf("\\begin{document}\n"); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ void latex_write_epilog(void) { printf("\\end{document}\n"); } /* Number of end of lines that are pending. (These are only inserted when we have closed a sequence of close brackets, i.e. before the next open bracket or ordinary text.) */ static int pending_eols = 0; /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void clear_eols(void) { double xes; if (pending_eols > 0) { if (pending_eols > 1) { xes = 1.5; } else { xes = 1.0; } printf("\n\n\\vspace{%.2fex}", xes); state = ST_OPEN; pending_eols = 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void set_eols(int eols) { pending_eols += eols; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ void latex_write_open_bracket(BracketType type, int subscript) { clear_eols(); switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf("("); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_SQUARE: printf("["); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_BRACE: printf("\\{"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_ANGLE: printf("$\\langle$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_CEIL: printf("$\\lceil$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_FLOOR: printf("$\\lfloor$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_TRIANGLE: printf("{\\large{} $\\triangleleft$}"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; } if (type != BR_NONE) { printf(" "); } state = ST_OPEN; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ void latex_write_close_bracket(BracketType type, int subscript) { switch (state) { case ST_START: case ST_CLOSE: case ST_TEXT: break; case ST_OPEN: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf(")"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_SQUARE: printf("]"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_BRACE: printf("\\}"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_ANGLE: printf("$\\rangle$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_CEIL: printf("$\\rceil$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_FLOOR: printf("$\\rfloor$"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; case BR_TRIANGLE: printf("{\\large{} $\\triangleright$}"); printf("{}$^{\\textit{\\scriptsize %d}}$", subscript); break; } if (type != BR_NONE) { printf(" "); } state = ST_CLOSE; } /*++++++++++++++++++++++++++++++ Make a string safe for setting with TeX. Don't make $, \ and {/} safe though, so that translations can include escape sequences. static char * make_texsafe char *s ++++++++++++++++++++++++++++++*/ char * make_texsafe(char *s) { static char buf[2048]; char *p, *q; p = s; q = buf; while (*p) { switch (*p) { case '^': case '&': #if 0 case '\\': case '$': #endif case '{': case '}': case '%': case '_': case '#': *q++ = '\\'; *q++ = *p++; break; case '<': case '>': *q++ = '$'; *q++ = *p++; *q++ = '$'; break; default: *q++ = *p++; break; } } *q = 0; return buf; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_lojban_text(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf("\n"); break; } printf("\\mbox{\\textbf{%s}\\/}", text); state = ST_TEXT; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_special(char *text) { if (!strcmp(text, "$LEFTARROW")) { printf("{\\reflectbox{\\zd\\char233}}"); } else if (!strcmp(text, "$OPENQUOTE")) { printf("``"); } else if (!strcmp(text, "$CLOSEQUOTE")) { printf("''"); } } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_translation(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf("\n"); break; } if (text[0] == '$') { write_special(text); } else { printf("\\textsl{\\small{}%s}", make_texsafe(text)); } state = ST_TEXT; } /*+ +*/ static int first_tag; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tags(void) { printf("\\textsl{\\footnotesize{}[}"); first_tag = 1; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void end_tags(void) { printf("\\textsl{\\footnotesize{}~:] }"); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tag(void) { if (!first_tag) { printf("\\textsl{\\footnotesize{}, }\n"); } first_tag = 0; } static void write_tag_text(char *brivla, char *place, char *trans, int brac)/*{{{*/ { if (brac) { printf("\\textsl{\\footnotesize{}%s%s (%s)}\n", brivla, place, make_texsafe(trans)); } else { printf("\\textsl{\\footnotesize{}%s%s %s}\n", brivla, place, make_texsafe(trans)); } } /*}}}*/ static void write_partial_tag_text(char *t)/*{{{*/ { printf("\\textsl{\\footnotesize{}%s}\n", t); } /*}}}*/ DriverVector latex_driver =/*{{{*/ { initialise, write_prologue, latex_write_epilog, latex_write_open_bracket, latex_write_close_bracket, set_eols, write_lojban_text, write_translation, start_tags, end_tags, start_tag, write_tag_text, write_partial_tag_text };/*}}}*/ jbofihe-0.38/latex.h100644 765 764 2540 7350750737 13406 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/latex.h,v 1.1 1999/06/27 21:47:43 richard Exp $ Header file for LaTeX code. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef LATEX_H #define LATEX_H /*+ To stop multiple inclusions. +*/ #include "nodes.h" extern void latex_write_epilog(void); extern char *make_texsafe(char *s); extern void latex_write_open_bracket(BracketType type, int subscript); extern void latex_write_close_bracket(BracketType type, int subscript); #endif /* LATEX_H */ jbofihe-0.38/latexblk.c100644 765 764 22416 7350750737 14116 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/latexblk.c,v 1.7 2001/05/28 21:30:15 richard Exp $ Driver for producing LaTeX output, using blocks rather than free-flow. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" #include "output.h" #include "latex.h" typedef enum { ST_OPEN, ST_TEXT, ST_CLOSE, ST_START } States; static States state; static char tag_text[4096]; static char loj_text[4096]; static char eng_text[4096]; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void initialise(void) { state = ST_START; tag_text[0] = 0; loj_text[0] = 0; eng_text[0] = 0; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_prologue(void) { printf("\\documentclass[10pt]{article}\n" "\\usepackage{geometry}\n" "\\ifx\\pdftexversion\\underfined\n" "\\usepackage[dvips]{graphicx}\n" "\\else\n" "\\usepackage[pdftex]{graphicx}\n" "\\pdfcompresslevel=9\n" "\\fi" "\\def\\rmdefault{phv}\n" "\\def\\mddefault{mc}\n" "\\def\\bfdefault{bc}\n" "\\def\\IS#1{\\textit{\\scriptsize #1}}\n" "\\def\\ISS{\\it\\scriptsize}\n" "\\def\\BT{\\begin{tabular}}\n" "\\def\\ET{\\end{tabular}~}\n" "\\def\\TL{\\begingroup\\normalsize{}$\\triangleleft$\\endgroup}\n" "\\def\\TR{\\begingroup\\normalsize{}$\\triangleright$\\endgroup}\n" "\\geometry{left=0.75in,top=0.5in,bottom=0.5in,right=0.75in,noheadfoot}\n" "\\pagestyle{empty}\n" "\\setlength{\\parindent}{0pt}\n" "\\setlength{\\parskip}{1ex plus0.5ex minus0.5ex}\n" "\\setlength{\\tabcolsep}{0pt}\n" "\\emergencystretch=200pt\n" "\\font\\zd = pzdr at 10pt\n" ); printf("\\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}\n" "\\DeclareMathDelimiter\\ulcorner{4}{AMSa}{\"70}{AMSa}{\"70}\n" "\\DeclareMathDelimiter\\urcorner{5}{AMSa}{\"71}{AMSa}{\"71}\n" "\\DeclareMathDelimiter\\llcorner{4}{AMSa}{\"78}{AMSa}{\"78}\n" "\\DeclareMathDelimiter\\lrcorner{5}{AMSa}{\"79}{AMSa}{\"79}\n"); printf("\\begin{document}\n" "\\small\n"); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ /* Number of end of lines that are pending. (These are only inserted when we have closed a sequence of close brackets, i.e. before the next open bracket or ordinary text.) */ static int pending_eols = 0; /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void clear_eols(void) { if (pending_eols > 0) { if (pending_eols > 1) { printf("\n\n\\vspace{2ex}"); } else { printf("\n\n"); } state = ST_OPEN; pending_eols = 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void flush_block(void) { char *p; printf("\\BT[t]{l}{\\bf %s}\\\\{\\it %s}\\\\[-3pt]", loj_text, eng_text); printf("{\\ISS{}"); for (p=tag_text; *p; p++) { if (*p == '\n') { printf("}\\\\[-3pt]{\\ISS{}"); } else { putchar(*p); } } printf("}\\ET\n"); tag_text[0] = 0; loj_text[0] = 0; eng_text[0] = 0; } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void set_eols(int eols) { pending_eols += eols; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_open_bracket(BracketType type, int subscript) { if (type == BR_NONE) return; if (loj_text[0] || eng_text[0]) { flush_block(); } clear_eols(); switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf("("); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_SQUARE: printf("["); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_BRACE: printf("\\{"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_ANGLE: printf("$\\langle$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_CEIL: printf("$\\lceil$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_FLOOR: printf("$\\lfloor$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_TRIANGLE: printf("\\TL{}"); printf("{}$^{\\IS{%d}}$", subscript); break; } if (type != BR_NONE) { printf(" "); } state = ST_OPEN; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_close_bracket(BracketType type, int subscript) { if (type == BR_NONE) return; if (loj_text[0] || eng_text[0]) { flush_block(); } switch (state) { case ST_START: case ST_CLOSE: case ST_TEXT: break; case ST_OPEN: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf(")"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_SQUARE: printf("]"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_BRACE: printf("\\}"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_ANGLE: printf("$\\rangle$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_CEIL: printf("$\\rceil$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_FLOOR: printf("$\\rfloor$"); printf("{}$^{\\IS{%d}}$", subscript); break; case BR_TRIANGLE: printf("\\TR{}"); printf("{}$^{\\IS{%d}}$", subscript); break; } if (type != BR_NONE) { printf(" "); } state = ST_CLOSE; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_lojban_text(char *text) { if (eng_text[0]) { flush_block(); } clear_eols(); strcat(loj_text, " "); strcat(loj_text, text); } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_special(char *text) { if (!strcmp(text, "$LEFTARROW")) { strcat(eng_text, "{\\reflectbox{\\zd\\char233}}"); } else if (!strcmp(text, "$OPENQUOTE")) { strcat(eng_text, "``"); } else if (!strcmp(text, "$CLOSEQUOTE")) { strcat(eng_text,"''"); } } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_translation(char *text) { if (text[0] == '$') { write_special(text); } else { strcat(eng_text, " "); strcat(eng_text, make_texsafe(text)); } } /*+ +*/ static int first_tag; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tags(void) { if (loj_text[0] || eng_text[0]) { flush_block(); } clear_eols(); strcat(tag_text, "["); first_tag = 1; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void end_tags(void) { strcat(tag_text, ":]"); } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tag(void) { if (!first_tag) { strcat(tag_text, ", "); } first_tag = 0; } /*++++++++++++++++++++++++++++++++++++++ char *brivla char *place char *trans ++++++++++++++++++++++++++++++++++++++*/ static void write_tag_text(char *brivla, char *place, char *trans, int brac) { char buffer[1024]; if (brac) { sprintf(buffer, "%s%s (%s)", brivla, place, make_texsafe(trans)); } else { sprintf(buffer, "%s%s %s", brivla, place, make_texsafe(trans)); } if (tag_text[1]) { /* '[' is pre-inserted by start_tags */ strcat(tag_text, "\n"); } strcat(tag_text, buffer); } static void write_partial_tag_text(char *t)/*{{{*/ { char buffer[1024]; sprintf(buffer, "%s", t); if (tag_text[1]) { /* '[' is pre-inserted by start_tags */ strcat(tag_text, "\n"); } strcat(tag_text, buffer); } /*}}}*/ DriverVector latex_block_driver =/*{{{*/ { initialise, write_prologue, latex_write_epilog, write_open_bracket, write_close_bracket, set_eols, write_lojban_text, write_translation, start_tags, end_tags, start_tag, write_tag_text, write_partial_tag_text };/*}}}*/ jbofihe-0.38/lex1.c100644 765 764 27311 7350750737 13160 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/lex1.c,v 1.23 2001/07/24 21:21:28 richard Exp $ Read the input file and perform low-level lexing functions. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "cmavotab.h" #include "nodes.h" #include "functions.h" #include "lujvofns.h" #include "morf.h" #include "bccheck.h" static char zoi_form[8]; /* la'o or zoi */ static int zoi_delim_next; static char zoi_delim[64]; static int zoi_start_line, zoi_start_col; static char *zoi_data; extern int had_bad_tokens; /* in main.c */ static int process_word(char *buf, int start_line, int start_column); /*++++++++++++++++++++++++++++++ Tables for encoding cmavos into the indices in the cmavo_table. ++++++++++++++++++++++++++++++*/ static int tab1[] = { -1, 1, 2, 3, -1, /* abcde */ 4, 5, -1, -1, 6, /* fghij */ 7, 8, 9, 10, -1, /* klmno */ 11, -1, 12, 13, 14, /* pqrst */ -1, 15, -1, 16, -1, /* uvwxy */ 17}; /* z */ static int tab2[] = { 1, -1, -1, -1, 2, /* abcde */ -1, -1, -1, 3, -1, /* fghij */ -1, -1, -1, -1, 4, /* klmno */ -1, -1, -1, -1, -1, /* pqrst */ 5, -1, -1, -1, 6, /* uvwxy */ -1}; /* z */ /*++++++++++++++++++++++++++++++++++++++ Compute a hash function of a string representing a cmavo. This hashes into the cmavo_table array. static int hash_cmavo char *buf ++++++++++++++++++++++++++++++++++++++*/ static int hash_cmavo(char *buf) { int val, v; char *p; val = 0; p = buf; if (*p == '\'') return -1; v = tab1[*p - 'a']; if (v > 0) { val = v * 98; p++; } if (*p == '\'') return -1; v = tab2[*p - 'a']; val += v * 14; p++; if (!*p) return val; if (*p == '\'' || *p == ',') { val += 7; p++; } if (*p == '\'') return -1; v = tab2[*p - 'a']; val += v; return val; } /*++++++++++++++++++++++++++++++++++++++ Process an individual cmavo. char *buf ++++++++++++++++++++++++++++++++++++++*/ static void process_cmavo(char *buf, int start_line, int start_column) { int hash; TreeNode *node; int i, n, ok; /* Check cmavo contains only valid characters */ n = strlen(buf); ok = 1; for (i=0; i= 0 && hash <= 1750 && !strcmp(buf, cmavo_table[hash].cmavo)) { node->data.cmavo.code = hash; node->type = N_CMAVO; node->start_line = start_line; node->start_column = start_column; node->data.cmavo.selmao = cmavo_table[hash].selmao; } else { fprintf(stderr, "Bad cmavo [%s] at line %d column %d\n", buf, start_line, start_column); had_bad_tokens = 1; node->data.garbage.word = new_string(buf); node->type = N_GARBAGE; node->start_line = start_line; node->start_column = start_column; } add_token(node); } /*++++++++++++++++++++++++++++++++++++++ Take the text in 'x' and add it as a single brivla to the token list. char *x int start_line int start_column ++++++++++++++++++++++++++++++++++++++*/ static void add_brivla_token(char *x, int start_line, int start_column, enum BrivlaType brivla_type) { TreeNode *tok; tok = new_node(); tok->start_line = start_line; tok->start_column = start_column; tok->type = N_BRIVLA; /* Leave commas etc in for BRIVLA - you can use them in a fu'ivla? */ tok->data.brivla.word = new_string(x); tok->data.brivla.type = brivla_type; add_token(tok); } /*++++++++++++++++++++++++++++++++++++++ Handle a single token that has a consonant at the end. This is basically a cmene, except that checks have to be done for embedded la, lai, doi. ++++++++++++++++++++++++++++++++++++++*/ static void process_cmene(char *buf, int start_line, int start_column, int is_bad, int can_split, char *ladoi, char *tail) { TreeNode *tok; if (is_bad) { char prefix[1024], labuf[8]; char *p, *q; int len1, len2; for (p=buf, q=prefix, len1=0; p!=ladoi; len1++) *q++ = *p++; *q = 0; for (p=ladoi, q=labuf, len2=0; p!=tail; len2++) *q++ = *p++; *q = 0; if (prefix[0]) process_word(prefix, start_line, start_column); process_word(labuf, start_line, start_column+len1); process_word(tail, start_line, start_column+len1+len2); } else { tok = new_node(); tok->start_line = start_line; tok->start_column = start_column; tok->type = N_CMENE; tok->data.cmene.word = new_string(buf); add_token(tok); } } /*++++++++++++++++++++++++++++++++++++++ Take cmavo off the front of a gismu, lujvo or fu'ivla ++++++++++++++++++++++++++++++++++++++*/ static void add_preceding_cmavo(char **pws, char **pwe, int start_line, int *column) { char **pw; char *p, *q; int incr; char buf2[1024]; for (pw=pws; pwstart_line = zoi_start_line; tok->start_column = zoi_start_col; tok->type = N_ZOI; tok->data.zoi.form = new_string(zoi_form); tok->data.zoi.term = new_string(zoi_delim); tok->data.zoi.text = zoi_data; add_token(tok); zoi_data = NULL; zoi_delim[0] = 0; } else { if (zoi_data[0]) { zoi_data = extend_string(zoi_data, " "); } zoi_data = extend_string(zoi_data, buf); } return 1; } if (zoi_delim_next) { strcpy(zoi_delim, buf); zoi_data = new_string(""); zoi_delim_next = 0; return 1; } if (!strcmp(buf, "zoi")) { strcpy(zoi_form, "zoi"); zoi_delim_next = 1; zoi_start_line = start_line; zoi_start_col = start_column; return 1; } if (!strcmp(buf, "la'o")) { strcpy(zoi_form, "la'o"); zoi_delim_next = 1; zoi_start_line = start_line; zoi_start_col = start_column; return 1; } /* Analyse word type */ pws = pwe = word_starts; /* FIXME: Need to get morf_xtra info back here, to help with splitting bad * cmene */ morf_type = morf_scan(buf, &pwe, &mx); column = start_column; switch (morf_type) { case MT_BOGUS: fprintf(stderr, "Unrecognizable word '%s' at line %d column %d\n", buf, start_line, column); had_bad_tokens = 1; break; case MT_BAD_UPPERCASE: fprintf(stderr, "Invalid uppercase letters in word '%s' at line %d column %d\n", buf, start_line, column); had_bad_tokens = 1; break; case MT_GISMU: add_preceding_cmavo(pws, pwe, start_line, &column); add_brivla_token(*pwe, start_line, column, BVT_GISMU); break; case MT_LUJVO: add_preceding_cmavo(pws, pwe, start_line, &column); add_brivla_token(*pwe, start_line, column, BVT_LUJVO); break; case MT_FUIVLA3: case MT_FUIVLA3_CVC: case MT_FUIVLA3X: case MT_FUIVLA3X_CVC: add_preceding_cmavo(pws, pwe, start_line, &column); add_brivla_token(*pwe, start_line, column, BVT_FUIVLA3); break; case MT_FUIVLA4: add_preceding_cmavo(pws, pwe, start_line, &column); add_brivla_token(*pwe, start_line, column, BVT_FUIVLA4); break; case MT_CMENE: process_cmene(buf, start_line, column, mx.u.cmene.is_bad, mx.u.cmene.can_split, mx.u.cmene.ladoi, mx.u.cmene.tail); break; case MT_CMAVOS: { char **pw; char *p, *q; for (pw=pws; pw<=pwe; pw++) { incr = 0; for (p=*pw, q=buf2; ((pw buffer) { \ process_word(buffer, start_line, start_column); \ new_tok = 1; \ p = buffer; \ } #define SET_START if (new_tok) { new_tok = 0; start_line = line; start_column = column; } /*++++++++++++++++++++++++++++++++++++++ Parse an entire file through to the end. FILE *f The file handle to parse ++++++++++++++++++++++++++++++++++++++*/ void parse_file(FILE *f) { char buffer[1024]; /* buffer for words */ char *p; int c; int line; int column; int start_line=1, start_column=0; /* These are only initialised to shut up the compiler */ int new_tok; int paren_depth = 0; zoi_delim[0] = 0; zoi_delim_next = 0; line = 1; column = 0; new_tok = 1; p = buffer; do { c = fgetc(f); column++; if (paren_depth > 0) { if (c == ')') { paren_depth--; new_tok = 1; } else if (c == '(') { paren_depth++; } else if (c == '\n') { line++; column=0; } } else { if (c>='0' && c<='9') { static char *numbers[] = {"no", "pa", "re", "ci", "vo", "mu", "xa", "ze", "bi", "so"}; CLOSE_TOKEN; SET_START; strcpy(buffer, numbers[(int)(c-'0')]); process_word(buffer, start_line, start_column); } else if (c == ':') { CLOSE_TOKEN; SET_START; strcpy(buffer, "pi'e"); process_word(buffer, start_line, start_column); } else { switch (c) { case ' ': case '\t': case '\n': case '.': case '(': case EOF: CLOSE_TOKEN; if (c == '\n') { mark_eol(); line++; column = 0; } if (c == '(') paren_depth = 1; if (c == EOF) goto done; break; default: SET_START; *p++ = c; break; } } } } while (1); done: if (zoi_data) { fprintf(stderr, "Unclosed %s construction at end of file\n", zoi_form); had_bad_tokens = 1; } return; } jbofihe-0.38/lujvod.pl100644 765 764 1711 7350750737 13757 0ustar richardruser# $Header: /cvs/src/jbofihe/lujvod.pl,v 1.2 2001/01/11 21:32:24 richard Exp $ # # Create dictionary source for the lujvo-list. # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # while (<>) { if (/([^#:]+)[#:]([^:]+):([^:]+)/) { print $1.":".$3."\n"; } else { print STDERR "Unmatched ".$_; } } jbofihe-0.38/lex2.c100644 765 764 67363 7350750737 13174 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/lex2.c,v 1.20 2001/03/11 22:12:10 richard Exp $ Higher level lexing functions - group tokens together to implement functions below the level of the bison grammar. Provide the yylex function. The order in which the lexing functions have to be performed comes from the top of grammar.300 - acknowledgements to the Logical Language Group who generated that file. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" #include "cmavotab.h" #include "nodes.h" #define YYSTYPE TreeNode * #include "rpc_tab.h" #include "elide.h" /* For signalling syntax errors back to main routine */ int had_bad_tokens; int last_tok_line; int last_tok_column; /* This is the main linked list used to hold all the tokens acquired during the lexical analysis phase. */ static TreeNode toks = {&toks,&toks}; static TreeNode *next_tok; /*++++++++++++++++++++++++++++++++++++++ Initialise the token list. ++++++++++++++++++++++++++++++++++++++*/ void lex2_initialise(void) { toks.next = toks.prev = &toks; next_tok = toks.next; } /*++++++++++++++++++++++++++++++++++++++ Add a new token to the token stream parsed from the file. struct token *tok ++++++++++++++++++++++++++++++++++++++*/ void add_token(TreeNode *node) { node->next = &toks; node->prev = toks.prev; toks.prev->next = node; toks.prev = node; } /*++++++++++++++++++++++++++++++ Increment number of EOLs following last token ++++++++++++++++++++++++++++++*/ void mark_eol(void) { ++toks.prev->eols; } /*++++++++++++++++++++++++++++++++++++++ Delete a token, include fix up of pointers in neighbours ++++++++++++++++++++++++++++++++++++++*/ void delete_node(TreeNode *x) { x->next->prev = x->prev; x->prev->next = x->next; /* Ought to release memory inside the node depending on type. */ Free(x); } /*++++++++++++++++++++++++++++++++++++++ Delete a token ++++++++++++++++++++++++++++++++++++++*/ void free_node(TreeNode *x) { /* Ought to release memory inside the node depending on type. */ Free(x); } /*++++++++++++++++++++++++++++++++++++++ Display a single token. ++++++++++++++++++++++++++++++++++++++*/ static void show_token(TreeNode *x) { int code; switch (x->type) { case N_GARBAGE: printf("GAR : %s\n", x->data.garbage.word); break; case N_MARKER: printf("MAR : %s\n", x->data.marker.text); break; case N_CMAVO: code = x->data.cmavo.code; printf("CMV : %s [%s]\n", cmavo_table[code].cmavo, cmavo_table[code].meaning); break; case N_ZOI: printf("ZOI : %s\n", x->data.zoi.text); break; case N_ZO: printf("ZO : %s\n", x->data.zo.text); break; case N_LOhU: printf("LOhU : %s\n", x->data.lohu.text); break; case N_ZEI: printf("ZEI : "); printf("%s", build_string_from_node(x)); printf("\n"); break; case N_BU: printf("BU : %s\n", x->data.bu.word); break; case N_BRIVLA: printf("BRV : %s\n", x->data.brivla.word); break; case N_CMENE: printf("CMN : %s\n", x->data.cmene.word); break; case N_BROKEN_ERASURE: printf("BKN : (broken erasure)\n"); break; case N_NONTERM: assert(0); break; } } /*++++++++++++++++++++++++++++++++++++++ Display sequence of tokens ++++++++++++++++++++++++++++++++++++++*/ void show_tokens(void) { TreeNode *x; for (x=toks.next; x!=&toks; x=x->next) { show_token(x); } } /*++++++++++++++++++++++++++++++ Take an inclusive range of nodes and return a text string formed from them. Nodes should be primitive lexer tokens - can extend this later. ++++++++++++++++++++++++++++++*/ #define DEFECTIVE_ERASURE "" char * build_string_from_nodes(TreeNode *start, TreeNode *end) { char *result; TreeNode *y; int len; len = 0; for (y=start; ; y = y->next) { switch (y->type) { case N_GARBAGE: len += strlen(y->data.garbage.word); break; case N_CMAVO: len += strlen(cmavo_table[y->data.cmavo.code].cmavo); break; case N_BRIVLA: len += strlen(y->data.brivla.word); break; case N_CMENE: len += strlen(y->data.cmene.word); break; case N_ZOI: len += 6 + strlen(y->data.zoi.text); break; case N_ZO: len += 3 + strlen(y->data.zo.text); break; case N_ZEI: /* Not particularly efficient, the strings get built again later for now! */ len += strlen(y->data.zei.sep_with_zei); break; case N_BROKEN_ERASURE: len += strlen(DEFECTIVE_ERASURE); break; case N_NONTERM: case N_MARKER: case N_LOhU: case N_BU: assert(0); break; } if (y == end) { break; } else { len++; /* allow for a space between intermediate terms */ } } result = (char *) Malloc(1+len); result[0] = 0; for (y=start; ; y = y->next) { switch (y->type) { case N_GARBAGE: strcat(result, y->data.garbage.word); break; case N_CMAVO: strcat(result, cmavo_table[y->data.cmavo.code].cmavo); break; case N_BRIVLA: strcat(result, y->data.brivla.word); break; case N_CMENE: strcat(result, y->data.cmene.word); break; case N_ZOI: strcat(result, "zoi+\""); strcat(result, y->data.zoi.text); strcat(result, "\""); break; case N_ZO: strcat(result, "zo+"); strcat(result, y->data.zo.text); break; case N_ZEI: strcat(result, y->data.zei.sep_with_zei); break; case N_BROKEN_ERASURE: strcat(result, DEFECTIVE_ERASURE); break; case N_NONTERM: case N_MARKER: case N_LOhU: case N_BU: assert(0); break; } if (y == end) { break; } else { strcat(result, " "); } } return result; } /*++++++++++++++++++++++++++++++++++++++ Convert a single treenode to a string representation. This is at its most useful for recursively expanding zei nodes. ++++++++++++++++++++++++++++++++++++++*/ char * build_string_from_node(TreeNode *the_node) { return build_string_from_nodes(the_node, the_node); } /*++++++++++++++++++++++++++++++++++++++ zo processing ++++++++++++++++++++++++++++++++++++++*/ static void handle_zo(void) { TreeNode *x, *y, *nt; for (x = toks.next; x != &toks; x = x->next) { if ((x->type == N_CMAVO) && cmavo_table[x->data.cmavo.code].selmao == ZO) { y = x->next; if (y == &toks) { fprintf(stderr, "Cannot have ZO as the last token in the text\n"); exit(1); } nt = new_node(); nt->type = N_ZO; switch (y->type) { case N_CMAVO: nt->data.zo.text = new_string(cmavo_table[y->data.cmavo.code].cmavo); break; case N_GARBAGE: nt->data.zo.text = new_string(y->data.garbage.word); break; case N_BRIVLA: nt->data.zo.text = new_string(y->data.brivla.word); break; case N_CMENE: nt->data.zo.text = new_string(y->data.cmene.word); break; case N_ZOI: nt->data.zo.text = new_string(y->data.zoi.text); break; case N_NONTERM: case N_ZO: case N_LOhU: case N_MARKER: case N_BU: case N_ZEI: case N_BROKEN_ERASURE: assert(0); break; } x->type = nt->type; x->data = nt->data; y->next->prev = x; x->next = y->next; } } } /*++++++++++++++++++++++++++++++++++++++ lo'u processing ++++++++++++++++++++++++++++++++++++++*/ static void handle_lohu(void) { TreeNode *x, *y; TreeNode *start, *end, *term; for (x = toks.next; x != &toks; x = x->next) { if (x->type == N_CMAVO && x->data.cmavo.selmao == LOhU) { y = start = x->next; do { if (y == &toks) { fprintf(stderr, "Unterminated LOhU .. LEhU construction\n"); exit(1); } if (y->type == N_CMAVO && y->data.cmavo.selmao == LEhU) { term = y; end = term->prev; break; } y = y->next; } while (1); x->type = N_LOhU; x->data.lohu.text = build_string_from_nodes(start, end); term->next->prev = x; x->next = term->next; /* Lose nodes in range start .. end */ } } } /*++++++++++++++++++++++++++++++ ZEI processing. ++++++++++++++++++++++++++++++*/ static inline int is_zei(TreeNode *x) { return ((x->type == N_CMAVO) && (x->data.cmavo.selmao == ZEI)); } static void handle_zei(void) { TreeNode *x, *nt; int first = 1; char **components; int total_comp_length; for (x = toks.next; x != &toks; x = nt, first=0) { nt = x->next; /* As a default */ if (is_zei(x)) { int count = 1; int i; TreeNode *y, *z, *left, *right; if (first) { fprintf(stderr, "Cannot have 'zei' at the start of the text\n"); had_bad_tokens = 1; /* flag back to main */ nt = x->next; continue; } z = x; /* Points to a zei */ do { y = z->next; if (y == &toks) { fprintf(stderr, "Cannot have 'zei' at the end of the text\n"); had_bad_tokens = 1; /* flag back to main */ nt = x->next; goto done_this_block; } count++; z = y->next; } while ((z != &toks) && is_zei(z)); x->type = N_ZEI; x->data.zei.nchildren = count; x->data.zei.children = new_array(TreeNode *, count); components = new_array(char *, count); total_comp_length = 0; for (i = 0, y = x->prev; i < count; i++, y = y->next->next) { x->data.zei.children[i] = y; components[i] = build_string_from_node(y); total_comp_length += strlen(components[i]); } x->data.zei.sep_with_plus = new_array(char, total_comp_length + (count - 1) + 1); x->data.zei.sep_with_zei = new_array(char, total_comp_length + (count - 1) * 5 + 1); x->data.zei.sep_with_plus[0] = 0; x->data.zei.sep_with_zei[0] = 0; for (i=0; i 0) { strcat(x->data.zei.sep_with_plus, "+"); strcat(x->data.zei.sep_with_zei, " zei "); } strcat(x->data.zei.sep_with_plus, components[i]); strcat(x->data.zei.sep_with_zei, components[i]); Free(components[i]); } Free(components); left = x->prev->prev; right = y->prev; /* Fix up pointers to take collapsed tokens out of the sequence */ right->prev = x; left->next = x; x->next = right; x->prev = left; nt = right; } done_this_block: } } /*++++++++++++++++++++++++++++++++++++++ BAhE processing - look for any BAhE, and absorb it into the token that follows. ++++++++++++++++++++++++++++++++++++++*/ static void handle_bahe(void) { TreeNode *x, *y, *nt; for (x = toks.next; x != &toks; x = nt) { if (x->type == N_CMAVO && x->data.cmavo.selmao == BAhE) { y = x->next; nt = x->next; if ((y != &toks) && !(y->type == N_CMAVO && y->data.cmavo.selmao == FAhO)) { y->bahe = x; /* Unlink x from the main token list */ x->prev->next = y; y->prev = x->prev; } else { /* BAhE at end of text (EOF or FAhO) is an error */ } } else { nt = x->next; } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void handle_bu(void) { TreeNode *x, *y, *nt; for (x = toks.next; x != &toks; x = nt) { nt = x->next; if (x->type == N_CMAVO && x->data.cmavo.selmao == BU) { y = x->prev; x->type = N_BU; switch (y->type) { case N_CMAVO: x->data.bu.word = new_string(cmavo_table[y->data.cmavo.code].cmavo); break; case N_GARBAGE: x->data.bu.word = new_string(y->data.garbage.word); break; case N_BRIVLA: x->data.bu.word = new_string(y->data.brivla.word); break; case N_CMENE: x->data.bu.word = new_string(y->data.cmene.word); break; case N_ZOI: x->data.bu.word = new_string(y->data.zoi.text); break; case N_ZO: { int len = strlen(y->data.zo.text); len += 3; x->data.bu.word = new_array(char, len); strcpy(x->data.bu.word, "zo"); strcat(x->data.bu.word, y->data.zo.text); } break; case N_ZEI: x->data.bu.word = build_string_from_node(y); break; case N_BU: { int len = strlen(y->data.bu.word); len += 4; x->data.bu.word = new_array(char, len); strcpy(x->data.bu.word, y->data.bu.word); strcat(x->data.bu.word, ".bu"); } break; case N_LOhU: { int len = strlen(y->data.lohu.text); len += 11; x->data.bu.word = new_array(char, len); strcpy(x->data.bu.word, "lo'u-"); strcat(x->data.bu.word, y->data.lohu.text); strcat(x->data.bu.word, "-le'u"); } break; case N_BROKEN_ERASURE: x->data.bu.word = new_string(DEFECTIVE_ERASURE); break; case N_NONTERM: case N_MARKER: assert(0); break; } /* Unlink y from the chain */ y->prev->next = x; x->prev = y->prev; free_node(y); } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static int is_indicator_cmavo(TreeNode *x) { if (x->type == N_CMAVO) { if ((x->data.cmavo.selmao == UI) || (x->data.cmavo.selmao == CAI) || (x->data.cmavo.selmao == Y) || (x->data.cmavo.selmao == DAhO) || (x->data.cmavo.selmao == FUhE) || (x->data.cmavo.selmao == FUhO)) { return 1; } else { return 0; } } else { return 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static int is_fuhe(TreeNode *x) { if (x->type == N_CMAVO && x->data.cmavo.selmao == FUhE) { return 1; } else { return 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void advance_indicator(TreeNode **x) { while (is_indicator_cmavo(*x)) { (*x) = (*x)->next; } } /*++++++++++++++++++++++++++++++++++++++ Go through looking for all UI and CAI cmavo. If a NAI immediately follows, pull the NAI onto the 'parent' cmavo as a property. If a CAI follows UI [NAI], pull that onto the UI as a property too. If a NAI follows the CAI, discard it and give a warning - I don't know what that's supposed to mean at the moment. ++++++++++++++++++++++++++++++++++++++*/ static void pair_off_indicator_suffixes(void) { TreeNode *x, *y, *z, *w, *v, *nt; for (x = toks.next; x != &toks; x = nt) { y = x->next; if (is_indicator_cmavo(x)) { if ((y != &toks) && (y->type == N_CMAVO) && (y->data.cmavo.selmao == NAI)) { z = y->next; /* Create the property, we aren't interested in its body so void it */ (void) prop_neg_indicator(x, YES); /* Drop the y node out */ x->next = z; z->prev = x; /* y just dropped altogether */ nt = z; } else { nt = y; } z = nt; /* See if CAI follows */ if ((z != &toks) && (z->type == N_CMAVO) && (z->data.cmavo.selmao == CAI)) { char *tok; XCaiIndicator *xci; xci = prop_cai_indicator(x, YES); tok = cmavo_table[z->data.cmavo.code].cmavo; if (!strcmp(tok, "cai")) { xci->code = CC_CAI; } else if (!strcmp(tok, "sai")) { xci->code = CC_SAI; } else if (!strcmp(tok, "ru'e")) { xci->code = CC_RUhE; } else if (!strcmp(tok, "cu'i")) { xci->code = CC_CUhI; } else if (!strcmp(tok, "pei")) { xci->code = CC_PEI; } else { abort(); } w = z->next; /* Drop z */ x->next = w; w->prev = x; nt = w; /* Handle NAI coming after CAI */ if ((w != &toks) && (w->type == N_CMAVO) && (w->data.cmavo.selmao == NAI)) { switch (xci->code) { case CC_CAI: xci->code = CC_CAINAI; break; case CC_SAI: xci->code = CC_SAINAI; break; case CC_RUhE: xci->code = CC_RUhENAI; break; case CC_CUhI: /* Nothing to do, this is the neutral case so you can't invert it */ break; case CC_PEI: xci->code = CC_PEINAI; break; default: break; } /* Drop w */ v = w->next; x->next = v; v->prev = x; nt = v; } } } else { nt = y; } } } /*++++++++++++++++++++++++++++++++++++++ Indicators processing. Look for any sequence matching the indicators non-terminal, and attach to the preceding node. ++++++++++++++++++++++++++++++++++++++*/ static void handle_indicators(void) { TreeNode *x, *nt, *target, *start, *end; enum {XX_BEGIN, XX_AFTER_INITIAL_FUHE, XX_AFTER_INITIAL_INDICATOR, XX_OTHER} state = XX_BEGIN; pair_off_indicator_suffixes(); for (x = toks.next; x != &toks; x = nt) { switch(state) { case XX_BEGIN: if (is_fuhe(x)) { state = XX_AFTER_INITIAL_FUHE; } else if (is_indicator_cmavo(x)) { state = XX_AFTER_INITIAL_INDICATOR; } else { state = XX_OTHER; } nt = x->next; break; case XX_AFTER_INITIAL_FUHE: if (is_indicator_cmavo(x)) { state = XX_AFTER_INITIAL_INDICATOR; } else { state = XX_OTHER; } nt = x->next; break; case XX_AFTER_INITIAL_INDICATOR: if (!is_indicator_cmavo(x)) { state = XX_OTHER; } nt = x->next; break; case XX_OTHER: if (is_indicator_cmavo(x)) { target = x->prev; start = x; advance_indicator(&x); /* So x now looks at the first token beyond the end of the indicator string */ nt = x; end = nt->prev; /* Unlink the indicator string from the main token list .. */ nt->prev = target; target->next = nt; /* .. and link it onto the indicators list of the target */ start->prev = end->next = (TreeNode *) &target->ui_next; target->ui_next = start; target->ui_prev = end; } else { nt = x->next; } break; } } } /*++++++++++++++++++++++++++++++++++++++ Called to preprocess the token stream. This involves processing the various erasure and quoting constructions, as well as marking certain tokens that need to cope with more than 1 token lookahead for the parser to work (notably things were KE and BO come several tokens later and are required to disambiguate constructs). ++++++++++++++++++++++++++++++++++++++*/ void preprocess_tokens(void) { /* 2a. Look for 'zoi'. This is done in lex1.c, before each word gets split into tokens. */ /* 2b. Look for 'zo' and group following word into it. */ handle_zo(); /* 2c. Look for lo'u ... le'u and eliminate internal data */ handle_lohu(); /* 2d. Done. */ /* 2e. Remove any token followed by SI and the SI itself. */ /* 2f. SA - too vague, don't implement */ /* 2g. Remove anything from SU backwards up to NIhO, LU, TUhE, TO inclusive */ do_erasures(&toks); handle_zei(); handle_bahe(); handle_bu(); handle_indicators(); categorize_tokens(&toks); return; } /*+ External variable referenced by parser. +*/ extern TreeNode *yylval; extern YYLTYPE yylloc; /*++++++++++++++++++++++++++++++ Discard tokens after a parse error. Advance to one of a designated set of tokens or to one of a fall-back set, whichever comes first. Unfortunately, it is practically impossible to use bison's automatic token discarding mechanism. To make that work, you need to have rules of the form nonterm : thing TERMINATOR so that you can enhance this to nonterm : thing TERMINATOR | error TERMINATOR However, the Lojban grammar allows just about every terminator to be elided. Having 'error' at the end of a rule causes Bison to reduce the rule, and then to just keep reducing to the outermost rule because the next (offending) token can usually not be shifted in any of the intermediate contexts. This is obviously useless - you want to reject the smallest enclosing block of material around the error and try to resume parsing at the next sentence of whatever. The 'code' argument to this allows the elidable terminator to be supplied, so that it can be sought for if present and parsing can resume ASAP. ++++++++++++++++++++++++++++++*/ void error_advance(int code) { next_tok = next_tok->next; do { if ((next_tok == &toks) || /* End of file */ ((next_tok->type == N_CMAVO || next_tok->type == N_MARKER) && ((next_tok->data.cmavo.selmao == I) || (next_tok->data.cmavo.selmao == PRIVATE_I_BO) || (next_tok->data.cmavo.selmao == NIhO) || (next_tok->data.cmavo.selmao == LIhU) || (next_tok->data.cmavo.selmao == TOI) || (next_tok->data.cmavo.selmao == TUhU) || (next_tok->data.cmavo.selmao == FAhO) || ((code != 0) && (next_tok->data.cmavo.selmao == code))))) { break; } next_tok = next_tok->next; } while (1); next_tok = next_tok->prev; } /*++++++++++++++++++++++++++++++++++++++ Look-alike for the yylex function int yylex1 ++++++++++++++++++++++++++++++++++++++*/ void yylex1(TokenType *res) { static int returned_EOF = 0; if (returned_EOF) { res->yylval = NULL; res->value = 0; return; } next_tok = next_tok->next; if (next_tok == &toks) { /* End of file condition */ returned_EOF = 1; res->yylval = NULL; res->value = PRIVATE_EOF_MARK; return; } else { /* Return a real token */ last_tok_line = res->yylloc.first_line = next_tok->start_line; last_tok_column = res->yylloc.last_line = next_tok->start_line; res->yylloc.first_column = next_tok->start_column; res->yylloc.last_column = next_tok->start_column; switch (next_tok->type) { case N_MARKER: res->yylval = next_tok; res->value = next_tok->data.marker.tok; return; break; case N_GARBAGE: case N_BROKEN_ERASURE: /* Needs its own parser token value */ res->value = GARBAGE; return; break; case N_CMAVO: if (next_tok->data.cmavo.selmao == FAhO) { returned_EOF = 1; res->yylval = NULL; res->value = PRIVATE_EOF_MARK; return; } else { res->yylval = next_tok; res->value = next_tok->data.cmavo.selmao; return; } break; case N_ZOI: res->yylval = next_tok; res->value = ZOI; return; break; case N_ZO: res->yylval = next_tok; res->value = ZO; return; break; case N_LOhU: res->yylval = next_tok; res->value = LOhU; return; break; case N_ZEI: res->yylval = next_tok; res->value = ZEI; return; break; case N_BU: res->yylval = next_tok; res->value = BU; return; break; case N_BRIVLA: res->yylval = next_tok; res->value = BRIVLA; return; break; case N_CMENE: res->yylval = next_tok; res->value = CMENE; return; break; case N_NONTERM: assert(0); break; } } assert(0); } /*++++++++++++++++++++++++++++++++++++++ Print a single token's details ++++++++++++++++++++++++++++++++++++++*/ static void print_token_details(TreeNode *x) { int code; fprintf(stderr, " "); switch (x->type) { case N_GARBAGE: fprintf(stderr,"%s (line %d, col %d)\n", x->data.garbage.word, x->start_line, x->start_column); break; case N_MARKER: fprintf(stderr,"MARKER : %s\n", x->data.marker.text); break; case N_CMAVO: code = x->data.cmavo.code; fprintf(stderr,"%s [%s] (line %d, col %d)\n", cmavo_table[code].cmavo, selmao_names[cmavo_table[code].ssm_code], x->start_line, x->start_column); break; case N_ZOI: fprintf(stderr,"%s %s. %s %s. (line %d, col %d)\n", x->data.zoi.form, x->data.zoi.term, x->data.zoi.text, x->data.zoi.term, x->start_line, x->start_column); break; case N_ZO: fprintf(stderr,"zo %s (line %d, col %d)\n", x->data.zo.text, x->start_line, x->start_column); break; case N_LOhU: fprintf(stderr,"lo'u %s le'u (line %d, col %d)\n", x->data.lohu.text, x->start_line, x->start_column); break; case N_ZEI: { char *zei_text; zei_text = build_string_from_node(x); fprintf(stderr,"%s (line %d, col %d)\n", zei_text, x->start_line, x->start_column); Free(zei_text); } break; case N_BU: fprintf(stderr,"%s bu (line %d, col %d)\n", x->data.bu.word, x->start_line, x->start_column); break; case N_BRIVLA: fprintf(stderr,"%s [BRIVLA] (line %d, col %d)\n", x->data.brivla.word, x->start_line, x->start_column); break; case N_CMENE: fprintf(stderr,"%s [CMENE] (line %d, col %d)\n", x->data.cmene.word, x->start_line, x->start_column); break; case N_BROKEN_ERASURE: fprintf(stderr," (line %d, col %d)\n", x->start_line, x->start_column); break; case N_NONTERM: assert(0); break; } } /*++++++++++++++++++++++++++++++++++++++ Print the last N tokens parsed ++++++++++++++++++++++++++++++++++++++*/ void print_last_toks(void) { TreeNode *x; int i; fprintf(stderr, "Misparsed token :\n"); if (next_tok != &toks) { print_token_details(next_tok); } else { fprintf(stderr, " \n"); } fprintf(stderr, "Latest successfully parsed tokens :\n"); for (x = next_tok->prev, i = 0; i < 8 && x != &toks; i++, x = x->prev) { print_token_details(x); } } jbofihe-0.38/lujvofns.c100644 765 764 27022 7350750737 14154 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/lujvofns.c,v 1.5 2001/07/09 22:07:45 richard Exp $ Functions to do with manipulating lujvo etc. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include "lujvofns.h" #define CONSONANT 0001 #define VOWEL 0002 #define LETTER_Y 0004 #define APOS 0010 #define SIBILANT 0020 #define VOICED 0040 #define UNVOICED 0100 #define UPPERCASE 0200 unsigned char attr_table[256] = {/*{{{*/ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 000 - 007 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 010 - 017 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 020 - 027 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 030 - 037 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0010, /* 040 - 047 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 050 - 057 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 060 - 067 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 070 - 077 */ 0000, 0202, 0241, 0321, 0241, 0202, 0301, 0241, /* 100 - 107 */ 0200, 0202, 0261, 0301, 0201, 0201, 0201, 0202, /* 110 - 117 */ 0301, 0200, 0201, 0321, 0301, 0202, 0241, 0200, /* 120 - 127 */ 0301, 0204, 0261, 0000, 0000, 0000, 0000, 0000, /* 130 - 137 */ 0000, 0002, 0041, 0121, 0041, 0002, 0101, 0041, /* 140 - 147 */ 0000, 0002, 0061, 0101, 0001, 0001, 0001, 0002, /* 150 - 157 */ 0101, 0000, 0001, 0121, 0101, 0002, 0041, 0000, /* 160 - 167 */ 0101, 0004, 0061, 0000, 0000, 0000, 0000, 0000, /* 170 - 177 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 200 - 207 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 210 - 217 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 220 - 227 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 230 - 237 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 240 - 247 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 250 - 257 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 260 - 267 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 270 - 277 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 300 - 307 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 310 - 317 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 320 - 327 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 330 - 337 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 340 - 347 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 350 - 357 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, /* 360 - 367 */ 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000 /* 370 - 377 */ };/*}}}*/ int is_consonant(char c) {/*{{{*/ return !!(attr_table[(unsigned)c & 0xff] & CONSONANT); } /*}}}*/ int is_uppercase_consonant(char c) {/*{{{*/ int m = CONSONANT | UPPERCASE; return ((attr_table[(unsigned)c & 0xff] & m) == m); } /*}}}*/ int is_vowel(char c) {/*{{{*/ return !!(attr_table[(unsigned)c & 0xff] & VOWEL); } /*}}}*/ int is_voiced(char c) {/*{{{*/ return !!(attr_table[(unsigned)c & 0xff] & VOICED); } /*}}}*/ int is_unvoiced(char c) {/*{{{*/ return !!(attr_table[(unsigned)c & 0xff] & UNVOICED); } /*}}}*/ int is_sibilant(char c) {/*{{{*/ return !!(attr_table[(unsigned)c & 0xff] & SIBILANT); } /*}}}*/ int is_ccv(char *s) {/*{{{*/ if ((strlen(s) >= 3) && is_consonant(s[0]) && is_consonant(s[1]) && is_vowel(s[2])) { return 1; } else { return 0; } } /*}}}*/ int is_cvv(char *s) {/*{{{*/ int len = strlen(s); if ((len >= 3) && is_consonant(s[0]) && is_vowel(s[1]) && is_vowel(s[2])) { return 1; } else { return 0; } } /*}}}*/ int is_cvav(char *s) {/*{{{*/ int len = strlen(s); if ((len >= 4) && is_consonant(s[0]) && is_vowel(s[1]) && (s[2] == '\'') && is_vowel(s[3])) { return 1; } else { return 0; } } /*}}}*/ int is_cvc(char *s) {/*{{{*/ if ((strlen(s) >= 3) && is_consonant(s[0]) && is_vowel(s[1]) && is_consonant(s[2])) { return 1; } else { return 0; } } /*}}}*/ int is_cvccv(char *s) {/*{{{*/ if ((strlen(s) >= 5) && is_consonant(s[0]) && is_vowel(s[1]) && is_consonant(s[2]) && is_consonant(s[3]) && is_vowel(s[4])) { return 1; } else { return 0; } }/*}}}*/ int is_cvccy(char *s) {/*{{{*/ if ((strlen(s) >= 5) && is_consonant(s[0]) && is_vowel(s[1]) && is_consonant(s[2]) && is_consonant(s[3]) && (s[4] == 'y')) { return 1; } else { return 0; } }/*}}}*/ int is_ccvcv(char *s) {/*{{{*/ if ((strlen(s) >= 5) && is_consonant(s[0]) && is_consonant(s[1]) && is_vowel(s[2]) && is_consonant(s[3]) && is_vowel(s[4])) { return 1; } else { return 0; } }/*}}}*/ int is_ccvcy(char *s) {/*{{{*/ if ((strlen(s) >= 5) && is_consonant(s[0]) && is_consonant(s[1]) && is_vowel(s[2]) && is_consonant(s[3]) && (s[4] == 'y')) { return 1; } else { return 0; } }/*}}}*/ int is_pairok(char *s) {/*{{{*/ /* Check whether a consonant pair is permissible */ int test1, test2, test3, test4; /* all true if acceptable */ test1 = (s[0] != s[1]); test2 = !((is_voiced(s[0]) && is_unvoiced(s[1])) || (is_voiced(s[1]) && is_unvoiced(s[0]))); test3 = !(is_sibilant(s[0]) && is_sibilant(s[1])); test4 = strncmp(s, "cx", 2) && strncmp(s, "kx", 2) && strncmp(s, "xc", 2) && strncmp(s, "xk", 2) && strncmp(s, "mz", 2); return test1 && test2 && test3 && test4; } /*}}}*/ int is_initialpairok(char *s) {/*{{{*/ /* Return 1 if an initial consonant pair is acceptable for a lujvo, otherwise return 0. */ switch (s[0]) { case 'b': case 'f': case 'g': case 'k': case 'm': case 'p': case 'v': case 'x': return !!strchr("lr", s[1]); case 'c': case 's': return !!strchr("fklmnprt", s[1]); case 'd': return !!strchr("jrz", s[1]); case 'j': case 'z': return !!strchr("bdgmv", s[1]); case 't': return !!strchr("crs", s[1]); default: return 0; } } /*}}}*/ int is_bad_triple (char *s) {/*{{{*/ /* Check whether a triple is bad */ if (!strncmp(s,"ntc",3) || !strncmp(s,"nts",3) || !strncmp(s,"ndj",3) || !strncmp(s,"ndz",3)) return 1; else return 0; } /*}}}*/ /* ========================================*/ static int debug_ivl = 0; #define ADVANCE(n) t+=(n), len-=(n) /* is_valid_lujvo(), used by the jvocu'adju program to do tosmabru checks. */ int is_valid_lujvo(char *t) { int len = strlen(t); char buf[1024]; /* Flags to check CVV + hyphen stuff. */ int start_cvv; int had_rn_hyphen; int final_ccv; /* Number of components seen */ int nrafsi; start_cvv = 0; had_rn_hyphen = 0; nrafsi = 0; for (;;) { if (debug_ivl) printf("Residual [%s]\n", t); if ((len == 5) && is_cvccv(t)) {/*{{{*/ if (nrafsi==0) return 0; /* Can't be initial */ if (!is_pairok(t+2)) return 0; ADVANCE(5); /*}}}*/ } else if ((len == 5) && is_ccvcv(t)) {/*{{{*/ if (nrafsi==0) return 0; /* Can't be initial */ if (!is_pairok(t)) return 0; ADVANCE(5); /*}}}*/ } else if (is_cvccy(t)) {/*{{{*/ if (len==5) return 0; /* Can't be final */ if (!is_pairok(t+2)) return 0; ADVANCE(5); /*}}}*/ } else if (is_ccvcy(t)) {/*{{{*/ if (len==5) return 0; /* Can't be final */ if (!is_initialpairok(t)) return 0; ADVANCE(5); /*}}}*/ } else if (is_cvc(t)) {/*{{{*/ int pair_ok, bad_triple, smabru, initial, need_y; if (len<6) return 0; /* Can't be final, must be at least 3 letters after now */ if (t[3] == 'y') { buf[0] = t[2]; strcpy(buf+1, t+4); pair_ok = is_pairok(buf); bad_triple = is_bad_triple(buf); initial = (nrafsi == 0); smabru = initial ? is_valid_lujvo(buf) : 0; need_y = bad_triple || (initial && smabru); if (debug_ivl) printf("cvc+y, pok=%d bt=%d init=%d smabru=%d\n", pair_ok, bad_triple, initial, smabru); /* Check whether the y is unnecessary */ if (pair_ok && !need_y) return 0; ADVANCE(4); } else { pair_ok = is_pairok(t+2); bad_triple = is_bad_triple(t+2); initial = (nrafsi == 0); smabru = initial ? is_valid_lujvo(t+2) : 0; need_y = bad_triple || (initial && smabru); if (debug_ivl) printf("cvc, pok=%d bt=%d init=%d smabru=%d\n", pair_ok, bad_triple, initial, smabru); /* Check whether there should be a y */ if (!pair_ok || need_y) return 0; ADVANCE(3); } /*}}}*/ } else if (is_cvv(t)) {/*{{{*/ if (nrafsi == 0) { if (len < 6) return 0; /* Strip hyphen */ start_cvv = 1; if (((t[3] == 'r') && (is_consonant(t[4]) && (t[4] != 'r'))) || ((t[3] == 'n') && (t[4] == 'r'))) { had_rn_hyphen = 1; ADVANCE(4); } else { ADVANCE(3); } } else { ADVANCE(3); } /*}}}*/ } else if (is_cvav(t)) {/*{{{*/ if (nrafsi == 0) { if (len < 7) return 0; /* Strip hyphen */ start_cvv = 1; if (((t[4] == 'r') && (is_consonant(t[5]) && (t[5] != 'r'))) || ((t[4] == 'n') && (t[5] == 'r'))) { had_rn_hyphen = 1; ADVANCE(5); } else { ADVANCE(4); } } else { ADVANCE(4); } /*}}}*/ } else if (is_ccv(t)) {/*{{{*/ if (!is_initialpairok(t)) return 0; if (len == 3) final_ccv = 1; ADVANCE(3); /*}}}*/ } else {/*{{{*/ /* Anything else is invalid */ return 0; /*}}}*/ } nrafsi++; if (!*t) break; /* At end of word */ } /* Final processing to check validity */ if (start_cvv) { if (((nrafsi == 2) && final_ccv) || had_rn_hyphen) return 1; else return 0; } else { return 1; } } #ifdef TEST_PRIMITIVES int main() { int c; for (c='a'; c<='z'; c++) { printf("%c c=%d uc=%d v=%d sib=%d voi=%d unv=%d\n", c, is_consonant(c), is_uppercase_consonant(c), is_vowel(c), is_sibilant(c), is_voiced(c), is_unvoiced(c)); } return 0; } #endif #ifdef TEST_IS_VALID_LUJVO int main(int argc, char **argv) { int ivl; char *word = NULL; while (++argv, --argc) { if (!strcmp(*argv, "-d")) { debug_ivl = 1; } else if ((*argv)[0] == '-') { fprintf(stderr, "Unrecognized switch %s\n", *argv); } else { word = *argv; } } if (!word) { fprintf(stderr, "Need a lujvo to check as an argument\n"); exit(1); } ivl = is_valid_lujvo(word); printf("%s : %s\n", word, ivl ? "is a lujvo" : "not a lujvo"); return !ivl; } #endif jbofihe-0.38/lujvofns.h100644 765 764 3044 7350750737 14137 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/lujvofns.h,v 1.2 2001/07/08 21:49:33 richard Exp $ ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef LUJVOFNS_H #define LUJVOFNS_H /*+ To stop multiple inclusions. +*/ int is_consonant(char c); int is_uppercase_consonant(char c); int is_vowel(char c); int is_voiced(char c); int is_unvoiced(char c); int is_sibilant(char c); int is_ccv(char *s); int is_cvv(char *s); int is_cvav(char *s); int is_cvc(char *s); int is_cvccv(char *s); int is_ccvcv(char *s); int is_cvccy(char *s); int is_ccvcy(char *s); int is_pairok(char *s); int is_initialpairok(char *s); int is_bad_triple(char *s); int is_valid_lujvo(char *t); #endif /* LUJVOFNS_H */ jbofihe-0.38/minitouch.c100644 765 764 1060 7350750740 14251 0ustar richardruser/* Program used to force the modification times of the files when compiling on DOS. (Workaround for what happens during summer time when non-volatile clock is kept on UTC - DJGPP make complains everything is in the future.) $Id: minitouch.c,v 1.2 2000/10/24 22:59:19 richard Exp $ COPYRIGHT */ #include #include #include int main (int argc, char **argv) { while (*argv) { if (utime(*argv, NULL) < 0) { perror("Couldn't set times for %s", *argv); exit(1); } ++argv; } return 0; } jbofihe-0.38/main.c100644 765 764 23376 7350750737 13242 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/main.c,v 1.29 2001/03/09 22:18:56 richard Exp $ Top level file. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "nodes.h" #include "functions.h" #include "version.h" /* The node into which the parser inserts the top node of the parse tree */ TreeNode *top; extern int yydebug; extern int yyparse(void); extern int full_yyparse(void); extern DriverVector latex_driver, latex_block_driver; extern DriverVector textout_driver, text_block_driver; extern DriverVector html_driver; /* Flag set by yyerror - i.e. there were syntax errors that were cleaned up so didn't get reported by yyparse */ static int had_syntax_error; /* Flag set in lexical analyser + morphology block, if there are invalid words in the input stream. This causes the run to be aborted before the parse phase. */ int had_bad_tokens; /* Optional parameters to be read by backends */ int opt_output_width; int insert_elidables; /* Flag to allow cultural rafsi within lujvo (and as part of slinku'i test) */ int allow_cultural_rafsi; /* Flag to use parser that requires all elidable separators and terminators to be present */ int require_elidables; /* Flag to show which elidables could safely have been elided but weren't, and whether a verbose report is required */ int show_elisions; int show_elisions_verbose; /* Flag to display backtrace when a syntax error arises */ int show_backtrace; /* Flag to show dictionary defects */ int show_dictionary_defects; /* Error routine invoked from the parser */ void yyerror(char *s) { /* Printing out the token dump is now done in tracebk.c */ had_syntax_error = 1; } /* Handle signals */ void handle_signal(int x) { fprintf(stderr,"\n" "--------------------------------------------------------------------------\n" "An unexpected error has occurred whilst running jbofihe.\n\n" "Please submit a report to , with at least this information:\n" " Version of jbofihe (jbofihe -v)\n" " Command line options\n" " The input text\n" "--------------------------------------------------------------------------\n"); exit(1); } /* Print out usage information */ static void show_usage(void) { fprintf(stderr, "jbofihe version %s\n", version_string); fprintf(stderr, "Copyright 1998-2001 Richard P. Curnow \n\n" "-k Show token lists before and after preprocessing\n" "-t Show edited parse tree\n" "-tf Show full parse tree\n" "\n" "These options produce formatted Lojban + partial English translation\n" "-l Produce LaTeX output\n" "-x Produce plain text output\n" "-H Produce HTML output\n" "-b Produce 'blocked' output (LaTeX & plain text only)\n" "-w Set output width (plain text)\n" "\n" "These options relate to handling elidable separators/terminators\n" "-ie Display elided separators and terminators\n" "-re Require elidable separators and terminators to be present\n" "-se Show elidable separators/terminators that could be omitted\n" "-sev Ditto, plus verbose detail\n" "\n" "These options relate to grammar options\n" "-cr Allow cultural rafsi in lujvo (Reference Grammar section 4.16)\n" "\n" "These options relate to help & debug\n" "-v Show version number and exit\n" "-h Show this help information\n" "-? Show this help information\n" "-m Show memory usage statistics\n" "-d Show debug information\n" "-dd Report missing dictionary entries to stderr\n" "-bt Show parser state backtrace when a syntax error occurs\n" ); } /* Main routine */ int main (int argc, char **argv) { char *filename = NULL; FILE *in = NULL; int result; int debug; int token_lists; int show_tree; int full_tree; int gloss; int block; int latex; int textout; int htmlout; int show_memory; debug = 0; token_lists = 0; show_tree = 0; full_tree = 0; gloss = 0; latex = 0; textout = 0; htmlout = 0; block = 0; show_memory = 0; opt_output_width = 79; insert_elidables = 0; require_elidables = 0; show_elisions = 0; show_elisions_verbose = 0; allow_cultural_rafsi = 0; show_backtrace = 0; show_dictionary_defects = 0; had_bad_tokens = 0; while (++argv, --argc) { if (!strcmp(*argv, "-d")) { debug = 1; } else if (!strcmp(*argv, "-v")) { fprintf(stderr, "jbofihe version %s\n", version_string); exit(0); } else if (!strcmp(*argv, "-k")) { token_lists = 1; } else if (!strcmp(*argv, "-g")) { gloss = 1; } else if (!strcmp(*argv, "-t")) { show_tree = 1; } else if (!strcmp(*argv, "-tf")) { show_tree = 1; full_tree = 1; } else if (!strcmp(*argv, "-l")) { latex = 1; } else if (!strcmp(*argv, "-x")) { textout = 1; } else if (!strcmp(*argv, "-H")) { htmlout = 1; } else if (!strcmp(*argv, "-b")) { block = 1; } else if (!strcmp(*argv, "-m")) { show_memory = 1; } else if (!strcmp(*argv, "-ie")) { insert_elidables = 1; } else if (!strcmp(*argv, "-re")) { require_elidables = 1; } else if (!strcmp(*argv, "-se")) { show_elisions = 1; } else if (!strcmp(*argv, "-sev")) { show_elisions = 1; show_elisions_verbose = 1; } else if (!strcmp(*argv, "-cr")) { allow_cultural_rafsi = 1; } else if (!strcmp(*argv, "-bt")) { show_backtrace = 1; } else if (!strcmp(*argv, "-dd")) { show_dictionary_defects = 1; } else if (!strncmp(*argv, "-w", 2)) { if (strlen(*argv) > 2) { opt_output_width = atoi(*argv + 2); } else { /* Get next argument */ --argc, ++argv; opt_output_width = atoi(*argv); } } else if (!strcmp(*argv, "--help")) { show_usage(); exit(0); } else if (!strcmp(*argv, "-h")) { show_usage(); exit(0); } else if (!strcmp(*argv, "-?")) { show_usage(); exit(0); } else if (!strncmp(*argv, "-", 1)) { fprintf(stderr, "Unrecognized command line option %s\n", *argv); exit(1); } else { filename = *argv; } } /* Check flag compatibility */ if (require_elidables && show_elisions) { fprintf(stderr, "-re and -se switches are not compatible, -se ignored\n"); show_elisions = 0; } #if !defined(EXPOSE_SIGNALS) signal(SIGABRT, handle_signal); #if !defined(DJGPP) /* This signal doesn't seem to be defined on DJGPP */ signal(SIGBUS, handle_signal); #endif signal(SIGSEGV, handle_signal); #endif lex2_initialise(); if (filename) { in = fopen(filename, "r"); if (!in) { fprintf(stderr, "Could not open %s for input\n", filename); exit(1); } } parse_file(in ? in : stdin); if (in) fclose(in); if (had_bad_tokens) { return 3; } if (token_lists) { printf("\nToken list before preprocessing\n\n"); show_tokens(); } preprocess_tokens(); /* Check again, lex2 can detect bad constructs as well. */ if (had_bad_tokens) { return 3; } if (token_lists) { printf("------------------------------\n" "Token list after preprocessing\n\n"); show_tokens(); printf("------------------------------\n\n"); } #if 1 yydebug = debug; had_syntax_error = 0; if (require_elidables) { result = full_yyparse(); } else { result = yyparse(); } if (result == 0 && !had_syntax_error) { expand_bahe_ui(top); error_scan(top); if (show_tree) { if (!full_tree) { compress_singletons(top); } print_parse_tree(top); } else if (latex || textout || htmlout) { terms_processing(top); do_conversions(top); tense_processing(top); connectives_processing(top); relative_clause_processing(top); add_bracketing_tags(top); if (latex) { do_output(top, block ? &latex_block_driver : &latex_driver); } else if (textout) { do_output(top, block ? &text_block_driver: &textout_driver); } else if (htmlout) { do_output(top, &html_driver); } } else { compress_singletons(top); print_bracketed_text(top, gloss); } } #endif if (show_memory) { print_memory_statistics(); } return result ? 1 : had_syntax_error ? 2 : 0; } jbofihe-0.38/memory.c100644 765 764 5130 7350750740 13564 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/memory.c,v 1.2 2000/04/29 23:14:58 richard Exp $ malloc/free wrappers to allow auditing. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include "functions.h" static unsigned long bytes_in_use = 0; static unsigned long max_bytes_in_use = 0; /*++++++++++++++++++++++++++++++ Replacement for malloc() ++++++++++++++++++++++++++++++*/ void *Malloc(size_t n) { char *s, *r; unsigned long *x; size_t nn; bytes_in_use += n; if (bytes_in_use > max_bytes_in_use) { max_bytes_in_use = bytes_in_use; } nn = n + 8; s = (char *) malloc(nn); x = (unsigned long *) s; *x = n; r = (void *) (s + 8); return r; } /*++++++++++++++++++++++++++++++ Replacement for malloc() ++++++++++++++++++++++++++++++*/ void *Realloc(void *old, size_t n) { char *s, *r; unsigned long *x; size_t nn; s = (char *)old - 8; x = (unsigned long *) s; bytes_in_use -= *x; bytes_in_use += n; if (bytes_in_use > max_bytes_in_use) { max_bytes_in_use = bytes_in_use; } nn = n + 8; s = (char *) realloc(s, nn); x = (unsigned long *) s; *x = n; r = (void *) (s + 8); return r; } /*++++++++++++++++++++++++++++++ Replacement for free() ++++++++++++++++++++++++++++++*/ void Free(void *x) { char *r, *s; unsigned long *v; size_t nn; r = (char *) x; s = (void *) (r - 8); v = (unsigned long *) s; nn = *v; bytes_in_use -= nn; free(s); } /*++++++++++++++++++++++++++++++ Print amount of memory used ++++++++++++++++++++++++++++++*/ void print_memory_statistics(void) { fprintf(stderr, "Bytes in use at end : %8lu\n" "Maximum bytes in use : %8lu\n", bytes_in_use, max_bytes_in_use); } jbofihe-0.38/mk_enctab.pl100644 765 764 7364 7350750740 14403 0ustar richardruser#!/usr/bin/env perl # Create encoding table to turn bit vector output by DFA into the recognized # word type (given that multiple bits may be set in the vector and it's down to # a priority scheme to decide which one dominates.) # $Header: /cvs/src/jbofihe/mk_enctab.pl,v 1.3 2001/01/11 22:43:36 richard Exp $ # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # # Build first state table, 256 entries for dealing with cmavo, gismu, lujvo. # Each class should be mutually disjoint. $W_UNKNOWN = 0; $W_CMAVOS = 1; $W_CMAVOS_END_CY = 2; $W_GISMU = 3; $W_LUJVO = 4; $W_FUIVLA = 5; $W_CMENE = 6; $W_BAD_TOSMABRU = 8; $W_BAD_SLINKUI = 9; $W_BIZARRE = 10; @table = (); for $c (0..1) { for $cy (0..1) { for $g0 (0..1) { for $g1 (0..1) { for $l0 (0..1) { for $l1 (0..1) { for $l1t (0..1) { for $tos (0..1) { $addr = $c | ($cy<<1) | ($g0<<2) | ($g1<<3) | ($l0<<4) | ($l1<<5) | ($l1t<<6) | ($tos<<7); $result = $W_UNKNOWN; $decrement = 0; if (($c && $cy) || (($c || $cy) && ($g0 || $g1)) || (($c || $cy) && ($l0 || $l1 || $l1t)) || (($g0 || $g1) && ($l0 || $l1 || $l1t)) || (($l1t || $tos) && ($l0 || $l1))) { $result = $W_BIZARRE; } elsif ($g0) { $result = $W_GISMU; } elsif ($g1) { $result = $W_GISMU; $decrement = 1; } elsif ($l0) { $result = $W_LUJVO; } elsif ($l1) { $result = $W_LUJVO; $decrement = 1; } elsif ($l1t) { $decrement = 1; $result = ($tos) ? $W_LUJVO : $W_BAD_TOSMABRU; } elsif ($c) { $result = $W_CMAVOS; } elsif ($cy) { $result = $W_CMAVOS_END_CY; } else { # unknown } $table[$addr] = $result + ($decrement ? 0x80 : 0x0); } } } } } } } } print "static unsigned char morf_enctab1[256] = {\n "; for $i (0 .. 255) { printf "0x%02x", $table[$i]; if ($i < 255) { print ", "; } if ($i%8 == 7) { print "\n "; } } print "};\n\n"; # 2nd table to decode fuivla/slinkui and cmene @table = (); for $fv0 (0..1) { for $fv1 (0..1) { for $sl0 (0..1) { for $cmn (0..1) { $addr = ($fv0) | ($fv1<<1) | ($sl0<<2) | ($cmn<<3); $result = $W_UNKNOWN; $decrement = 0; if (($cmn && ($fv0 || $fv1 || $sl0))) { $result = $W_BIZARRE; } elsif ($cmn) { $result = $W_CMENE; } elsif ($fv0 && $sl0) { # If the shorter tail word is invalid due to slinku'i, yet the longer # word formed by leaving the previous syllable attached is OK, then # that is the correct result. (e.g baislinku'i is a valid fu'ivla as is) if ($fv1) { $decrement = 1; $result = $W_FUIVLA; } else { $result = $W_BAD_SLINKUI; } } elsif ($fv0) { $result = $W_FUIVLA; } elsif ($fv1) { $result = $W_FUIVLA; $decrement = 1; } else { # Keep default } $table[$addr] = $result + ($decrement ? 0x80 : 0x0); } } } } print "static unsigned char morf_enctab2[32] = {\n "; for $i (0 .. 31) { printf "0x%02x", $table[$i]; if ($i < 31) { print ", "; } if ($i%8 == 7) { print "\n "; } } print "};\n\n"; jbofihe-0.38/mk_fetab.pl100644 765 764 23333 7350750740 14242 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/mk_fetab.pl,v 1.2 2001/02/21 22:16:26 richard Exp $ # Build the tables for the front-end stage of the morphology alg. # Map input char. string to approx 12 symbol alphabet, and # eventually store the posn. of each vowel to consonant transition. # This builds the tables for doing this. # Encoded this: # L (2 MS bits) is 2 symbols ago # S (5 bits) is 1 symbol ago # G (5 LS bits) is latest symbol # LSG is 12 bit index into LUT # bits 3:0 are return token # bits 5:4 are action on LSG # bit 6 is whether to store position # bit 7 is whether to inhibit further position stores ####################################################################### # Notes on the lexing to feed into the DFA # # Have a LUT with 3 inputs catenated together to provide the returned tok and the action to update the state. # # Returned token alphabet is # V : vowel # C : cons following non-cons # APOS : apostrophe # CI : init pair (=> permissible too) # CSI : init pair with 2nd letter syllabic (l,m,n,r) # CP : permissible non-init pair # CS : CP with 2nd letter syllabic (l,m,n,r) # CN : non-permissible pair (maybe with 'y' between) # Y : 'y' # H : 3 letter hyphens that occur in F-III's (may be returned when DFA expects a # CP, watch out!) # HS : like H with added requirement that 3rd letter is syllabic (l,m,n,r) # BT : Bad triple (ntc,nts,ndj,ndz) # # (The next 3 are needed to properly check CVV[rn](>=2syl or CVV) forms # R : 'r' after non-cons # N : 'n' after non-cons # NR : 'nr' after non-cons # # i.e. 12 returned token types # state action has 3 states : clear, shift or hold # Encode L as 2 bits, S & G as 5 bits each to give a LUT mapping 4096 cases to single bytes # (4 bits return tok, 2 bits action, 2 bits spare) # # State as follows # L (limited) : encode 'n', 'r', cons other than 'n' or 'r', or other/blank # S (saved) : encode any consonant. All vowels, apostrophes, 'y' encode to 'other' # (note, apostrophe = 39ASCII = 7 when reduced to 5 bits, so this needs recoding to another dead # value. Vowels and y can be left as-they-are, or collapsed if there is a 256->32 table to # collapse the values) # G (got) : the last token # L', S' : the next values of L & S. # (propagation from S -> L' has to encode 32->4) # # Use these abbrevs # C : any cons. # V : any vowel # Cn : cons other than n # Cr : cons other than r # Cnr : cons other than n or r # * : any # - : blank setting # # SGI : SG is CC # SGP : SG is C/C # # ---------------------------------------------- # L S G SGI SGP ->tok L' S' # ---------------------------------------------- # * * V V - - (clear state) # * * ' APOS - - (clear state) # * * y Y L S (retain state for checking cons pairs) # # - - r R S G # - - n N S G # - - Cnr C S G # # # F-III hyphen cases (none of these can be CI # # in the S/G pair) # # Cnr r Cnr H S G # n r Cnr H S G # Cnr r n H S G # n r n H S G # # r n Cnr H S G # Cnr n r H S G # r n Cnr H S G # r n r H S G # # r l n H S G # n l r H S G # # n t c BT S G # n t s BT S G # n d j BT S G # n d z BT S G # # - n r NR S G # # # Cons pairs - returned token depends on what type # # of pair has appeared (note : cases in DFA where # # CP is a significant token may have to be checked for # # spurious applicability of H token too) # # * C C YES YES CI S G # * C C NO YES CP S G # * C C NO NO CN S G # # # Fall-thru case for anything else (e.g. bogus chars) # # * * * JUNK don't care ####################################################################### $TOK_UNK = 0; $TOK_V = 1; $TOK_APOS = 2; $TOK_Y = 3; $TOK_R = 4; $TOK_N = 5; $TOK_C = 6; $TOK_NR = 7; $TOK_CI = 8; $TOK_CSI = 9; $TOK_CP = 10; $TOK_CS = 11; $TOK_CN = 12; $TOK_H = 13; $TOK_HS = 14; $TOK_BT = 15; # bad triples # WARNING : If token values ever go above 15, the encoding scheme # has to be changed, as 4 bits are allowed. $AC_CLR = 0; $AC_SFT = 1; $AC_FRZ = 2; @table = (); $n = 0; print "static unsigned char inact[] = {\n"; for ($i=0; $i<4; $i++) { # encoding 0=clear/non-cons, 1=n, 2=r, 3=C\[nr] for ($s=0; $s<32; $s++) { for ($g=0; $g<32; $g++) { $a = sprintf("%c%c", $s+96, $g+96); $a =~ s/~/'/go; $a = "V".$a if ($i == 0); $a = "n".$a if ($i == 1); $a = "r".$a if ($i == 2); $a = "C".$a if ($i == 3); if ($a =~ /^(rln|nlr)$/) { $act = $AC_SFT; $tok = $TOK_HS; $set = 0; $inh = 1; } elsif ($a =~ /^([Cn]r[bcdfgjklmnpstvxz])$/) { $act = $AC_SFT; if ($a =~ /..[lmnr]/) { $tok = $TOK_HS; } else { $tok = $TOK_H; } $set = 0; $inh = 1; } elsif ($a =~ /^(rn[bcdfgjklmprstvxz])$/) { $act = $AC_SFT; if ($a =~ /..[lmnr]/) { $tok = $TOK_HS; } else { $tok = $TOK_H; } $set = 0; $inh = 1; } elsif ($a =~ /^(Cnr)$/) { $act = $AC_SFT; $tok = $TOK_HS; $set = 0; $inh = 1; } elsif ($a =~ /[aeiou]$/) { $act = $AC_CLR; $tok = $TOK_V; $set = 0; $inh = 0; } elsif ($a =~ /'$/) { $act = $AC_CLR; $tok = $TOK_APOS; $set = 0; $inh = 0; } elsif ($a =~ /y$/) { $act = $AC_FRZ; $tok = $TOK_Y; $set = 0; $inh = 0; } elsif ($a =~ /^V[aeiou`]r$/) { $act = $AC_SFT; $tok = $TOK_R; $set = 1; $inh = 0; } elsif ($a =~ /^V[aeiou`]n$/) { $act = $AC_SFT; $tok = $TOK_N; $set = 1; $inh = 0; } elsif ($a =~ /^V[aeiou`][bcdfgjklmpstvxz]$/) { # First cons after run of vowel etc $act = $AC_SFT; $tok = $TOK_C; $set = 1; $inh = 0; } elsif ($a =~ /^Vnr$/) { # nr specifically (for CVV/lujvo hyph checking) $act = $AC_SFT; $tok = $TOK_NR; $set = 0; $inh = 1; } elsif ($a =~ /^.(bb|cc|dd|ff|gg|jj|kk|ll|mm|nn|pp|rr|ss|tt|vv|xx|zz)$/) { # both the same $act = $AC_SFT; $tok = $TOK_CN; $set = 0; $inh = 1; } elsif ($a =~ /^.([bdgvjz][ptkfcsx])$/) { # voiced/unvoiced $act = $AC_SFT; $tok = $TOK_CN; $set = 0; $inh = 1; } elsif ($a =~ /^.([ptkfcsx][bdgvjz])$/) { # unvoiced/voiced $act = $AC_SFT; $tok = $TOK_CN; $set = 0; $inh = 1; } elsif ($a =~ /^.([cjsz]{2})$/) { # not both from this set $act = $AC_SFT; $tok = $TOK_CN; $set = 0; $inh = 1; } elsif ($a =~ /^n(dj|dz|tc|ts)$/) { # specific forbidden triples $act = $AC_SFT; $tok = $TOK_BT; $set = 0; $inh = 1; } elsif ($a =~ /^.(cx|kx|xc|xk|mz)$/) { # specific forbidden pairs $act = $AC_SFT; $tok = $TOK_CN; $set = 0; $inh = 1; } elsif ($a =~ /^.(pl|pr|fl|fr|bl|br|vl|vr|cp|cf|ct|ck|cm|cn|cl|cr|jb|jv|jd|jg|jm|sp|sf|st|sk|sm|sn|sl|sr|zb|zv|zd|zg|zm|tc|tr|ts|kl|kr|dj|dr|dz|gl|gr|ml|mr|xl|xr)$/) { # specific initial pairs $act = $AC_SFT; if ($a =~ /..[lmnr]/) { $tok = $TOK_CSI; } else { $tok = $TOK_CI; } $set = 0; $inh = 1; } elsif ($a =~ /[bcdfgjklmnprstvxz]{2}$/) { $act = $AC_SFT; if ($a =~ /..[lmnr]/) { $tok = $TOK_CS; } else { $tok = $TOK_CP; } $set = 0; $inh = 1; } else { $act = $AC_CLR; $tok = $TOK_UNK; $set = 0; $inh = 0; } $te = $tok + ($act << 4) + ($set << 6) + ($inh << 7); $ent = ($i << 10) + ($s << 5) + $g; $table[$ent] = $te; print "," if ($n > 0); print "\n " if ($n%8 == 0); print " " if ($n%8 != 0); $n++; printf "0x%02x", $te; printf STDERR "i=%d s=%02x (%c) g=%02x (%c) act=%d tok=%d set=%d inh=%d\n", $i, $s, $s+96, $g, $g+96, $act, $tok, $set, $inh; } } } print "};\n"; jbofihe-0.38/mk_vfetab.pl100644 765 764 2726 7350750740 14413 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/mk_vfetab.pl,v 1.7 2001/09/02 21:21:48 richard Exp $ # Create tables for the second front-end stage of the morphology algorithm. # This stage is concerned with tracking the validity of vowel clusters, # including whether a comma appears between the vowels. $VTOK_V = 1; # must agree with coding for V in consonant FSM $VTOK_Y = 3; # must agree with coding for y in consonant FSM $VTOK_VV = 16; # ai/au/ei/oi valid anywhere $VTOK_VX = 17; # [iu][aeiou] - vowel extended $VTOK_VO = 18; # [aeiou][aeiou] less the 14 patterns above $VTOK_VY = 19; # combinations involving y where valid [only in cmene] $VTOK_YY = 20; # two copies of y adjacent with no separation (only in hesitation string) $VTOK_UNK = 0; # Note, C encodes all consonants + apostrophe @syms = qw(, C y a e i o u); $n = 0; print "static unsigned char vcheck[] = {"; for $i (0 .. 7) { for $j (0 .. 7) { for $k (0 .. 7) { $x = $syms[$i].$syms[$j].$syms[$k]; if ($x =~ /..,/) { $r = $VTOK_UNK; } elsif ($x =~ /.(ai|au|ei|oi)/) { $r = $VTOK_VV; } elsif ($x =~ /.[iu][aeiou]/) { $r = $VTOK_VX; } elsif ($x =~ /.[aeiou][aeiou]/) { $r = $VTOK_VO; } elsif ($x =~ /.[iu]y/) { $r = $VTOK_VY; } elsif ($x =~ /.Cy/) { $r = $VTOK_Y; } elsif ($x =~ /[Cy]yy/) { $r = $VTOK_YY; } elsif ($x =~ /.C[aeiou]/) { $r = $VTOK_V; } else { $r = $VTOK_UNK; } if ($n > 0) { print ","; } if ($n%8==0) { print "\n "; } $n++; printf "%2d", $r; } } } print "};\n\n"; jbofihe-0.38/mkdict.pl100644 765 764 3600 7350750740 13720 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/mkdict.pl,v 1.1 2001/01/11 21:34:14 richard Exp $ # Script to build dictionary compiler inputs from gismu and cmavo files. # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # open (IN, ") { chomp; $gis = substr($_,0,6); $gis =~ s/[ \t]+$//o; $eng = substr($_,19,20); $eng =~ s/([^ ])[ ]*$/$1/; print $gis.":".$eng."\n"; $raf = substr($_, 6, 12); $raf =~ s/[ \t]+/ /og; $raf =~ s/^ //o; $raf =~ s/ $//o; @raf = split / /, $raf; for $r (@raf) { print "%".$r.":".$eng."\n"; print "@".$r.":".$gis."\n"; } if (length($gis) == 5) { $raf4 = substr($gis,0,4); print "%".$raf4.":".$eng."\n"; print "@".$raf4.":".$gis."\n"; } } close (IN); open (IN, ") { chomp; $cma = substr($_,0,10); $cma =~ s/[ \t]+$//o; $cma =~ s/^[ \t]+//o; $cma =~ s/^\.//; $sma = substr($_,10,6); $sma =~ s/[ \t]+$//o; $sma =~ s/^[ \t]+//o; $sma =~ s/^\.//; $eng = substr($_,20,40); $eng =~ s/[ \t]+$//o; print $cma.":".$eng."\n"; print "+".$cma.":".$sma."\n"; } close(IN); jbofihe-0.38/morf_dfa.h100644 765 764 3517 7350750740 14045 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/morf_dfa.h,v 1.2 2001/07/29 21:56:35 richard Exp $ Header file for interface between morf.c and built file morf_dfa.c ***************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #ifndef MORF_DFA_H #define MORF_DFA_H enum raw_category {/*{{{*/ R_UNKNOWN, R_CMAVOS, R_CMAVOS_END_CY, R_GISMU_0, R_GISMU_1, R_LUJVO_0, R_LUJVO_1, R_CULTURAL_LUJVO_0, R_CULTURAL_LUJVO_1, R_STAGE3_0, R_STAGE3_1, R_STAGE3_1_CVC, R_X_STAGE3_0, R_X_STAGE3_0_CVC, R_X_STAGE3_1, R_X_STAGE3_1_CVC, R_STAGE4_0, R_STAGE4_1, R_CMENE, R_BAD_TOSMABRU, R_CULTURAL_BAD_TOSMABRU, R_BAD_SLINKUI }; /*}}}*/ enum state_attribute {/*{{{*/ AT_UNKNOWN, /* nothing-to-do option */ AT_S3_3, /* after hyphen triplet for short-rafsi stage 3 */ AT_S3_4, /* after hyphen triplet for long-rafsi stage 3 */ AT_XS3_3, /* after hyphen triplet for short-rafsi extended stage 3 */ AT_XS3_4, /* after hyphen triplet for long-rafsi extended stage 3 */ }; /*}}}*/ extern enum state_attribute morf_attribute[]; extern enum raw_category morf_exitval[]; extern int morf_next_state(int, int); #endif /* MORF_DFA_H */ jbofihe-0.38/morf.c100644 765 764 53374 7350750740 13254 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/morf.c,v 1.30 2001/09/02 21:21:48 richard Exp $ Carry out the morphology functions (hence the name) - take consecutive strings of non-whitespace from the input stream and determine what kind of word has been read, plus how many cmavo need to be detached from the front of it. This code relies on some scanning tables built by separate perl scripts. It can be compiled with -DTEST_MORF to provide a standalone testbench for the scanners. If invoked with -v (i.e. verbose) this testbench will show extra information about the internal scanner states. The input to this testbench is provided on stdin, one word per line. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifdef TEST_MORF #include #include #include #include "canonluj.h" static int verbose=0; static int expand_lujvo = 0; /* Show decomposition of lujvo */ static int allow_cultural_rafsi = 1; /* In testbench mode, always allow */ #else #include /* When linked into the main program, get this option from the command line in main.c */ extern int allow_cultural_rafsi; #endif #include "morf.h" #include "morf_dfa.h" #include "bccheck.h" enum processed_category {/*{{{*/ W_UNKNOWN, W_CMAVOS, W_CMAVOS_END_CY, W_GISMU, W_LUJVO, W_CULTURAL_LUJVO, W_FUIVLA3, W_FUIVLA3_CVC, W_FUIVLA3X, W_FUIVLA3X_CVC, W_FUIVLA4, W_CMENE, W_BAD_TOSMABRU, W_CULTURAL_BAD_TOSMABRU, W_BAD_SLINKUI, W_BIZARRE }; /*}}}*/ /* Include table for turning the letter stream into meta-classes (consonant, * vowel, permissible pair etc). These 'meta-classes' are the tokens used by * the DFA. These tables are built my mk_fetab.pl */ #include "morf_lex.c" /* Include file for checking vowel pairs/clusters within the input stream. */ #include "morfvlex.c" static unsigned char s2l[32] = /*{{{*/ /* Map N->1, R->2, other C->3, else ->0. Used to trim down the last-but-one * letter, which is saved to allow the front-end to spot illegal triples and * type III fu'ivla hyphen patterns. */ { 0, 0, 3, 3, 3, 0, 3, 3, 0, 0, 3, 3, 3, 3, 1, 0, 3, 0, 2, 3, 3, 0, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0 }; /*}}}*/ #if defined(TEST_MORF) static char *toknam[] =/*{{{*/ /* Token names for -v mode */ { "UNK", "V", "APOS", "Y", "R", "N", "C", "NR", "CI", "CSI", "CP", "CS", "CN", "H", "HS", "BT", "VV", "VX", "VO", "VY", "YY" }; /*}}}*/ static char *actnam[] =/*{{{*/ /* Front end state machine actions, printable for -v mode */ { "CLR", "SFT", "FRZ" }; /*}}}*/ static char charnames[32] = {/*{{{*/ '?', 'a', 'b', 'c', 'd', 'e', 'f', 'g', '?', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', '?', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '?', '?', '?', '\'', '?' }; /*}}}*/ static char vowelnames[8] = {/*{{{*/ ',', 'C', 'y', 'a', 'e', 'i', 'o', 'u' }; /*}}}*/ static char Lname[4] = {/*{{{*/ 'V', 'n', 'r', 'C' }; /*}}}*/ #endif static unsigned char mapchar[256] =/*{{{*/ /* Map the ASCII set to the range 0..31 (mostly by masking high order bits off the letters, except the apostrophe is given the value 30) */ { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1e, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }; /*}}}*/ static unsigned char vmapchar[256] = {/*{{{*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* invalid -> consonant code */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* (reject by main FSM) */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, /* apos. -> 1=cons */ 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, /* comma -> 0 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, /* aeiou->34567 */ 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, /* cons ->1 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, 0x01, 0x01, /* y -> 2 */ 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, /* aeiou->34567 */ 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, /* cons ->1 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, 0x01, 0x01, /* y -> 2 */ 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }; /*}}}*/ /*********************************************************************/ MorfType morf_scan(char *s, char ***buf_end, struct morf_xtra *arg_xtra)/*{{{*/ /* The main scanning routine. 's' is the string to be scanned. buf_end is a pointer to a table of pointers to characters (i.e. pass by reference so we can pass a result back.) This table is filled in with the positions in 's' where the prefix cmavo start. */ { unsigned int L, S, G; unsigned int vsm = 0111; /* 3 consonants as starting state */ char *p, c; char **start, **pstart; char *cstart[256], **pcstart; /* Used for holding start of Cy structures */ int ent, tent, tok, set, inhibit; int state, next_state; int inhibited = 0, initial = 1; int decrement = 0; /* Remember previous non-comma positions */ char *p_1 = NULL, *p_2 = NULL; /* Remember position for stage-3 hyphen after CVC or long rafsi prefix */ char *hyph3 = NULL; char *hyph4 = NULL; enum raw_category exival; enum processed_category result; int had_uppercase=0; int letter_uppercase; MorfType ext_result; /* Gather info in a local copy, in case client doesn't want it. * (We have to gather it anyway, to support the outputs in test * mode.). */ struct morf_xtra xtra; #ifdef TEST_MORF int split_cmene = 0; #endif typedef enum { ACT_CLEAR=0, ACT_SHIFT=1, ACT_FREEZE=2 } Action; Action act, last_act; start = *buf_end; pstart = start; pcstart = cstart; L = S = 0; state = 0; last_act = ACT_CLEAR; #ifdef TEST_MORF if (verbose) { printf ("Chr L S G vsm tok act set inh state'\n"); } #endif p = s; /*{{{ Main per-character loop */ while (*p) { c = *p; /* If char is a comma, just advance now. */ if (c == ',') { p++; continue; } /* Commas are now discarded, even for checking vowel cluster validity */ vsm = ((vsm & 077) << 3) | vmapchar[(unsigned char) c & 0xff]; G = (unsigned int) mapchar[(unsigned char) c & 0xff]; letter_uppercase = (G >> 7) & 1; had_uppercase |= letter_uppercase; G &= 0x1f; ent = (L<<10) + (S<<5) + G; tent = inact[ent]; tok = (tent & 0xf); act = (Action)((tent >> 4) & 0x3); set = !!(tent & 0x40); inhibit = !!(tent & 0x80); /* Logic to remember position of each vowel->consonant transition + start * of string. These positions will be the start of the prefixed cmavo or * of the brivla. In the case of gismu/lujvo/fuivla starting with V+ or * CV+, a different match is recognized by the DFA so that the table can * have one entry purged from the RHS (i.e. get rid of the spurious pointer * to the cluster within the brivla.) */ inhibited |= inhibit; if ((set && !inhibited) || initial) { *pstart++ = p; } /* If tok is V or Y, need to adapt it based on the vowel cluster checker */ if (tok == 1) { /* vowel recognized by main FSM */ tok = vcheck[vsm]; } else if (tok == 3) { /* y recognized by main FSM */ tok = vcheck[vsm]; } else { /* Just check that there hasn't been a doubled comma. (Doubled commas followed by vowels or y will be checked by VSM LUT reporting an unknown token in that case.) */ if (!(vsm & 0770)) { tok = 0; /* unknown token, will jam the automaton */ } else { /* pass tok through from consonant front-end FSM */ } } if ((last_act == ACT_FREEZE) && (act == ACT_SHIFT)) { /* This happens if the input has a y-to-consonant transition. Such * positions may be the start of Cy cmavo, if the whole string ends in a * sequence of Cy cmavo. */ *pcstart++ = p; } /*{{{ Run attribute code*/ switch (morf_attribute[state]) { case AT_UNKNOWN: break; case AT_S3_3: case AT_XS3_3: hyph3 = p_2; break; case AT_S3_4: case AT_XS3_4: hyph4 = p_2; break; } /*}}}*/ p_2 = p_1; p_1 = p; p++; initial = 0; /* next_state function from file built by dfa builder */ next_state = morf_next_state(state, tok); #ifdef TEST_MORF if (verbose) { printf ("%c %01x(%c) %02x(%c) %02x(%c) %c%c%c %-4s %-3s %d %d %4d\n", c, L, Lname[L], S, charnames[S], G, charnames[G], vowelnames[(vsm>>6)&7], vowelnames[(vsm>>3)&7], vowelnames[vsm&7], toknam[tok], actnam[act], set, inhibit, next_state); } #endif /*{{{ Run action on main (consonant) shift reg. */ switch (act) { case ACT_CLEAR: L = S = 0; break; case ACT_SHIFT: L = s2l[S]; S = G; break; case ACT_FREEZE: break; /* freeze S (to do pair check after 'y') */ default: abort(); } last_act = act; /*}}}*/ state = next_state; if (state < 0) break; /* syntax error */ } /*}}}*/ if ((state < 0) || (morf_exitval[state] == R_UNKNOWN)) { result = W_UNKNOWN; ext_result = MT_BOGUS; decrement = 0; } else { exival = morf_exitval[state]; /*{{{ Extract word-type and CV/CC start flag */ switch (exival) { case R_CMAVOS: result = W_CMAVOS; decrement = 0; break; case R_CMAVOS_END_CY: result = W_CMAVOS_END_CY; decrement = 0; break; case R_GISMU_0: result = W_GISMU; decrement = 0; break; case R_GISMU_1: result = W_GISMU; decrement = 1; break; case R_LUJVO_0: result = W_LUJVO; decrement = 0; break; case R_LUJVO_1: result = W_LUJVO; decrement = 1; break; case R_CULTURAL_LUJVO_0: result = W_CULTURAL_LUJVO; decrement = 0; break; case R_CULTURAL_LUJVO_1: result = W_CULTURAL_LUJVO; decrement = 1; break; case R_STAGE3_0: result = W_FUIVLA3; decrement = 0; break; case R_STAGE3_1: result = W_FUIVLA3; decrement = 1; break; case R_STAGE3_1_CVC: result = W_FUIVLA3_CVC; decrement = 1; break; case R_X_STAGE3_0: result = W_FUIVLA3X; decrement = 0; break; case R_X_STAGE3_0_CVC: result = W_FUIVLA3X_CVC; decrement = 0; break; case R_X_STAGE3_1: result = W_FUIVLA3X; decrement = 1; break; case R_X_STAGE3_1_CVC: result = W_FUIVLA3X_CVC; decrement = 1; break; case R_STAGE4_0: result = W_FUIVLA4; decrement = 0; break; case R_STAGE4_1: result = W_FUIVLA4; decrement = 1; break; case R_CMENE: result = W_CMENE; decrement = 0; break; case R_BAD_TOSMABRU: result = W_BAD_TOSMABRU; decrement = 1; break; case R_CULTURAL_BAD_TOSMABRU: result = W_CULTURAL_BAD_TOSMABRU; decrement = 1; break; case R_BAD_SLINKUI: result = W_BAD_SLINKUI; decrement = 0; break; case R_UNKNOWN: default: result = W_UNKNOWN; decrement = 0; break; } /*}}}*/ /*{{{ Map to external word type / uppercase validity test */ switch (result) { case W_CMAVOS_END_CY: /* Add start of trailing Cy cmavo to list of word start points */ { char **x; x = cstart; while (x < pcstart) { *pstart++ = *x++; } } ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_CMAVOS; break; case W_CMAVOS: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_CMAVOS; break; case W_GISMU: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_GISMU; if (decrement) pstart--; break; case W_LUJVO: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_LUJVO; if (decrement) pstart--; break; case W_CULTURAL_LUJVO: ext_result = had_uppercase ? MT_BAD_UPPERCASE : allow_cultural_rafsi ? MT_LUJVO : MT_BOGUS ; if (decrement) pstart--; break; case W_FUIVLA3: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_FUIVLA3; if (decrement) pstart--; xtra.u.stage_3.hyph = hyph4; break; case W_FUIVLA3_CVC: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_FUIVLA3_CVC; if (decrement) pstart--; xtra.u.stage_3.hyph = hyph3; break; case W_FUIVLA3X: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_FUIVLA3X; if (decrement) pstart--; xtra.u.stage_3.hyph = hyph4; break; case W_FUIVLA3X_CVC: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_FUIVLA3X_CVC; if (decrement) pstart--; xtra.u.stage_3.hyph = hyph3; break; case W_FUIVLA4: ext_result = had_uppercase ? MT_BAD_UPPERCASE : MT_FUIVLA4; if (decrement) pstart--; break; case W_BAD_TOSMABRU: case W_CULTURAL_BAD_TOSMABRU: case W_BAD_SLINKUI: /* Don't care about uppercase/lowercase status */ ext_result = MT_BOGUS; if (decrement) pstart--; break; case W_CMENE: /* Cmene are allowed to have uppercase letters in them. */ ext_result = MT_CMENE; pstart = start+1; xtra.u.cmene.is_bad = is_bad_cmene(s, &xtra.u.cmene.can_split, &xtra.u.cmene.ladoi, &xtra.u.cmene.tail); break; default: ext_result = MT_BOGUS; break; } /*}}}*/ } #ifdef TEST_MORF if ((state < 0) || (morf_exitval[state] == 0)) { printf("%-25s : UNMATCHED : %s\n", s, s); } else { char *a; char **x; printf("%-25s : ", s); if (verbose) printf("[EV=%2d] ", exival); /*{{{ Print word type */ switch (result) { case W_UNKNOWN: printf("Unrecognized"); break; case W_CMAVOS: printf("cmavo(s)"); break; case W_CMAVOS_END_CY: printf("cmavo(s)"); break; case W_GISMU: printf("gismu"); break; case W_LUJVO: printf("lujvo"); break; case W_CULTURAL_LUJVO: printf("lujvo (with cultural rafsi)"); break; case W_FUIVLA3: printf("fu'ivla (stage-3)"); break; case W_FUIVLA3_CVC: printf("fu'ivla (stage-3 short rafsi)"); break; case W_FUIVLA3X: printf("fu'ivla (multi-stage-3)"); break; case W_FUIVLA3X_CVC: printf("fu'ivla (multi-stage-3, final short rafsi)"); break; case W_FUIVLA4: printf("fu'ivla (stage-4)"); break; case W_CMENE: if (xtra.u.cmene.is_bad && xtra.u.cmene.can_split) { printf("bad cmene (breaks up)"); } else if (xtra.u.cmene.is_bad && !xtra.u.cmene.can_split) { printf("bad cmene (doesn't break up)"); } else if (!xtra.u.cmene.is_bad) { printf("cmene"); } split_cmene = xtra.u.cmene.is_bad && xtra.u.cmene.can_split; break; case W_BAD_TOSMABRU: printf("Bad lujvo (y hyphen not required)"); break; case W_CULTURAL_BAD_TOSMABRU: printf("Bad lujvo (y hyphen not required, with cultural rafsi)"); break; case W_BAD_SLINKUI: printf("Bad fu'ivla (fails slinku'i test)"); break; case W_BIZARRE: printf("Internal program bug"); break; } /*}}}*/ /*{{{ Print invalid uppercase msg*/ switch (result) { case W_UNKNOWN: case W_CMAVOS: case W_CMAVOS_END_CY: case W_GISMU: case W_LUJVO: case W_CULTURAL_LUJVO: case W_FUIVLA3: case W_FUIVLA3_CVC: case W_FUIVLA3X: case W_FUIVLA3X_CVC: case W_FUIVLA4: case W_BAD_TOSMABRU: case W_CULTURAL_BAD_TOSMABRU: case W_BAD_SLINKUI: if (had_uppercase) { printf(" (contains invalid uppercase)"); } break; case W_CMENE: case W_BIZARRE: /* Nothing to do */ break; } /*}}}*/ putchar(' '); putchar(':'); putchar(' '); /* {{{ Assert that attributes were picked up properly */ switch (result) { case W_FUIVLA3: case W_FUIVLA3X: assert(hyph4); break; case W_FUIVLA3_CVC: case W_FUIVLA3X_CVC: assert(hyph3); break; default: break; } /*}}}*/ /*{{{ Print original word with prefix cmavo split off */ for (a=s, x=start; *a; a++) { /* Print spaces to separate prefix cmavo */ if (x && (a == *x)) { x++; putchar(' '); if (x == pstart) x = NULL; } /*{{{ Insert pre-char separators */ switch (result) { case W_FUIVLA3: case W_FUIVLA3X: if (a == hyph4) putchar('/'); break; case W_FUIVLA3_CVC: case W_FUIVLA3X_CVC: if (a == hyph3) putchar('/'); break; case W_CMENE: if (split_cmene) { /* Show divisions between parts of the split, but omit the first * marker if la or doi occurs at the very start of the word. */ if (((a == xtra.u.cmene.ladoi) && (a != s)) || (a == xtra.u.cmene.tail)) { putchar ('+'); } } break; default: break; } /*}}}*/ /* Emit actual character */ putchar(*a); /*{{{ Insert post-char separators */ switch (result) { case W_FUIVLA3: case W_FUIVLA3X: if (a == hyph4) putchar('/'); break; case W_FUIVLA3_CVC: case W_FUIVLA3X_CVC: if (a == hyph3) putchar('/'); break; default: break; } /*}}}*/ } /*}}}*/ /*{{{ Show expansion of lujvo */ switch(result) { case W_LUJVO: if (expand_lujvo) { char *canon; canon = canon_lujvo(pstart[-1]); printf(" [%s]", canon); } break; default: break; } /*}}}*/ putchar('\n'); } #endif *buf_end = pstart - 1; /* Allow arg_xtra to be NULL, as the data isn't always needed */ if (arg_xtra) *arg_xtra = xtra; return ext_result; } /*}}}*/ #ifdef TEST_MORF int main (int argc, char **argv) {/*{{{*/ char buffer[128]; char *start[256], **pstart; char *word = NULL; while (++argv, --argc) { if (!strncmp(*argv, "-v", 2)) { verbose = 1; } else if (!strcmp(*argv, "-el")) { expand_lujvo = 1; } else if (!strncmp(*argv, "-", 1)) { fprintf(stderr, "Unrecognized command line argument '%s'\n", *argv); } else { word = *argv; } } if (word) { pstart = start; morf_scan(word, &pstart, NULL); } else { while (fgets(buffer, sizeof(buffer), stdin)) { buffer[strlen(buffer)-1] = 0; if (buffer[0] == '#') continue; /* Allow comment lines in test source file */ pstart = start; morf_scan(buffer, &pstart, NULL); } } return 0; }/*}}}*/ #endif jbofihe-0.38/morf.h100644 765 764 3511 7350750740 13225 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/morf.h,v 1.7 2001/06/22 22:16:51 richard Exp $ Header file for morphology functions module. ***************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #ifndef MORF_H #define MORF_H /* Return type. Note that gismu/lujvo/fu'ivla are compressed together. This * could be exposed later if the rest of the main program has a use for the * information. */ typedef enum { MT_BOGUS, MT_GISMU, MT_LUJVO, MT_FUIVLA3, /* stage 3 */ MT_FUIVLA3_CVC, /* stage 3 starting with CVC rafsi */ MT_FUIVLA3X, /* stage-3-like with >1 rafsi before hyphen */ MT_FUIVLA3X_CVC, /* stage-3-like starting with CVC rafsi */ MT_FUIVLA4, /* stage 4 */ MT_CMAVOS, MT_CMENE, MT_BAD_UPPERCASE } MorfType; /* Structure for returning extra information about some of the * word types */ struct morf_xtra { union { struct { int is_bad; int can_split; char *ladoi; char *tail; } cmene; struct { char *hyph; } stage_3; } u; }; /* Prototypes for fns */ extern MorfType morf_scan(char *s, char ***buf_end, struct morf_xtra *); #endif /* MORF_H */ jbofihe-0.38/morf_nfa.in100644 765 764 75147 7350750740 14266 0ustar richardruser########################################################### # NFA definition file for matching Lojban morphology # # (process with nfa2dfa.pl to produce the DFA state/transition # and accept tables for use with a suitable parsing fn.) # This generates a scanner with the following functions # - recognizes type of word # - for gismu/lujvo/fu'ivla, provides enough info to work out where word # starts, i.e. how many cmavo are prefixed. (Equivalently, works out whether # the consonant cluster or the preceding single consonant is that start of # the word.) # - rigorously checks the word form for errors (bad clusters, y where not # required, bad hyphenation after initial CVV rafsi, bad vowel pairing etc) # # $Header: /cvs/src/jbofihe/morf_nfa.in,v 1.28 2001/09/02 21:21:48 richard Exp $ # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # # ########################################################### # Stuff to pass through verbatim to C output file %{ #include "morf_dfa.h" %} ########################################################### # Declare all symbols in same order as lexer (lexer returns (0 .. whatever) # when it recognizes the corresponding token) Tokens UNK V APOS Y R N C NR CI CSI CP CS CN H HS BT VV VX VO VY YY # Token meanings are as follows # UNK : Unknown character # V : vowel [aeiou] # APOS : ' # Y : y # R : r following vowel # N : n following vowel # C : consonant other than r or n after vowel # NR : r in the pair nr (or triple nyr) # CI : 2nd letter of permissible initial consonant pair # CSI : 2nd letter of permissible initial pair which is syllabic (l,m,n,r) # CP : 2nd letter of permissible consonant pair (except nr) # CS : 2nd letter of permissible pair which is syllabic (l,m,n,r) # CN : 2nd letter of impermissible consonant pair # H : rnC,CrC (hyphen occuring in stage III fu'ivla) # HS : rln,nlr,Cnr (H with syllabic 3rd letter) # BT : 3rd letter of one of the banned triples (ntc,nts,ndj,ndz) # VV : 2nd vowel of ai|au|ei|oi (allowed in any word type), or 2nd vowel # of v,v pattern. [Comma treated the same as apostrophe between vowels] # VX : (extended) 2nd vowel of [iu][aeiou] (allowed as single VV cmavo, # and in fu'ivla & cmene) # VO : other vowel pairs (aa,ae,ao,ea,ee,eo,eu,oa,oe,oo,ou) # VY : vowel pair forms involving y, maybe with a comma between (valid only # in cmene) # YY : 2 copies of the letter y adjacent to each other with no separation # Notes # - pairs & triples may have y within them. This allows this 'grammar' to # specify the checks for whether the y is actually required or not. # - NR is separated out from CP (and R, N separated from C) to allow checking # the validity/necessity of the hyphenation structure after an initial CVV # rafsi in a lujvo. # - At the moment, the NFA contains some dead paths, mostly concerned with # saying CI can follow N or R (which can never happen). This is where # C|N|R is used to specify any single consonant after a vowel, and the next # letter may or may not be part of an initial cluster. It's too tedious to # optimise away all such cases. The net result is that the resuting DFA is # larger than it needs to be and has unreachable states in it. # - Support for the cultural rafsi (section 4.16 of the Reference Grammar) has # been made optional. To disable them, pass the file through 'grep -v # CULTURAL' first. # Prefix applied to the tables written out for inclusion into the C program. Prefix morf Abbrev CNR = C|N|R Abbrev LCI = CI|CSI Abbrev LCP = CI|CSI|CP|CS|NR Abbrev FVV = VV|VX|VO Abbrev FC = C|N|R Abbrev FCP = CI|CP|H Abbrev FCS = CSI|CS|HS|NR ########################################################### # Subcomponents for lujvo matching #{{{ BLOCK SYL1 BLOCK SYL1 STATE in CNR ; V ; APOS ; V -> ex_nr # Requires nr hyphen after or just final CCV CNR ; V ; VV -> ex_nr # Requires nr hyphen after or just final CCV C ; LCI ; V -> ex_cln # No special binding to next syl CNR ; V ; CNR -> ex_cvc # Starts CVC, may require tosmabru check CNR ; V ; CNR ; LCP -> ex_cvy # Ditto, starts CV C ; LCI ; V ; CNR -> ex_y # Requires y before next syl ENDBLOCK #}}} #{{{ BLOCK AFTER1 BLOCK AFTER1 # Glue coming between first syllable (i.e. rafsi) and what follows STATE in_nr R ; CP|CS -> to_lujvo1, to_after_nr_hyphen N ; NR -> to_lujvo1, to_after_nr_hyphen CNR -> to_final_ccv STATE in_cln CNR -> to_lujvo0, to_pair0 STATE in_y Y ; LCP|CN -> to_lujvo0, to_pair0 Y ; CP ; BT -> to_in_after_cc0 STATE in_cvy Y ; LCP|CN|HS|H|BT -> to_lujvo1, to_pair1 Y ; CP|H ; BT -> to_in_after_cc1 STATE in_cvc LCP -> to_lujvo1, to_pair1 Y ; CN -> to_lujvo1, to_pair1 Y ; LCI -> to_lujvo1t, to_pair1t, to_tosmabru Y ; CP ; BT -> to_in_after_cc1 ENDBLOCK #}}} #{{{ BLOCK SYL2 BLOCK SYL2 # Lujvo syllables (i.e. rafsi) 2 .. (N-1) STATE in V ; VV -> ex_cln V ; APOS ; V -> ex_cln LCI ; V -> ex_cln V ; CNR -> ex_cvc V ; CNR ; LCP -> ex_y LCI ; V ; CNR -> ex_y STATE in_after_cc # get here if last syl. ends in c, which when combined # with 1st & 2nd letters of this syl. forms a bad consonant triple V -> ex_cln # from ccv form V ; CNR -> ex_y # from ccvc form ENDBLOCK #}}} #{{{ BLOCK AFTER2 BLOCK AFTER2 # Linkage from rafsi 2->3, ..., (N-1)->N STATE in_cln CNR -> exit STATE in_cvc Y ; CN -> exit Y ; CP ; BT -> exit_after_cc LCP -> exit STATE in_y Y ; LCP|CN|HS|H|BT -> exit Y ; CP|H ; BT -> exit_after_cc ENDBLOCK #}}} #{{{ BLOCK SYLN BLOCK SYLN # Lujvo final syllable STATE in_main V ; APOS ; V -> exit # final CV'V V ; VV -> exit # final CVV LCI ; V -> exit # final CCV LCI ; V ; CNR ; V -> exit # final CCVCV V ; CNR ; LCP ; V -> exit # final CVCCV STATE in_after_nr_hyphen V ; APOS ; V -> exit # final CV'V V ; VV -> exit # final CVV LCI ; V ; CNR ; V -> exit # final CCVCV V ; CNR ; LCP ; V -> exit # final CVCCV STATE in_to_ccv LCI ; V -> exit # final CCV # Used to support bad triples with n at end of previous syllable STATE in_after_cc V -> exit # final CCV V ; CNR ; V -> exit # final CCVCV ENDBLOCK #}}} #{{{ BLOCK SYL2N BLOCK SYL2N # Everything from start of 2nd syllable (less initial consonant picked off in # AFTER1) through to end of lujvo. This is in a block because 3 instances are # made ; one to recognize lujvo which start with a cluster (lujvo_0), a second # to recognize those starting with CV.. (i.e. deferred cluster), and a third to # recognize the subset of the second where a y has been inserted after an # initial CVC to prevent a tosmabru failure. (For that third case, the # 'tosmabru' block scans the sequence that would have been the shorter lujvo to # check it's valid; if not, the 'y' was a bogus insertion.) s2 : SYL2 a2 : AFTER2 sn : SYLN STATE in -> s2.in STATE in_after_cc -> s2.in_after_cc, sn.in_after_cc # Bridge s2->a2 STATE s2.ex_cln -> a2.in_cln STATE s2.ex_cvc -> a2.in_cvc STATE s2.ex_y -> a2.in_y # Bind a2->s2 (loop or goto final syl.) STATE a2.exit -> s2.in, sn.in_main STATE a2.exit_after_cc -> s2.in_after_cc, sn.in_after_cc ENDBLOCK #}}} #{{{ BLOCK TOS_SYL1 BLOCK TOS_SYL1 # Match syllable 1 of what would be the shorter lujvo in a potential tosmabru # failure. STATE in V -> ex_cln V ; CNR -> ex_y ENDBLOCK #}}} #{{{ BLOCK TOS_AFTER1 BLOCK TOS_AFTER1 # Glue after 1st syllable of potential shorter lujvo (binds 1st syl. to 2nd) STATE in_cln CNR -> exit STATE in_y Y ; LCP|CN -> exit Y ; CP|CS ; BT -> exit_to_after_cc ENDBLOCK #}}} #{{{ BLOCK TOSMABRU BLOCK TOSMABRU # To check tail portion of word to see if it too is of lujvo # form. s1 : TOS_SYL1 a1 : TOS_AFTER1 tail : SYL2N STATE in -> s1.in STATE s1.ex_cln -> a1.in_cln STATE s1.ex_y -> a1.in_y STATE a1.exit -> tail.sn.in_main, tail.in STATE a1.exit_to_after_cc -> tail.in_after_cc STATE tail.sn.exit -> exit ENDBLOCK #}}} #{{{ BLOCK LUJVO_BODY BLOCK LUJVO_BODY # The complete NFA for matching a word of lujvo form. s1 : SYL1 a1 : AFTER1 t0 : SYL2N t1 : SYL2N t1t : SYL2N tos : TOSMABRU STATE in -> s1.in # Bridge s1->a1 STATE s1.ex_nr -> a1.in_nr STATE s1.ex_cln -> a1.in_cln STATE s1.ex_y -> a1.in_y STATE s1.ex_cvy -> a1.in_cvy STATE s1.ex_cvc -> a1.in_cvc # Bridge a1->t1.sn STATE a1.to_final_ccv -> t1.sn.in_to_ccv STATE a1.to_after_nr_hyphen -> t1.sn.in_after_nr_hyphen STATE a1.to_in_after_cc0 -> t0.in_after_cc STATE a1.to_in_after_cc1 -> t1.in_after_cc # Bridge a1 to final syllables for cases where a 2 rafsi lujvo is valid # this way STATE a1.to_pair0 -> t0.sn.in_main STATE a1.to_pair1 -> t1.sn.in_main STATE a1.to_pair1t -> t1t.sn.in_main # Bridge a1 to tosmabru STATE a1.to_tosmabru -> tos.in # Bridge a1->t0 STATE a1.to_lujvo0 -> t0.in # Bridge a1->t1 STATE a1.to_lujvo1 -> t1.in # Bridge a1->t1t STATE a1.to_lujvo1t -> t1t.in ENDBLOCK #}}} #{{{ BLOCK LUJVO BLOCK LUJVO # This block deals with recognition of 'normal' lujvo. body : LUJVO_BODY STATE in -> body.in # Set exit states on t0 STATE body.t0.sn.exit = TAG_LUJVO_0 # Set exit states on t1 STATE body.t1.sn.exit = TAG_LUJVO_1 # Set exit states on t1t STATE body.t1t.sn.exit = TAG_LUJVO_1T # Set exit status when potentially shorter word is of valid lujvo form # (e.g. the smabru in tosmabru) STATE body.tos.exit = TAG_LUJVO_TAIL_OK ENDBLOCK #}}} ########################################################### #{{{ BLOCK CULTURAL_BRIDGE BLOCK CULTURAL_BRIDGE # This blocks describes the extra NFA states that have to bridged on top of the # standard lujvo to get something that copes with cultural rafsi too. STATE in_before_c C -> in # No point using CNR, because N&R can't start initial pair STATE in LCI -> in_after_cc STATE in_after_cc V ; APOS ; V ; CNR -> exit V ; VV ; CNR -> exit ENDBLOCK #}}} ########################################################### #{{{ BLOCK CULTURAL_LUJVO BLOCK CULTURAL_LUJVO # Block to recognise lujvo which have 'cultural' rafsi in them. # Obviously this recognises all normal lujvo as well, because it will cope # with >=0 of the rafsi being cultural. That is not important, because # this case is 'set differenced' away in the priority logic at the end of # the file : if the word's a normal lujvo, it is never considered for # recognition as a cultural one. # The core lujvo - replicates the main lujvo matching block. body : LUJVO_BODY # The extra bits s1 : CULTURAL_BRIDGE tos_s1 : CULTURAL_BRIDGE t0 : CULTURAL_BRIDGE t1 : CULTURAL_BRIDGE t1t : CULTURAL_BRIDGE tos : CULTURAL_BRIDGE STATE in -> body.in ############## # Add bridging between states arising from cultural rafsi being present. STATE body.s1.in -> s1.in_before_c STATE s1.exit -> body.s1.ex_y STATE body.t0.s2.in -> t0.in STATE body.t0.s2.in_after_cc -> t0.in_after_cc STATE t0.exit -> body.t0.s2.ex_y STATE body.t1.s2.in -> t1.in STATE body.t1.s2.in_after_cc -> t1.in_after_cc STATE t1.exit -> body.t1.s2.ex_y STATE body.t1t.s2.in -> t1t.in STATE body.t1t.s2.in_after_cc -> t1t.in_after_cc STATE t1t.exit -> body.t1t.s2.ex_y STATE body.tos.tail.s2.in -> tos.in STATE body.tos.tail.s2.in_after_cc -> tos.in_after_cc STATE tos.exit -> body.tos.tail.s2.ex_y STATE body.tos.s1.in -> tos_s1.in_after_cc STATE tos_s1.exit -> body.tos.s1.ex_y ############## # Set exit states on t0 STATE body.t0.sn.exit = TAG_CULTURAL_LUJVO_0 # Set exit states on t1 STATE body.t1.sn.exit = TAG_CULTURAL_LUJVO_1 # Set exit states on t1t STATE body.t1t.sn.exit = TAG_CULTURAL_LUJVO_1T # Set exit status when potentially shorter word is of valid lujvo form # (e.g. the smabru in tosmabru) STATE body.tos.exit = TAG_CULTURAL_LUJVO_TAIL_OK ENDBLOCK #}}} ########################################################### #{{{ BLOCK LUJVO_NO_Y_BAD_VOWELS # The idea of this block is to pick out words that have lujvo consonant # structure, but which can contain invalid vowel pairs. These have to be # filtered out of the stage-IV fu'ivla set later on. Hence a big # simplification : don't care about lujvo forms with 'y' in. BLOCK LUJVO_NO_Y_BAD_VOWELS STATE c LCP ; V ; FVV -> v, exit LCP ; V ; APOS ; V -> v, exit LCP ; V ; CNR -> c LCP ; LCI ; V -> v, exit STATE v CNR ; V ; FVV -> v, exit CNR ; V ; APOS ; V -> v, exit CNR ; LCI ; V -> v, exit CNR ; V ; CNR -> c STATE cvv1 R ; LCP ; V ; FVV -> v, exit R ; LCP ; V ; APOS ; V -> v, exit R ; LCP ; V ; CNR -> c R ; LCP ; LCI ; V -> v, exit N ; NR ; V ; FVV -> v, exit N ; NR ; V ; APOS ; V -> v, exit N ; NR ; V ; CNR -> c STATE exit = TAG_LUJVO_NO_Y_BAD_VOWELS STATE in CNR ; V ; FVV -> cvv1 CNR ; V ; APOS ; V -> cvv1 CNR ; LCI ; V -> v CNR ; V ; CNR -> c CNR ; V ; FVV ; CNR ; LCI ; V -> exit CNR ; V ; APOS ; V ; CNR ; LCI ; V -> exit ENDBLOCK #}}} ########################################################### #{{{ BLOCK CMAVOSEQ BLOCK CMAVOSEQ # Recognize a sequence of cmavo. There are two exit cases : first is a # sequence of 'normal' cmavo; this can potentially be prefixed onto a # gismu, lujvo or fu'ivla. The 2nd may start with some 'normal' cmavo, but # ends with one or more cmavo of the Cy form. This has to occur at the end # of the word. STATE in V -> m2, mv, in1 CNR -> main, cy1 Y -> y STATE in1 VX -> in2 STATE in2 -> exit_prefixable CNR -> main STATE main V -> m2, mv STATE mv VV -> m2, mv STATE m2 CNR -> main, cy1 APOS -> main -> exit_prefixable STATE cy1 Y -> cy2 STATE cy2 -> exit_standalone CI|CSI|CP|CS|CN|NR|H|HS|BT -> cy1 STATE y YY -> yy -> exit_standalone APOS -> ya STATE yy YY -> yy -> exit_standalone STATE ya Y -> exit_standalone STATE exit_prefixable = TAG_CMAVOS STATE exit_standalone = TAG_CMAVOS_END_CY ENDBLOCK #}}} #{{{ BLOCK GISMU BLOCK GISMU # Recognize a gismu. The two cases CVC/CV and CCVCV get different exit # statuses; this allows the scanner to back up one potential prefix cmavo in # the CVC/CV case. (See how this is much simpler than the lujvo matcher!) STATE in C ; LCI ; V ; CNR ; V = TAG_GISMU_0 CNR ; V ; CNR ; LCP ; V = TAG_GISMU_1 ENDBLOCK #}}} ########################################################### #{{{ BLOCK SLINKUI BLOCK SLINKUI # Recognize a slinku'i # # This is basically like recognizing a lujvo but with a much reduced state # topology, because the letter 'y' can't occur anywhere. So the final rafsi # could be any of the valid forms, however, all earlier ones are restricted to # CVV, CVC or CCV. # For the first syllable, we jump in as though we've already recognized CV. # Although the potential lujvo is always going to start CV, we distinguish the # cases based on whether it's fu'ivla_0 or fu'ivla_1 that's going to be # squashed by a match, to make sure the fu'ivla NFA and slinku'i NFA are # treating the same length word tail as the match string. # SYL2N is a superset of what's needed, because it allows y's. We'll never # check for slinkui unless we find it's a fu'ivla so this won't cause false # matches. Ideally, a custom SYL2N block is required, however using the # existing lujvo one at least gives code commonality so is easier to # maintain. It probably also makes the DFA smaller, because it will keep # more states common with the lujvo NFA. t0 : SYL2N STATE in_after_c # First syl is CVC # Link to final syl # CVC + CC... or CVC + CV... # Must be valid pair across transition, no y allowed # Initial C => fu'ivla has init. cons. cluster, so fu'ivla_0 # will match if anything. Hence need SLINKUI_0 result LCP -> t0.sn.in_main, t0.in STATE t0.sn.exit = TAG_SLINKUI_0 ENDBLOCK #}}} ########################################################### # Fu'ivla matching blocks (including syllabic consonant rules) #{{{ BLOCK FV_VOWELS BLOCK FV_VOWELS # This describes a valid sequence of vowels within a fu'ivla STATE in V -> ex_single V ; FVV -> ex_single V ; FVV ; FVV -> main V ; APOS ; V -> main V ; FVV ; APOS ; V -> main STATE main APOS ; V -> main FVV -> main -> ex_multi ENDBLOCK #}}} #{{{ BLOCK FV_INITIAL_CLUSTER BLOCK FV_INITIAL_CLUSTER STATE in C ; CI -> exit C ; CSI -> exit C ; CI ; CI -> exit C ; CI ; CSI -> exit C ; CI ; CSI ; CSI -> exit C ; CI ; CI ; CSI ; CSI -> exit ENDBLOCK #}}} #{{{ BLOCK FV_INTERNAL_CONS_GROUP BLOCK FV_INTERNAL_CONS_GROUP STATE in FC -> c1 STATE c1 FCS -> cs FCP -> c2 -> exit STATE c2 FCS -> cs FCP -> c3 -> exit STATE c3 FCS ; FCS -> cs FCS ; FCP -> c1 -> exit STATE cs FCS -> cs FCP -> c1 -> exit STATE in_req_clus FC ; FCS -> cs FC ; FCP -> c2 # Coming in after seeing a stage 3 hyphenation triple # ending in a non-syllabic STATE in_after_c -> c1 # Coming in after seeing a stage 3 hyphenation triple # ending in a syllabic STATE in_after_s -> cs ENDBLOCK #}}} #{{{ BLOCK FUIVLA_START_V BLOCK FUIVLA_START_V # fu'ivla starting with up to 3 vowels, maybe with apostrophes # between them, then a cluster. cons : FV_INTERNAL_CONS_GROUP later_v : FV_VOWELS STATE in V -> v1 STATE v1 FVV -> v2 APOS ; V -> v2 -> cons.in_req_clus STATE v2 FVV -> v3 APOS ; V -> v3 -> cons.in_req_clus STATE v3 -> cons.in_req_clus STATE cons.exit -> later_v.in STATE later_v.ex_single -> exit, cons.in STATE later_v.ex_multi -> exit, cons.in ENDBLOCK #}}} ########################################################### #{{{ BLOCK FUIVLA_START_CV BLOCK FUIVLA_START_CV # fu'ivla starting with a single consonant and up to 2 # vowels, maybe with apostrophes between, then a cluster. cons : FV_INTERNAL_CONS_GROUP later_v : FV_VOWELS STATE in FC -> c STATE c V -> v1 STATE v1 FVV -> v2 APOS ; V -> v2 -> cons.in_req_clus STATE v2 -> cons.in_req_clus STATE cons.exit -> later_v.in STATE later_v.ex_single -> exit, cons.in STATE later_v.ex_multi -> exit, cons.in ENDBLOCK #}}} #{{{ BLOCK FUIVLA_START_CC BLOCK FUIVLA_START_CC init_cc : FV_INITIAL_CLUSTER early_v : FV_VOWELS later_c : FV_INTERNAL_CONS_GROUP later_v : FV_VOWELS STATE in FC -> goto_slinkui -> init_cc.in STATE init_cc.exit -> early_v.in STATE early_v.ex_multi -> exit, later_c.in STATE early_v.ex_single -> later_c.in STATE later_c.exit -> later_v.in STATE later_v.ex_multi -> exit, later_c.in STATE later_v.ex_single -> exit, later_c.in ENDBLOCK #}}} #{{{ BLOCK STAGE3_TAIL BLOCK STAGE3_TAIL later_c : FV_INTERNAL_CONS_GROUP later_v : FV_VOWELS STATE in -> before_hyph # Central letter of hyphen (l,n or r) is always syllabic STATE before_hyph CSI|CS|HS|NR -> after_hyph STATE after_hyph H -> goto_c HS -> goto_s STATE goto_c -> later_c.in_after_c STATE goto_s -> later_c.in_after_s STATE later_c.exit -> later_v.in STATE later_v.ex_multi -> exit, later_c.in STATE later_v.ex_single -> exit, later_c.in ENDBLOCK #}}} #{{{ BLOCK STAGE3_SHORT BLOCK STAGE3_SHORT # Recognize a stage-3 fu'ivla starting CVC tail : STAGE3_TAIL STATE in CNR ; V ; CNR -> tail.in STATE tail.goto_c (AT_S3_3) STATE tail.goto_s (AT_S3_3) STATE tail.exit -> exit ENDBLOCK #}}} #{{{ BLOCK STAGE3_LONG BLOCK STAGE3_LONG # Recognize a stage-3 fu'ivla starting CVCC or CCVC tail : STAGE3_TAIL STATE in C ; LCI ; V ; CNR -> tail.in CNR ; V ; CNR ; LCP -> tail.in STATE tail.goto_c (AT_S3_4) STATE tail.goto_s (AT_S3_4) STATE tail.exit -> exit ENDBLOCK #}}} ########################################################### # Recognize an "extended" stage-3, i.e. one with multiple # rafsi prior to the hyphen. #{{{ BLOCK X_STAGE3_CC_HEAD BLOCK X_STAGE3_CC_HEAD STATE in CNR ; LCI ; V ; CNR -> exit ENDBLOCK #}}} #{{{ BLOCK X_STAGE3_CV_HEAD BLOCK X_STAGE3_CV_HEAD STATE in CNR ; V ; APOS ; V -> after_cvv CNR ; V ; VV -> after_cvv CNR ; V ; CNR -> after_cvc STATE after_cvv R ; CP | CS -> exit N ; NR -> exit STATE after_cvc CP|CS|NR -> exit ENDBLOCK #}}} #{{{ BLOCK X_STAGE3_OTHER_RAFSI BLOCK X_STAGE3_OTHER_RAFSI STATE in LCI ; V ; CNR -> in V ; VV ; CNR -> in V ; CNR ; LCP -> in V ; CNR -> exit3 LCI ; V ; CNR -> exit4 V ; CNR ; LCP -> exit4 ENDBLOCK #}}} #{{{ BLOCK X_STAGE3 BLOCK X_STAGE3 cc_head : X_STAGE3_CC_HEAD cv_head : X_STAGE3_CV_HEAD other_rafsi : X_STAGE3_OTHER_RAFSI short_tail : STAGE3_TAIL long_tail : STAGE3_TAIL STATE in -> cc_head.in, cv_head.in STATE cc_head.exit -> other_rafsi.in STATE cv_head.exit -> other_rafsi.in STATE other_rafsi.exit3 -> short_tail.in STATE other_rafsi.exit4 -> long_tail.in STATE short_tail.exit = TAG_X_STAGE3_CVC STATE long_tail.exit = TAG_X_STAGE3_LONG # Add attributes for grabbing hyphen position STATE short_tail.goto_c (AT_XS3_3) STATE short_tail.goto_s (AT_XS3_3) STATE long_tail.goto_c (AT_XS3_4) STATE long_tail.goto_s (AT_XS3_4) ENDBLOCK #}}} ########################################################### #{{{ BLOCK FUIVLA BLOCK FUIVLA # Recognize a fuivla start_cc : FUIVLA_START_CC start_cv : FUIVLA_START_CV start_v : FUIVLA_START_V slinkui : SLINKUI stage3_short : STAGE3_SHORT stage3_long : STAGE3_LONG xstage3 : X_STAGE3 STATE in_no_prefix -> start_cc.in, start_cv.in, start_v.in, stage3_short.in, stage3_long.in, xstage3.in STATE in_prefixed -> start_cc.in, start_cv.in, stage3_short.in, stage3_long.in, xstage3.in STATE start_cc.goto_slinkui -> slinkui.in_after_c STATE start_cc.exit = TAG_FUIVLA_0 STATE start_cv.exit = TAG_FUIVLA_1 STATE start_v.exit = TAG_FUIVLA_1 STATE stage3_short.exit = TAG_STAGE3_CVC STATE stage3_long.exit = TAG_STAGE3_LONG ENDBLOCK #}}} ########################################################### #{{{ BLOCK CMENE BLOCK CMENE # Recognize a cmene. Has to end with consonant, and y is treated like a vowel. # Take care with just a y occurring between consonants; the front end returns # consonant pair tokens in this case (only real vowels clear the front-end # state machine); that behaviour is needed so that when ..CyC.. occurs in # lujvo, the lujvo matching NFA can check whether the consonant cluster was # such as to require the y. (Extra y's are illegal if not necessary.) Checks # for la, doi etc within the word are done later. It's too hard to do those # checks and word splits in here without conflicing with the processing of # lujvo etc. # Note, uppercase validation is also separate. The front end tracks whether an # uppercase letter has been seen, then case-folds the letter. At the end the # condition (had_uppercase & !cmene) implies a bad word. STATE in CNR -> c V -> v Y ; CNR -> c STATE c V -> v Y -> y LCP|HS|H -> c -> exit STATE v FVV |VY -> v CNR -> c APOS -> a STATE a V|Y -> v STATE y APOS -> a VY -> v YY -> y LCP|HS|H|CN|BT -> c CP ; BT -> c # deal with nytc, nyts, nydj, nydz STATE exit = TAG_CMENE ENDBLOCK #}}} #{{{ BLOCK WORD BLOCK WORD # Top level NFA to recognize a word. gismu : GISMU lujvo : LUJVO cultural_lujvo : CULTURAL_LUJVO lujvo_no_y_bad_vowels : LUJVO_NO_Y_BAD_VOWELS cms : CMAVOSEQ cmene : CMENE fuivla : FUIVLA STATE in -> gismu.in, lujvo.in, cultural_lujvo.in, fuivla.in_no_prefix, cms.in, cmene.in, lujvo_no_y_bad_vowels.in STATE cms.exit_prefixable -> gismu.in, lujvo.in, cultural_lujvo.in, fuivla.in_prefixed, lujvo_no_y_bad_vowels.in ##### STATE in # ENTRY STATE NAMED LAST IN FILE ENDBLOCK #}}} ########################################################### # Results definition section # This is the priority encoding logic to determine # the final word type Result TAG_GISMU_0 -> R_GISMU_0 Result TAG_GISMU_1 -> R_GISMU_1 SymResult TAG_LUJVO_0 -> R_LUJVO_0 SymResult TAG_LUJVO_1 & ~TAG_LUJVO_0 -> R_LUJVO_1 Result TAG_LUJVO_1T & ~TAG_LUJVO_TAIL_OK -> R_BAD_TOSMABRU # Can't do this in a single stage, because the name conflicts with # R_LUJVO_1 above. Symbol S_LUJVO_1T = TAG_LUJVO_1T & TAG_LUJVO_TAIL_OK Result S_LUJVO_1T -> R_LUJVO_1 # 'cultural' lujvo, i.e. ones containing >=1 cultural rafsi (CCVVCV). # These have some simplifications; we know one of these lujvo must contain 'y', # so these don't have to enter into checking fu'ivla validity later on. # Recall that the CULTURAL_LUJVO block matches all standard lujvo too, so # these have to be factored out. # Fortunately, there is direct equivalence between the ordinary and cultural # varieties in terms of the 0/1/1T status. Symbol S_CULTURAL_0 = TAG_CULTURAL_LUJVO_0 & ~TAG_LUJVO_0 Symbol S_CULTURAL_1 = TAG_CULTURAL_LUJVO_1 & ~TAG_LUJVO_1 Symbol S_CULTURAL_1T = TAG_CULTURAL_LUJVO_1T & ~TAG_LUJVO_1T Symbol S_CULTURAL_TAIL_OK = TAG_CULTURAL_LUJVO_TAIL_OK Result S_CULTURAL_0 -> R_CULTURAL_LUJVO_0 Result S_CULTURAL_1 & ~S_CULTURAL_0 -> R_CULTURAL_LUJVO_1 Result S_CULTURAL_1T & ~S_CULTURAL_TAIL_OK -> R_CULTURAL_BAD_TOSMABRU Result S_CULTURAL_1T & S_CULTURAL_TAIL_OK -> R_CULTURAL_LUJVO_1 Symbol VALID_LUJVO = S_LUJVO_1T | R_LUJVO_1 | R_LUJVO_0 Symbol VALID_GISMU = TAG_GISMU_0 | TAG_GISMU_1 Symbol VLG = VALID_LUJVO | VALID_GISMU Result ~VLG & TAG_FUIVLA_0 & TAG_SLINKUI_0 & ~TAG_FUIVLA_1 -> R_BAD_SLINKUI Symbol S_FUIVLA_0 = ~VLG & TAG_FUIVLA_0 & ~TAG_SLINKUI_0 Symbol S_FUIVLA_1A = ~VLG & TAG_FUIVLA_0 & TAG_SLINKUI_0 & TAG_FUIVLA_1 Symbol S_FUIVLA_1B = ~VLG & ~TAG_FUIVLA_0 & TAG_FUIVLA_1 Symbol S_FUIVLA_1 = S_FUIVLA_1A | S_FUIVLA_1B # The logic here is that if a stage 3 fu'ivla could start with either a CVC or # a 4 letter rafsi prefix, prefer the 4 letter form. Otherwise, you could not # write a stage 3 fu'ivla starting with that rafsi! (If this renders a # particular CVC rafsi impossible, you just have to use its corresponding 4 # letter form to work around this.) Symbol ANY_STAGE3 = TAG_STAGE3_LONG | TAG_STAGE3_CVC | TAG_X_STAGE3_CVC | TAG_X_STAGE3_LONG # Standard stage-3 (1 rafsi + hyphen + fu'ivla tail) Result S_FUIVLA_0 & TAG_STAGE3_LONG -> R_STAGE3_0 Result S_FUIVLA_1 & TAG_STAGE3_LONG -> R_STAGE3_1 Result S_FUIVLA_1 & TAG_STAGE3_CVC & !TAG_STAGE3_LONG -> R_STAGE3_1_CVC # Extended stage-3 (>1 rafsi + hyphen + fu'ivla tail) Result S_FUIVLA_0 & TAG_X_STAGE3_LONG -> R_X_STAGE3_0 Result S_FUIVLA_0 & TAG_X_STAGE3_CVC & !TAG_X_STAGE3_LONG -> R_X_STAGE3_0_CVC Result S_FUIVLA_1 & TAG_X_STAGE3_LONG -> R_X_STAGE3_1 Result S_FUIVLA_1 & TAG_X_STAGE3_CVC & !TAG_X_STAGE3_LONG -> R_X_STAGE3_1_CVC Result S_FUIVLA_0 & ~ANY_STAGE3 & ~TAG_LUJVO_NO_Y_BAD_VOWELS -> R_STAGE4_0 Result S_FUIVLA_1 & ~ANY_STAGE3 & ~TAG_LUJVO_NO_Y_BAD_VOWELS -> R_STAGE4_1 # All of the following are disjoint with each other and with any # of the earlier ones Result TAG_CMENE -> R_CMENE Result TAG_CMAVOS -> R_CMAVOS Result TAG_CMAVOS_END_CY -> R_CMAVOS_END_CY # The default case if nothing else matches DefResult R_UNKNOWN # C type of exit values Type "enum raw_category" # C type of attribute table Attr Type "enum state_attribute" # Attribute tags Attr Result AT_S3_3 Attr Result AT_S3_4 Attr Result AT_XS3_3 Attr Result AT_XS3_4 # The default attribute if nothing else matches Attr DefResult AT_UNKNOWN # vim:cms=#%s jbofihe-0.38/noralujv.pl100644 765 764 3220 7350750740 14303 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/noralujv.pl,v 1.2 2001/01/11 21:33:36 richard Exp $ # Process the NORALUJV.txt file to generate dictionary input # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # open (IN, "; close (IN); foreach $x (@lines) { chomp $x; $lujvo = substr($x, 0, 30); $lujvo =~ s/ +$//; $rest = substr($x, 31); $rest =~ m/^([^:]*):([^:]*):(.*)$/ || next; $makeup = $1; $trans = $2; $plac = $3; $plac =~ s/\([^\)]+\)//g; @plac = split(/,/, $plac); $trans =~ s/^ +//; $trans =~ s/ +$//; print $lujvo."1:".$trans."\n"; @places = (); foreach $p (@plac) { if ($p =~ m/x([1-9]) = ([a-z\']+[12345])/) { $place = $1; $gismu = $2; $gplace = $3; if ($place > 1) { $places[$place] = $gismu.$gplace; print $lujvo.$place.":\@".$gismu.$gplace."\n"; } } } } jbofihe-0.38/nodes.h100644 765 764 22074 7350750740 13417 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/nodes.h,v 1.14 2001/05/30 20:48:30 richard Exp $ Node type definitions for use in the bison parser and its interface with the lexer / preprocessor. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef NODES_H #define NODES_H /*+ To stop multiple inclusions. +*/ #include "nonterm.h" struct treenode; typedef enum { N_MARKER, N_GARBAGE, N_CMAVO, N_ZOI, N_ZO, N_LOhU, N_ZEI, N_BU, N_BRIVLA, N_CMENE, N_NONTERM, N_BROKEN_ERASURE /* ZOI, ZO or LOhU with insufficient SI after => parse error */ } NodeTypes; typedef enum { BR_NONE, BR_ROUND, BR_SQUARE, BR_BRACE, BR_ANGLE, BR_CEIL, BR_FLOOR, BR_TRIANGLE } BracketType; struct marker { int tok; /* To lie at same offset as selmao in struct cmavo, to facilitate error lookahead, given that all values are disjoint. */ char *text; }; struct garbage { char *word; }; struct cmavo { int selmao; /* which can be modified to do token groupings, e.g. SE_BAI etc as required to work around the grammar not being LR(1) */ int code; /* Reference into cmavo table */ /* Set in categ.c if the first token of a 'free' follows */ unsigned char followed_by_free; }; struct zoi { char *form; /* zoi or la'o */ char *term; /* delimiter */ char *text; /* body text */ }; struct zo { char *text; }; struct lohu { char *text; }; /* For X zei Y, nchildren==2. For X zei Y zei Z, nchildren==3 etc. */ struct zei { int nchildren; struct treenode **children; char *sep_with_plus; /* Form for dictionary lookup of whole thing, e.g. o'o+cinmo */ char *sep_with_zei; /* Form with zei separating terms, kept for printing out if needed */ int number; /* Sequence number (can print out to help user match start and end of constructs) */ BracketType brackets; /* bracketing to apply to this construction */ }; enum BrivlaType { BVT_GISMU, BVT_LUJVO, BVT_FUIVLA3, BVT_FUIVLA4 }; struct brivla { char *word; enum BrivlaType type; }; struct cmene { char *word; }; struct bu { char *word; }; /* When zoi, zo, lo'u..le'u has been erased with too few si cmavo, how many matches are still required to clear it. */ struct erasure { int defects; }; struct nonterm { int nchildren; int number; /* Sequence number (can print out to help user match start and end of constructs) */ BracketType brackets; /* bracketing to apply to this construction */ NonTerm type; struct treenode **children; }; struct treenode; /* ================================================== */ /* Extension field types */ typedef enum extension_type { EX_CONV, EX_BAICONV, EX_DONTGLOSS, EX_TERMVECTORS, EX_TERMVECTOR, EX_TERMTAGS, EX_GLOSSTYPE, EX_DONETU1, EX_DONES3, EX_TENSECTX, EX_NEGINDICATOR, EX_CAIINDICATOR, EX_CONNECTIVE, EX_ANTECEDENT, EX_REQUIREBRAC, EX_RELCLAUSELINK, EX_CONTAINSKEHA, EX_ELIDABLE } ExtensionType; typedef struct x_conversion { int conv; /* Which place of the word goes into the x1 place of the construction. */ } XConversion; typedef struct x_baiconversion { int conv; } XBaiConversion; typedef struct x_dontgloss { int pad; } XDontGloss; struct TermVector; typedef struct x_termvectors { struct TermVector *pre; struct TermVector *post; } XTermVectors; typedef struct x_termvector { struct TermVector *vec; } XTermVector; typedef struct x_glosstype { int in_selbri; /* 1 in main selbri, 0 in a sumti */ int is_tertau; /* 1 if it's the tertau */ } XGlosstype; /* ================================================== */ typedef enum { TTT_BRIVLA, TTT_JAITAG, TTT_JAI, TTT_ABSTRACTION, TTT_ME, TTT_GOhA, TTT_NUhA, TTT_NUMBERMOI, TTT_ZEI } XTermTagType; typedef struct { struct treenode *x; } XTT_Brivla; typedef struct { /* The tag (BAI, tense etc that does the modifying) */ struct treenode *tag; /* The tanru_unit_2 that is modified. */ struct treenode *inner_tu2; } XTT_JaiTag; typedef struct { int pad; } XTT_Jai; typedef struct { struct treenode *nu; } XTT_Abstraction; typedef struct { struct treenode *sumti; } XTT_Me; typedef struct { struct treenode *goha; } XTT_Goha; typedef struct { struct treenode *mex_operator; } XTT_Nuha; typedef struct { struct treenode *number_or_lerfu; struct treenode *moi; } XTT_NumberMoi; typedef struct { struct treenode *zei; } XTT_Zei; typedef struct x_termtag { XTermTagType type; int pos; /* Needs extending to do JAI etc */ /* Not union, because the jai variants need to access the brivla one too. Look at cleaning this up sometime */ XTT_Brivla brivla; XTT_JaiTag jaitag; XTT_Jai jai; XTT_Abstraction abstraction; XTT_Me me; XTT_Goha goha; XTT_Nuha nuha; XTT_NumberMoi numbermoi; XTT_Zei zei; } XTermTag; typedef struct x_termtags { struct x_termtags *next; struct x_termtag tag; } XTermTags; typedef struct x_donetu1 { int pad; } XDoneTU1; typedef struct x_dones3 { int pad; } XDoneS3; typedef struct x_tensectx { enum tense_contexts { TSC_OTHER, TSC_SELBRI, TSC_TERM, TSC_NOUN, TSC_LINK, TSC_CONNECT, TSC_JAITAG } ctx; } XTenseCtx; typedef struct x_negindicator { int pad; } XNegIndicator; typedef struct x_caiindicator { enum cai_codes { CC_CAI, CC_SAI, CC_RUhE, CC_CUhI, CC_RUhENAI, CC_SAINAI, CC_CAINAI, CC_PEI, CC_PEINAI } code; } XCaiIndicator; typedef struct x_connective { enum connective_position { CNP_GE, /* ge part of forethought connective */ CNP_GI, /* gi part of forethought connective */ CNP_GE_JOIK, /* joik_gi in a gek */ CNP_GI_JOIK, /* gi matched with a joik_gi */ CNP_GE_STAG, /* stag_gik in a gek */ CNP_GI_STAG, /* gi matched with a stag_gik */ CNP_AFTER /* after-thought connective */ } pos; /* This is used for the logical connectives */ char *pattern; /* TTFF etc */ /* This is used for the non-logical and tag connectives */ struct treenode *js; /* joik or stag */ int neg1; /* true if first half has NAI applied */ int neg2; /* true if second half has NAI applied */ } XConnective; typedef struct { struct treenode *node; } XAntecedent; typedef struct { int pad; } XRequireBrac; typedef struct { struct treenode *rel; } XRelClauseLink; typedef struct { int pad; } XContainsKeha; typedef struct { int pad; } XElidable; typedef union { XConversion conversion; XBaiConversion bai_conversion; XDontGloss dont_gloss; XTermVectors term_vectors; XTermVector term_vector; XTermTags term_tags; XGlosstype glosstype; XDoneTU1 done_tu1; XDoneS3 done_s3; XTenseCtx tense_ctx; XNegIndicator neg_indicator; XCaiIndicator cai_indicator; XConnective connective; XAntecedent antecedent; XRequireBrac require_brac; XRelClauseLink rel_clause_link; XContainsKeha contains_keha; XElidable elidable; } ExtensionData; typedef struct extension { struct extension *next; enum extension_type type; ExtensionData data; } Extension; /* ================================================== */ /* The main tree node type */ typedef struct treenode { struct treenode *next; struct treenode *prev; struct treenode *parent; /* Back link to the parent nonterminal, to allow parse tree traversal later */ struct treenode *bahe; /* Points singly to any bahe node preceding the current one */ struct treenode *ui_next; /* Indicators linked list */ struct treenode *ui_prev; /* Extension data if any, NULL if not (bahe/ui might be stuffed on here when it's shaken down a bit) */ struct extension *ext; int eols; /* Number of line feeds following token in input */ int start_line, start_column; /* Where does token start in input */ NodeTypes type; union { struct marker marker; struct garbage garbage; struct cmavo cmavo; struct zoi zoi; struct zo zo; struct zei zei; struct lohu lohu; struct bu bu; struct brivla brivla; struct cmene cmene; struct nonterm nonterm; struct erasure erasure; } data; } TreeNode; struct tk_cmavo { int selmao; }; struct tk_marker { int tok; }; #endif /* NODES_H */ jbofihe-0.38/places.dat100644 765 764 667035 7350750741 14134 0ustar richardruser################################################################################ # $Header: /cvs/src/jbofihe/places.dat,v 1.28 2001/03/18 22:31:42 richard Exp $ # # This file was automatically generated (badly!) from the 'gismu' file # at ftp://xiron.pc.helsinki.fi/pub/lojban/wordlists. Uncommenting # the entries and filling them in is work in progress. Note that # quite a lot of the gismu have come out with the wrong numbers of # places, this has to be manually fixed. # # x1 utters verbally/says/phonates/speaks [vocally makes sound] x2 bacru1:A;utter bacru2:D;uttered sound # # x1 is a banana/plantain [fruit/plant] of species/breed x2 badna1:D;banana badna2:S;banana species badna2t:species # # x1 is sad/depressed/dejected/[unhappy/feels sorrow/grief] about x2 (abstraction) badri1:P;sad badri2:D;reason* for sadness badri2t:reason # # x1 runs on surface x2 using limbs x3 with gait x4 bajra1:A;run bajra2:D;running surface bajra3:D;running limb bajra4:S;running gait # # x1 is a bundle/package/cluster/clump/pack [shape/form] containing x2, held together by x3 bakfu1:D;bundle bakfu2:R;in bundle bakfu3:A;hold* bundle # # x1 is a cow/cattle/kine/ox/[bull/steer/calf] [beef-producer/bovine] of species/breed x2 bakni1:D;cattle bakni2:S;cattle species bakni2t:species # # x1 is a quantity of/contains/is made of chalk from source x2 in form x3 bakri1:D;chalk bakri2:D;chalk source bakri2t:from source bakri3:D;chalk form bakri3t:in form # # x1 is a bucket/pail/can/deep, solid, wide-topped container of contents x2, made of material x3 baktu1:D;bucket baktu2:S;bucket contents baktu2t:contents baktu3:S;bucket material baktu3t:of material # # x1 is a bulb [body-part] of plant/species x2; [metaphor: rounded, bulgy] balji1:D;bulb balji2:S;bulb species balji2t:species # # x1 is a balcony/overhang/ledge/shelf of building/structure x2 balni1:D;balcony balni2:D;building* with balcony balni2t:of building # # x1 is a blade of tool/weapon x2 balre1:D;blade balre2:D;bladed weapon balre2t:of weapon # # x1 is in the future of/later than/after x2 in time sequence; x1 is latter; x2 is former balvi1:P;later balvi2:P;earlier # # x1 exceeds/is beyond limit/boundary x2 from x3 in property/amount x4 (ka/ni) bancu1:A;exceed bancu2:D;exceeded limit bancu3:S;reference point for excess bancu3t:by reference bancu4:D;excess property bancu4t:in property # # x1 (event) defends/protects x2 (object/state) from threat/peril/potential x3 (event) bandu1:A;protect bandu2:P;protected bandu3:D;threat # # x1 is an amphibian of species/breed x2 banfi1:D;amphibian banfi2:S;amphibian species banfi2t:species # # x1 is a/the language/dialect used by x2 to express/communicate x3 (si'o/du'u, not quote) bangu1:D;language bangu2:A;use* language bangu3:R;communicated* by language bangu3t:to express # # x1 is great/grand in property x2 (ka) by standard x3 banli1:P;great banli2:D;property* of greatness banli3:D;standard* of greatness # # x1 grows/expands [an increasing development] to size/into form x2 from x3 banro1:A;expand banro2:D;size*/form* after expansion banro2t:into form banro3:D;size*/form* before expansion banro3t:from form # # x1 is a bank owned by/in banking system x2 for banking function(s) x3 (event) banxa1:D;bank banxa2:D;banking system banxa2t:in system banxa3:D;banking function banxa3t:for function # # x1 (object) suffices/is enough/sufficient for purpose x2 under conditions x3 banzu1:P;sufficient banzu2:D;purpose* for which sufficient banzu3:D;condition* for sufficiency # # x1 [force] (ka) forces/compels event x2 to occur; x1 determines property x2 to manifest bapli1:A;compel bapli2:R;compelled to occur bapli2t:compelled # # x1 is big/large in property/dimension(s) x2 (ka) as compared with standard/norm x3 barda1:P;large barda2:D;large dimension barda2t:dimension barda3:D;largeness standard barda3t:standard # # x1 arches/curves over/around x2 and is made of x3; x1 is an arch over/around x2 of material x3 bargu1:P;curved bargu2:P;surrounded by curve bargu2t:around bargu3:S;arch material bargu3t:of material # # x1 is a tavern/bar/pub serving x2 to audience/patrons x3 barja1:D;tavern barja2:R;served by tavern barja2t:serving barja3:D;patron* of tavern barja3t:to patrons # # x1(s) is a/are mark(s)/spot(s) on x2 of material x3 barna1:D;mark barna2:P;marked barna3:S;mark material barna3t:of material # # x1 is on the outside of x2; x1 is exterior to x2 bartu1:P;outside bartu2:D;non-container # # x1 emphasizes/accentuates/gives emphasis/stress/accent to x2 by (action) x3 basna1:A;emphasize basna2:P;emphasized basna3:D;emphatic action # # x1 replaces/substitutes for/instead of x2 in circumstance x3; x1 is a replacement/substitute basti1:D;substitute basti2:P;substituted basti3:S;substitution circumstances basti3t:in circumstances # # x1 bites/pinches x2 on/at specific locus x3 with x4 batci1:A;bite batci2:P;bitten batci3:S;locus of bite batci3t:at locus batci4:D;biting tool batci4t:with tool # # x1 is a button/knob/[handle] on/for item x2, with purpose x3, made of material x4 batke1:D;button batke2:R;having button batke3:D;purpose* of button batke3t:for purpose batke4:S;button material batke4t:of material # # x1 is a quantity of barley [grain] of species/strain x2 bavmi1:S;barley bavmi2:S;barley species bavmi2t:of species # # x1 reflects Malay-Indonesian common language/culture in aspect x2 baxso1:P;Malay baxso2:D;Malay aspect # # x1 is foolish/silly in event/action/property [folly] (ka) x2; x1 is a boob bebna1:P;foolish bebna2:D;foolish act # # x1 reflects North American culture/nationality/geography in aspect x2 bemro1:P;North American bemro2:D;North American aspect # # x1 is a crew/team/gang/squad/band of persons x2 directed/led by x3 organized for purpose x4 bende1:D;team bende2:D;team member bende3:D;team leader bende4:D;team purpose # # x1 reflects Bengali/Bangladesh culture/nationality/language in aspect x2 bengo1:P;Bengali bengo2:D;Bengali aspect # # x1 transfers/sends/transmits x2 to receiver x3 from transmitter/origin x4 via means/medium x5 benji1:A;send benji2:P;sent benji3:D;receiver benji4:D;transmitter benji5:D;transmission means benji5t:by means # # x1 is a son of mother/father/parents x2 [not necessarily biological] bersa1:D;son bersa2:D;parent* of son # # x1 is to the north/northern side [right-hand-rule pole] of x2 according to frame of reference x3 berti1:P;to the north berti2:P;to the south berti3:D;northness reference frame berti3t:reference frame # # x1 is a/the brain [body-part] of x2; [metaphor: intelligence, mental control] besna1:D;brain besna2:D;body* with brain besna2t:of body # # x1 is a/the abdomen/belly/lower trunk [body-part] of x2; [metaphor: midsection] betfu1:D;abdomen betfu2:D;body* with abdomen betfu2t:of body # # x1 is a tragedy/disaster/tragic for x2 betri1:D;tragedy betri2:A;suffer* tragedy betri2t:sufferer # # x1 carries/hauls/bears/transports cargo x2 to x3 from x4 over path x5; x1 is a carrier/[porter] bevri1:A;carry bevri2:D;carried cargo bevri3:D;destination* of carrying bevri4:D;origin* of carrying bevri5:D;route* of carrying # # x1 is a bead/pebble [shape/form] of material x2 bidju1:D;bead bidju2:D;bead material bidju2t:material # # x1 is a bee/wasp/hornet of species/breed x2 bifce1:D;bee bifce2:S;bee species bifce2t:of species # # x1 whips/lashes/snaps [a sudden violent motion] bikla1:A;lash # # x1 is bound/obliged to/has the duty to do/be x2 in/by standard/agreement x3; x1 must do x2 bilga1:P;obliged bilga2:D;duty bilga3:S;standard for obligation # # x1 is ill/sick/diseased with symptoms x2 from disease x3 bilma1:P;ill bilma2:D;symptom bilma3:D;disease # # x1 is military/regimented/is strongly organized/prepared by system x2 for purpose x3 bilni1:P;regimented bilni2:D;regimenting system bilni2t:by system bilni3:D;purpose* of regimentation bilni3t:for purpose # # x1 reflects Indonesian culture/nationality/language in aspect x2 bindo1:P;Indonesian bindo2:D;Indonesian aspect # # x1 insures/indemnifies x2 (person) against peril x3 (event) providing benefit(s) x4 (event) binra1:A;indemnify binra2:P;indemnified binra3:D;indemnified peril binra3t:against peril binra4:D;benefit* from indemnity binra4t:providing benefit # # x1 becomes/changes/converts/transforms into x2 under conditions x3 binxo1:A;become binxo2:D;result* of becoming binxo3:D;becoming condition # # x1 is made of/contains/is a amount of beer/ale/brew brewed from x2 birje1:S;beer birje2:R;brewed to make beer birje2t:brewed from # # x1 is a/the arm [body-part] of x2; [metaphor: branch with strength] birka1:D;arm birka2:D;body* having arm # # x1 is certain/sure/positive/convinced that x2 is true birti1:P;convinced birti2:P;convincing # # x1 is a quantity of/is made of/contains ice [frozen crystal] of composition/material x2 bisli1:S;ice bisli2:S;ice material bisli2t:of material # # x1 is a wall/fence separating x2 and x3 (unordered) of/in structure x4 bitmu1:D;wall*/fence* bitmu2:R;separated by wall bitmu2t:separated bitmu3:R;separated by wall bitmu3t:separated bitmu4:D;structure* with wall bitmu4t:in structure # # x1 is white/very-light colored [color adjective] blabi1:P;white # # x1 is a quantity of/is made of/contains glass of composition including x2 blaci1:S;glass blaci2:S;glass composition blaci2t:of composition # # x1 is blue [color adjective] blanu1:P;blue # # x1 is a block [3-dimensional shape/form] of material x2, surfaces/sides x3 bliku1:D;block bliku2:S;block material bliku3:D;block side # # x1 is a boat/ship/vessel [vehicle] for carrying x2, propelled by x3 bloti1:D;boat*/ship* bloti2:D;boat/ship cargo bloti3:A;propel* boat/ship # # x1 is a ball/sphere/orb/globe [shape/form] of material x2; x1 is a spherical object [made of x2] bolci1:D;sphere bolci2:S;sphere material bolci2t:of material # # x1 is a/the bone/ivory [body-part], performing function x2 in body of x3; [metaphor: calcium] bongu1:D;bone bongu2:D;bone function bongu3:D;body* with bone bongu3t:of body # # x1 is a bottle/jar/urn/flask/closable container for x2, made of material x3 with lid x4 botpi1:D;flask botpi2:S;flask contents botpi2t:for contents botpi3:S;flask material botpi3t:of material botpi4:D;flask lid botpi4t:with lid # # x1 is a sheet/foil/blanket [2-dimensional shape/form flexible in 3 dimensions] of material x2 boxfo1:D;sheet boxfo2:S;sheet material boxfo2t:of material # # x1 is a wave [periodic pattern] in medium x2, wave-form x3, wave-length x4, frequency x5 boxna1:D;wave boxna2:S;wave medium boxna2t:in medium boxna3:D;waveform boxna4:D;wavelength boxna5:D;frequency # # x1 is an enemy/opponent/adversary/foe of x2 in struggle x3 bradi1:D;enemy bradi2:R;with enemy bradi3:D;struggle* involving enemies bradi3t:in struggle # # x1 is hail/sleet/freezing rain/solid precipitation of material/composition including x2 bratu1:S;solid precipitation bratu2:S;solid precipitation composition bratu2t:of composition # # x1 reflects Brazilian culture/nationality/language in aspect x2 brazo1:P;Brazilian brazo2:D;Brazilian aspect # # x1 is ready/prepared for x2 (event) bredi1:P;ready bredi2:P;prepared for # # x1 (text) is a predicate relationship with relation x2 among arguments (sequence/set) x3 bridi1:D;predicate text bridi2:D;predicate relation bridi3:D;predicate argument # # x1 is a breeze/wind/gale from direction x2 with speed x3; x1 blows from x2 brife1:D;wind brife2:D;wind direction brife3:D;wind speed # # x1 is an office/bureau/work-place of worker x2 at location x3 briju1:D;office briju2:D;office worker briju2t:worker briju3:D;office location briju3t:location # # x1 reflects British/United Kingdom culture/nationality in aspect x2 brito1:P;British brito2:D;aspect* of Britishness # # 1st assignable variable predicate (context determines place structure) #broda1:DSAP; #broda2:DSAP; # # 2nd assignable variable predicate (context determines place structure) #brode1:DSAP; #brode2:DSAP; # # 3rd assignable variable predicate (context determines place structure) #brodi1:DSAP; #brodi2:DSAP; # # 4th assignable variable predicate (context determines place structure) #brodo1:DSAP; #brodo2:DSAP; # # 5th assignable variable predicate (context determines place structure) #brodu1:DSAP; #brodu2:DSAP; # # x1 is brother of/fraternal to x2 by bond/tie/standard/parent(s) x3; [not necess. biological] bruna1:D;brother bruna2:P;having brother bruna3:D;bond* of brotherhood # # x1 pertains to the Buddhist culture/religion/ethos in aspect x2 budjo1:P;Buddhist budjo2:D;Buddhist aspect # # x1 is an amount of cloth/fabric of type/material x2 bukpu1:S;cloth bukpu2:S;cloth material bukpu2t:of material # # x1 is foggy/misty/covered by a fog/mist/vapor of liquid x2 bumru1:P;foggy bumru2:S;fog liquid bumru2t:of liquid # # x1 is x2 (def. 1) local weight unit(s) [non-metric], standard x3, subunits [e.g. ounces] x4 bunda1:R;having non-metric weight bunda1t:weighed thing bunda2:S;number of non-metric weight units bunda2t:weight bunda3:S;non-metric weighing standard bunda3t:by standard bunda4:D;weight subunit bunda4t:with subunit # # x1 is brown/tan [color adjective] bunre1:P;brown # # x1 is a brush for purpose x2 (event) with bristles x3 burcu1:D;brush burcu2:D;brush purpose burcu2t:for purpose burcu3:S;bristles # # x1 is embarrassed/disconcerted/flustered/ill-at-ease about/under conditions x2 (abstraction) burna1:P;embarrassed burna2:S;conditions for embarrassment burna2t:under conditions # # x1 is current at/in the present of/during/concurrent/simultaneous with x2 in time cabna1:P;current cabna2:D;reference* for being current # # x1 is apparatus/mechanism/device/equipment for function x2 controlled/[triggered] by x3 (agent) cabra1:S;apparatus cabra2:D;function* of apparatus cabra3:A;control* apparatus # # x1 is x2 hours in duration (default is 1 hour) by standard x3 cacra1:R;measured in hours cacra2:S;number of hours cacra3:S;standard for hour cacra3t:by standard # # x1 walks/strides/paces on surface x2 using limbs x3 cadzu1:A;walk cadzu2:D;walking surface cadzu2t:on surface cadzu3:D;walking limbs cadzu3t:using limbs # # x1 (event) often/frequently/commonly/customarily occurs/recurs by standard x2 cafne1:P;frequent cafne2:D;standard* for being frequent # # x1 is made of/contains/is a quantity of chocolate/cocoa cakla1:S;chocolate # # x1 is a shell/husk [hard, protective covering] around x2 composed of x3 calku1:D;shell calku2:R;enclosed by shell calku2t:enclosing calku3:S;shell composition calku3t:of composition # # x1 vanishes/disappears from location x2; x1 ceases to be observed at x2 using senses/sensor x3 canci1:A;vanish canci2:D;location* vanished from canci2t:from location canci3:D;sensor* no longer sensing canci3t:affected sensor # # x1 is idle/at rest/inactive cando1:P;idle # # x1 is a farm/ranch at x2, farmed by x3, raising/producing x4; (adjective:) x1 is agrarian cange1:D;farm cange1a:agrarian cange2:D;farm location cange2t:at location cange3:D;farmer cange4:S;farm produce # # x1 exchanges/trades/barters commodity x2 for x3 with x4; x1, x4 is a trader/merchant/businessman canja1:A;trade canja2:D;traded commodity canja3:S;remuneration for trade canja3t:in exchange for canja4:D;trading partner canja4t:trade with # # x1 is a window/portal/opening [portal] in wall/building/structure x2 canko1:D;window canko2:D;windowed structure canko2t:in structure # # x1 is space/volume/region/room [at-least-3-dimensional area] occupied by x2 canlu1:S;space canlu2:A;occupy space # # x1 is a shovel/spade [bladed digging implement] for digging x2 canpa1:D;shovel canpa2:R;dug by shovel # # x1 is a quantity of/contains/is made of sand/grit from source x2 of composition including x3 canre1:S;sand/grit canre2:D;sand/grit source canre3:S;sand/grit composition # # x1 is a/the gut(s)/entrails/intestines/viscera/innards/digestive system [body-part] of x2 canti1:S;guts canti2:D;body* with guts canti2t:of body # # x1 is a cart/carriage/wagon [wheeled vehicle] for carrying x2, propelled by x3 carce1:D;carriage carce2:R;carried by carriage carce3:S;means of propelling carriage carce3t:propelled by # # x1 is intense/bright/saturated/brilliant in property (ka) x2 as received/measured by observer x3 carmi1:P;intense carmi2:D;intense property carmi3:A;observe* intensity # # x1 turns/rotates/revolves around axis x2 in direction x3 carna1:A;rotate carna2:D;rotation axis carna2t:about axis carna3:D;rotation direction carna3t:in direction # # x1 is a chart/diagram/map of/about x2 showing formation/data-points x3 cartu1:D;chart cartu2:D;chart topic cartu2t:about topic cartu3:S;chart data # # x1 rains/showers/[precipitates] to x2 from x3; x1 is precipitation [not limited to 'rain'] carvi1:S;precipitation carvi2:D;precipitation target carvi3:D;precipitation source # # x1(s) (mass normally, but 1 individual/jo'u possible) discuss(es)/talk(s) about topic/subject x2 casnu1:A;discuss casnu2:D;discussion topic # # x1 [agent] shoves/pushes x2 at locus x3 catke1:A;push catke2:P;pushed catke3:S;locus of pushing # # x1 looks at/examines/views/inspects/regards/watches/gazes at x2 catlu1:A;look* at catlu2:P;looked at # # x1 has authority/is an official in/on/over matter/sphere/persons x2 derived on basis x3 catni1:R;with authority catni2:R;under authority catni3:S;basis of authority # # x1 (agent) kills/slaughters/murders x2 by action/method x3 catra1:A;kill catra2:P;killed catra3:S;method of killing # # x1 is shallow in extent in direction/property x2 away from reference point x3 by standard x4 caxno1:P;shallow caxno2:S;shallow direction caxno3:D;reference point* for shallowness caxno3t:from reference point caxno4:S;standard of shallowness caxno4t:by standard # # x1 launches/fires/shoots projectile/missile x2, propelled by x3 [propellant/propulsion] cecla1:A;launch cecla2:D;projectile cecla3:S;propulsion means # # x1 is a community/colony of organisms x2 cecmu1:D;community cecmu2:D;organism* in community cecmu2t:with organism # # x1 is an era/epoch/age characterized by x2 (event/property/interval/idea) cedra1:D;era cedra2:P;characterising an era # # x1 varies/changes in property/quantity x2 (ka/ni) in amount/degree x3 under conditions x4 cenba1:A;vary cenba2:D;variant property cenba2t:in property cenba3:D;degree* of variation cenba3t:in degree cenba4:S;conditions for variation cenba4t:under conditions # # x1 is holy/sacred to person/people/culture/religion/cult/group x2 censa1:P;holy censa2:A;consider* holy(ness) # # x1 is a hundredth [1/100; 1x10**-2] of x2 in dimension/aspect x3 (default is units) centi1:D;hundredth centi2:R;having hundredth centi3:D;hundredth aspect centi3t:in aspect # # x1 is an heir to/is to inherit x2 (object/quality) from x3 according to rule x4 cerda1:D;heir cerda2:R;inherited cerda3:R;having heir cerda4:D;rule* for inheritance cerda4t:by rule # # x1 is a morning [dawn until after typical start-of-work for locale] of day x2 at location x3 cerni1:D;morning cerni2:D;day* of morning cerni2t:day cerni3:D;location* of morning cerni3t:location # # x1 is an expert/pro/has prowess in/is skilled at x2 (event/activity) by standard x3 certu1:P;skilled certu2:P;requiring skill certu3:S;standard of skill # # x1 is a/the god/deity of people(s)/religion x2 with dominion over x3 [sphere]; x1 is divine cevni1:D;god cevni2:D;people* having god cevni3:D;sphere* of god # # x1 [state/event/process] commences/initiates/starts/begins to occur; (intransitive verb) cfari1:A;commence # # x1 is a work of fiction about plot/theme/subject x2/under convention x2 by author x3 cfika1:S;fiction cfika2:D;fiction plot cfika3:D;author* of fiction cfika3t:by author # # x1 (property - ka) is a flaw/fault/defect in x2 causing x3 cfila1:D;defect cfila2:P;defective cfila3:R;caused by defect # # x1 is a wedge [shape/form/tool] of material x2 cfine1:D;wedge cfine2:S;wedge material # # x1 (event/state) confuses/baffles x2 [observer] due to [confusing] property x3 (ka) cfipu1:A;confuse cfipu2:P;confused cfipu3:D;confusing property # # x1 is blood/vital fluid of organism x2 ciblu1:D;vital fluid ciblu2:D;organism* with vital fluid ciblu2t:of organism # # x1 is cyan/turquoise/greenish-blue [color adjective] cicna1:D;cyan # # x1 is food/feed/nutriment for x2; x1 is edible/gives nutrition to x2 cidja1:S;food cidja2:P;fed # # x1 is a/the knee/elbow/knuckle [hinged joint, body-part] of limb x2 of body x3 cidni1:D;knee*/elbow* cidni2:D;hinged limb cidni3:D;body* with hinged limb cidni3t:of body # # x1 is a quantity of/contains/is made of hydrogen (H); [metaphor: light, flammable] cidro1:S;hydrogen # # x1 is an infant/baby [helpless through youth/incomplete development] of species x2 cifnu1:D;infant cifnu2:S;species of infant cifnu2t:of species # # x1 is a/the gland [body-part] secreting x2, of body x3; x2 is a secretion of x1 cigla1:D;gland cigla2:D;secretion cigla3:D;body* with gland cigla3t:of body # # (adjective:) x1 is awake/alert/conscious cikna1:P;awake # # x1 repairs/mends/fixes x2 for use x3 cikre1:A;repair cikre2:P;repaired cikre3:D;use* for repair # # x1 (person) explains x2 (event/state/property) to x3 with explanation x4 (du'u) ciksi1:A;explain ciksi2:P;explained ciksi3:A;receive* explanation ciksi4:D;explanation # # (adjective:) x1 is wild/untamed cilce1:P;wild # # x1 is moist/wet/damp with liquid x2 cilmo1:P;moist cilmo2:D;moistening liquid cilmo2t:with liquid # # x1 learns x2 (du'u) about subject x3 from source x4 (obj./event) by method x5 (event/process) cilre1:A;learn cilre2:R;learned cilre3:D;learned subject* cilre4:D;source* for learning cilre5:D;method* of learning # # x1 is a thread/filament/wire [shape/form] of material x2 cilta1:D;thread cilta2:S;thread material cilta2t:of material # # x1 (property - ka) is a dimension of space/object x2 according to rules/model x3 cimde1:D;dimension cimde2:D;dimensioned object cimde2t:of object cimde3:D;dimension model cimde3t:according to # # x1 is infinite/unending/eternal in property/dimension x2, to degree x3 (quantity)/of type x3 cimni1:P;eternal cimni2:D;eternal property cimni3:S;eternal degree cimni3t:to degree # # x1 (agent) kisses/busses x2 at locus x3 cinba1:A;kiss cinba2:P;kissed cinba3:S;locus of kiss # # x1 is an oak, a type of tree of species/strain x2 cindu1:D;oak cindu2:S;oak species cindu2t:of species # # x1 is a lion/[lioness] of species/breed x2 cinfo1:D;lion cinfo2:S;lion species cinfo2t:of species # # x1 is a wrinkle/crease/fold [shape/form] in x2 cinje1:D;crease cinje2:P;creased # # x1 is an insect/arthropod of species x2; [bug/beetle] cinki1:D;insect cinki2:S;insect species cinki2t:of species # # x1 is thin in direction/dimension x2 by standard x3; [relatively short in smallest dimension] cinla1:P;thin cinla2:D;direction* of thinness cinla2t:thin direction cinla3:D;standard* of thinness cinla3t:by standard # # x1 feels emotion x2 (ka) about x3 cinmo1:P;emotional cinmo2:D;emotion cinmo3:D;emotion subject cinmo3t:about # # x1 (abstraction) interests/is interesting to x2; x2 is interested in x1 cinri1:P;interesting cinri2:P;interested # # x1 in activity/state x2 exhibits sexuality/gender/sexual orientation x3 (ka) by standard x4 cinse1:P;sexual cinse2:D;sexual activity cinse3:S;sexuality cinse4:D;sexual standard # # x1 [material] is a paint of pigment/active substance x2, in a base of x3 cinta1:S;paint cinta2:D;pigment cinta3:S;paint base # # x1 is a/are tong(s)/chopsticks/pincers/tweezers/pliers [tool/body-part] for x2 to pinch x3 cinza1:S;tongs cinza2:R;using tongs cinza3:R;pinched by tongs # # x1 is a bird/avian/fowl of species x2 cipni1:D;bird cipni2:S;bird species cipni2t:of species # # x1 (process/event) is a test for/proof of property/state x2 in subject x3 (individ./set/mass) cipra1:D;test cipra2:D;tested property cipra3:P;tested # # x1 loses person/thing x2 at/near x3; x1 loses property/feature x2 in conditions/situation x3 cirko1:A;lose cirko2:P;lost cirko3:D;location* of loss # # x1 is a quantity of/contains cheese/curd from source x2 cirla1:S;cheese cirla2:D;cheese source # # x1 inscribes/writes x2 on display/storage medium x3 with writing implement x4; x1 is a scribe ciska1:A;write ciska2:P;written ciska3:D;writing medium ciska4:D;writing implement # # x1 smiles/grins (facial expression) cisma1:A;smile # # x1 (mass) system interrelated by structure x2 among components x3 (set) displaying x4 (ka) ciste1:D;system ciste2:D;system structure ciste3:D;system component ciste4:D;system property # # x1 eats/ingests/consumes (transitive verb) x2 citka1:A;eat citka2:P;eaten # # x1 is young/youthful [relatively short in elapsed duration] by standard x2 citno1:P;young citno2:D;standard* for youth # # x1 is a history of x2 according to x3 (person)/from point-of-view x3 citri1:S;history citri2:R;having history citri3:D;view* of history # # x1 is a season/is seasonal [cyclical interval], defined by interval/property x2, of year(s) x3 citsi1:D;season citsi2:D;season interval citsi3:D;season year # # x1 is a louse/flea [blood-sucking arthropod] of species/breed x2, parasitic on x3 civla1:D;flea civla2:S;flea species civla2t:of species civla3:D;flea victim # # x1 is strange/weird/deviant/bizarre/odd to x2 in property x3 (ka) cizra1:P;strange cizra2:A;consider* strange cizra3:D;strange property # # x1 is a quantity of/contains/is made of rubber/latex from source x2 of composition including x3 ckabu1:S;rubber ckabu2:D;rubber source ckabu2t:from source ckabu3:D;rubber composition ckabu3t:of composition # # x1 is made of/contains/is a quantity of coffee from source/bean/grain x2 ckafi1:S;coffee ckafi2:D;coffee source ckafi2t:from source # # x1 has/is characterized by property/feature/trait/aspect/dimension x2 (ka); x2 is manifest in x1 ckaji1:R;having property ckaji2:D;property # # x1 is a bed/pallet of material x2 for holding/supporting x3 (person/object/event) ckana1:D;bed ckana2:S;bed material ckana2t:material ckana3:R;supported by bed ckana3t:supported # # x1 is perilous/dangerous/potentially harmful to x2 under conditions x3 ckape1:P;dangerous ckape2:R;at risk of harm ckape2t:harmful to ckape3:S;conditions for danger ckape3t:under conditions # # x1 ridicules/mocks/scoffs at x2 about x3 (property/event) by doing activity x4 (event) ckasu1:A;ridicule ckasu2:P;ridiculed ckasu3:D;topic* of ridicule ckasu3t:topic ckasu4:D;event* leading to ridicule ckasu4t:causal event # # x1 feels ashamed/mortified/humiliated under conditions x2 before community/audience x3 ckeji1:P;ashamed ckeji2:S;shame conditions ckeji2t:under conditions ckeji3:S;audience of shame ckeji3t:before audience # # x1 is a key fitting/releasing/opening/unlocking lock x2, and having relevant properties x3 ckiku1:D;key ckiku2:D;lock ckiku3:D;key property # # x1 (si'o) is a scale of units for measuring/observing/determining x2 (state) ckilu1:D;unit scale ckilu2:R;measured in units # # x1 is related to/associated with/akin to x2 by relationship x3 ckini1:R;akin ckini2:D;reference ckini2t:akin to ckini3:D;akin relationship # # x1 is grateful/thankful to/appreciative of x2 for x3 (event/property) ckire1:P;grateful ckire2:A;receive* gratitude ckire3:D;reason* for gratitude # # x1 is school/institute/academy at x2 teaching subject(s) x3 to audien./commun. x4 operated by x5 ckule1:D;school ckule2:D;school location ckule3:D;school subject ckule4:D;school pupil ckule5:D;school operator # # x1 is a conifer/pine/fir of species/strain x2 with cones x3 ckunu1:D;conifer*/pine* ckunu2:D;conifer species ckunu2n:conifer species:Prevent extra plural ckunu3:D;pine cone # # x1 is loud/noisy at observation point x2 by standard x3 cladu1:P;loud cladu2:D;point* for loudness cladu2t:at point cladu3:S;standard for loudness cladu3t:by standard # # x1 is long in dimension/direction x2 (default longest dimension) by measurement standard x3 clani1:P;long clani2:D;long dimension clani2t:in dimension clani3:S;standard for length clani3t:by standard # # x1 is without/lacking/free of/lacks x2; x1 is x2-less claxu1:A;lack claxu2:P;lacked # # x1 is a moss/lichen of species/strain x2 growing on x3; (adjective:) x1 is mossy clika1:S;lichen clika1a:mossy clika2:S;lichen species clika3:R;grown on by lichen # # x1 (event) is early by standard x2 clira1:P;early clira2:S;standard of earliness clira2t:by standard # # x1 is polite/courteous/civil in matter x2 according to standard/custom x3 clite1:P;polite clite2:D;matter* handled politely clite2t:in matter clite3:S;standard for politeness clite3t:by standard # # x1 leaves/goes away/departs/parts/separates from x2 via route x3 cliva1:A;leave cliva2:P;left cliva3:D;departure route # # x1 is a loop/circuit of x2 [material] clupa1:D;loop clupa2:S;loop material clupa2t:of material # # x1 is a mathematics of type/describing x2 cmaci1:S;mathematics cmaci2:D;type* of mathematics cmaci2t:of type # # x1 is small in property/dimension(s) x2 (ka) as compared with standard/norm x3 cmalu1:P;small cmalu2:D;small dimension cmalu3:D;smallness standard cmalu3t:by standard # # x1 is a mountain/hill/mound/[rise]/[peak]/[summit]/[highlands] projecting from land mass x2 cmana1:D;mountain cmana2:D;land-mass* with mountain cmana2t:in land-mass # # x1 is a structure word of grammatical class x2, with meaning/function x3 in usage (language) x4 cmavo1:D;structure word cmavo2:D;grammatical class cmavo3:D;structure word meaning cmavo3t:with meaning cmavo4:D;language* with structure word cmavo4t:in language # # x1 (quoted word(s)) is a/the name/title/tag of x2 to/used-by namer/name-user x3 (person) cmene1:D;name cmene2:P;named cmene3:A;name # # x1 laughs (emotional expression) cmila1:A;laugh # # x1 is a member/element of set x2; x1 belongs to group x2; x1 is amid/among/amongst group x2 cmima1:D;member cmima2:D;group* with members cmima2t:group # # x1 utters moan/groan/howl/scream [non-linguistic utterance] x2 expressing x3 (property) cmoni1:A;moan cmoni2:D;moan cmoni3:R;expressed by moan cmoni3t:expressing # # x1 [value] is a norm/average in property/amount x2 (ka/ni) among x3(s) (set) by standard x4 cnano1:D;norm cnano2:D;average property cnano2t:in property cnano3:D;set* with norm cnano3t:among cnano4:S;standard for norm cnano4t:by standard # # x1 is a/the neck [body-part] of x2; [metaphor: a relatively narrow point] cnebo1:D;neck cnebo2:D;body* with neck cnebo2t:of body # # x1 (agent) rewards x2 [recipient] for atypical x3 (event/property) with reward/desserts x4 cnemu1:A;reward cnemu2:D;recipient* of reward cnemu2t:recipient cnemu3:R;justifying reward cnemu4:D;reward # # x1 is orderly/neat/ordered in property/quantity x2 (ka/ni) cnici1:P;neat cnici2:D;neat property # # x1 is new/unfamiliar/novel to observer x2 in feature x3 (ka) by standard x4; x1 is a novelty cnino1:P;new cnino2:A;observe* newness cnino3:D;novel feature cnino4:S;standard for newness cnino4t:by standard # # x1 is a quantity of/contains/is made of lead (Pb); [metaphor: heavy, malleable, soft metal] cnisa1:S;lead # # x1 is directly/vertically beneath/below/under/underneath/down from x2 in frame of reference x3 cnita1:R;beneath cnita2:R;above cnita3:D;vertical reference # # x1 soaks up/absorbs/sucks up x2 from x3 into x4; x1 is an absorbant cokcu1:A;absorb cokcu2:S;absorbed substance cokcu3:R;absorbed from cokcu4:R;absorbed into # # x1 is deep in extent in direction/property x2 away from reference point x3 by standard x4 condi1:P;deep condi2:D;deep property condi3:D;depth reference point condi3t:from condi4:D;depth standard condi4t:by standard # # x1 hurts/feels pain/hurt at locus x2 cortu1:A;feel* pain cortu2:D;locus* of pain # # x1 gets/procures/acquires/obtains/accepts x2 from source x3 [previous possessor not implied] cpacu1:A;acquire cpacu2:P;acquired cpacu3:D;source* of acquisition cpacu3t:source # # x1 is upon/atop/resting on/lying on [the upper surface of] x2 in frame of reference/gravity x3 cpana1:P;on top of cpana2:P;rested on cpana3:S;reference frame for being upon cpana3t:reference frame # # x1 climbs/clambers/creeps/crawls on surface x2 in direction x3 using x4 [limbs/tools] cpare1:A;climb cpare2:D;climbing surface cpare3:D;climbing direction cpare4:D;climbing tool # # x1 requests/asks/petitions/solicits for x2 of/from x3 in manner/form x4 cpedu1:A;request cpedu2:P;requested cpedu3:A;receive* request cpedu4:S;manner of request # # x1 is pungent/piquant/peppery/spicy/irritating to sense x2 cpina1:P;pungent cpina2:D;pungent sense # # x1 broadcasts/transmits [using radio waves] x2 via station/frequency x3 to [radio] receiver x4 cradi1:A;broadcast cradi2:P;broadcasted cradi3:D;broadcasting station cradi4:D;broadcast receiver # # x1 is anterior/ahead/forward/(in/on) the front of x2 which faces/in-frame-of-reference x3 crane1:R;forward crane2:R;behind crane3:D;forward/behind reference crane3t:in reference # # x1 is a shirt/blouse/top [upper-body garment - not necessarily sleeved or buttoned], material x2 creka1:D;shirt creka2:S;shirt material # # x1 (agent) harvests/reaps/gathers crop/product/objects x2 from source/area x3 crepu1:A;harvest crepu2:D;crop crepu3:D;crop source # # x1 is a bear/ursoid of species/breed x2 cribe1:D;bear cribe2:S;bear species cribe2t:of species # # x1 is a fairy/elf/gnome/brownie/pixie/goblin/kobold [mythical humanoid] of mythos/religion x2 crida1:D;fairy crida2:D;fairy religion crida2t:of religion # # x1 is green/verdant [color adjective] crino1:P;green # # x1 is a bridge/span over/across x2 between x3 and x4 [unordered, typically destination first] cripu1:D;bridge cripu2:P;bridged cripu3:R;linked by bridge cripu3t:between cripu4:R;linked by bridge cripu4t:and # # x1 is summer/summertime [hot season] of year x2 at location x3 crisa1:D;summer crisa2:D;year* of summer crisa3:D;location* of summer # # x1 is autumn/fall [harvest/cooling season] of year x2 at location x3 critu1:D;autumn critu2:D;year* of autumn critu3:D;location* of autumn # # x1 is a tide [cyclical/periodic expansion] in x2 caused by x3 ctaru1:D;tide ctaru2:P;tidal ctaru3:D;tide source # # x1 is a/the lip [body-part]/rim of orifice x2 of body x3; (adjective:) x1 is labial ctebi1:D;lip ctebi2:D;lipped orifice ctebi3:D;body* with lip # # x1 is a tax/levy/duty on goods/services/event x2 levied against x3 by authority/collector x4 cteki1:D;tax cteki2:D;taxed service cteki3:D;taxed person cteki4:D;tax collector # # x1 is a quantity of petroleum/oil from source x2 ctile1:S;petroleum ctile2:D;petroleum source # # x1 is a shadow/the shade of object x2, made by light/energy source x3 ctino1:D;shadow ctino2:D;object* of shadow ctino2t:object ctino3:D;light source* producing shadow ctino3t:light source # # x1 teaches audience x2 ideas/methods/lore x3 (du'u) about subject(s) x4 by method x5 (event) ctuca1:A;teach ctuca2:D;audience* of teaching ctuca3:S;ideas taught ctuca4:S;subject taught ctuca5:D;method* of teaching # # x1 is round/circular [2-dimensional shape/form]; x1 is a disk/circle/ring cukla1:P;round # # x1 is a book containing work x2 by author x3 for audience x4 preserved in medium x5 cukta1:D;book cukta2:S;work in book cukta3:D;book author cukta3t:by cukta4:D;book audience cukta5:S;book medium # # x1 is full/completely filled with x2 culno1:P;full culno2:S;filler # # x1 (event/state/property) is possible under conditions x2; x1 may/might occur; x1 is a maybe cumki1:P;possible cumki2:S;conditions for possibility # # x1 is humble/modest about x2 (abstraction); x1 displays humility about x2 cumla1:P;modest cumla2:D;subject* of modesty # # x1 is a quantity of millet [grain] of species/strain x2 cunmi1:S;millet cunmi2:S;millet species cunmi2t:of species # # x1 is random/fortuitous/unpredictable under conditions x2, with probability distribution x3 cunso1:P;random cunso2:S;random conditions cunso3:D;probability distribution # # x1 is an affair/organized activity involving person(s) x2 (ind./mass); x1 is x2's business cuntu1:D;affair cuntu2:R;involved in affair # # x1 produces x2 [product] by process x3 cupra1:A;produce cupra2:D;product cupra3:D;production process # # x1 (agent) lets/permits/allows x2 (event) under conditions x3; x1 grants privilege x2 curmi1:A;allow curmi2:P;allowed curmi3:S;conditions for allowing # # x1 is a worm/invertebrate animal of species/breed x2 curnu1:D;worm curnu2:S;worm species curnu2t:of species # # x1 is pure/unadulterated/unmitigated/simple in property x2 (ka) curve1:P;pure curve2:D;pure property # # x1 (agent) expresses/says x2 (sedu'u/text/lu'e concept) for audience x3 via expressive medium x4 cusku1:A;say cusku2:P;said cusku3:S;audience cusku4:S;medium of expression # # x1 is a shoe/boot/sandal for covering/protecting [feet/hooves] x2, and of material x3 cutci1:D;shoe cutci2:D;shod foot cutci2n:shod foot/feet cutci3:S;shoe material # # x1 is a/the chest/thorax/upper trunk/[rib cage/breast] [body-part] of x2 cutne1:D;chest cutne2:D;body* with chest # # x1 chooses/selects x2 [choice] from set/sequence of alternatives x3 (complete set) cuxna1:A;choose cuxna2:P;chosen cuxna3:S;alternatives for choice cuxna3t:alternatives # # x1 is a drawer/file in structure x2, a [sliding compartment] container for contents x3 dacru1:D;file dacru2:D;filing unit dacru3:S;file contents # # x1 is a material object enduring in space-time; x1 is a thing dacti1:D;object # # x1 pertains to the Taoist culture/ethos/religion in aspect x2 dadjo1:P;Taoist dadjo2:D;Taoist aspect # # x1 is a knife (tool) for cutting x2, with blade of material x3 dakfu1:D;knife dakfu1n:knife(ves) dakfu2:R;cut by knife dakfu3:S;knife blade material dakfu3t:blade material # # x1 is a sack/bag with contents x2, and of material x3 dakli1:D;bag dakli2:S;bag contents dakli3:S;bag material # # x1 fights/combats/struggles with x2 over issue x3 (abstract); x1 is a fighter/combatant damba1:A;fight damba2:R;fought against damba3:D;reason* for fight damba3t:over issue # # x1 is a drum/cymbal/gong [percussion musical instrument] with beater/actuator x2 damri1:D;percussion instrument damri1t:instrument damri2:D;percussion instrument beater damri2t:with beater # # x1 hangs/dangles/is suspended from x2 by/at/with joint x3 dandu1:R;suspended dandu2:D;hanging support dandu3:S;means of suspension dandu3t:by means # # x1 is the answer/response/solution/[reply] to question/problem x2 danfu1:D;answer danfu2:D;answered problem # # x1 is an animal/creature of species x2; x1 is biologically animate danlu1:D;animal danlu2:S;animal species # # x1 is made of/contains/is a quantity of smoke/smog/air pollution from source x2 danmo1:S;smoke danmo2:D;source* of smoke # # x1 (force) puts pressure on/presses/applies force to x2 danre1:I;apply* pressure danre2:R;subject to pressure # # x1 (individual, mass) dances to accompaniment/music/rhythm x2 dansu1:A;dance dansu2:D;dance accompaniment # # x1 is a ballistic projectile [e.g. bullet/missile] for firing by [gun/propelling launcher] x2 danti1:D;projectile danti2:D;projectile launcher # # x1 is an island/atoll/key of [material/properties] x2 in surroundings/body x3; x1 is insular daplu1:D;island daplu2:D;island material daplu2t:material daplu3:S;island surroundings daplu3t:surroundings # # x1 curses/damns/condemns x2 to fate (event) x3 dapma1:A;condemn dapma2:P;condemned dapma3:S;fate # # x1 is a road/highway to x2 from x3 with route x4 (x2/x3 may be unordered) dargu1:D;highway dargu2:D;destination* of highway dargu3:D;origin* of highway dargu4:D;route* of highway # # x1 argues for stand x2 against stand x3; [an opponent is not necessary] darlu1:A;present* an argument darlu2:R;argued for darlu3:R;argued against # # x1 is far/distant from x2 in property x3 (ka) darno1:P;distant darno2:D;distant reference darno2t:reference darno3:D;distant property darno3t:property # # x1 shows audacity/chutzpah in behavior x2 (event/activity); x1 dares to do/be x2 (event/ka) darsi1:A;show* audacity darsi2:D;audacious behaviour # # x1 hits/strikes/[beats] x2 with instrument [or body-part] x3 at locus x4 darxi1:A;strike darxi2:P;struck darxi3:D;striking instrument darxi3t:instrument darxi4:D;locus of strike darxi4n:locus/i of strike darxi4t:locus # # x1 is a pocket/pouch of/in garment/item x2 daski1:D;pocket daski2:D;garment* with pocket # # x1 wears/is robed/garbed in x2 as a garment of type x3 dasni1:A;wear dasni2:D;worn garment dasni3:D;type* of worn garment # # x1 (event) destroys/ruins/wrecks/despoils x2; x1 is destructive daspo1:A;destroy daspo2:P;destroyed # # x1 is a ribbon/tape/strip/band/stripe of material x2 dasri1:D;ribbon dasri2:D;ribbon material dasri2t:material # # x1 is a duck/[drake] of species/breed x2 datka1:D;duck datka2:S;duck species # # x1 (du'u) [fact/measurement] is data/information/statistic(s) about x2 gathered by method x3 datni1:S;data datni2:D;data subject datni3:D;data gathering method # # x1 is a tenth [1/10; 1x10**-1] of x2 in dimension/aspect x3 (default is units) decti1:D;tenth decti2:R;measured in tenths decti2t:of decti3:D;tenth aspect decti3t:in aspect # # x1 is a/the finger/digit/toe [body-part] on limb/body site x2 of body x3; [metaphor: peninsula] degji1:D;finger*/toe* degji2:D;limb* with digit degji3:D;body* with digit # # x1 owes x2 in debt/obligation to creditor x3 in return for x4 [service, loan]; x1 is a debtor dejni1:D;debtor dejni2:D;debt dejni3:D;creditor dejni4:D;reason* for debt # # x1 is x2 (default 1) local volume unit(s) [non-metric; e.g. bushel], standard x3, x4 subunits dekpu1:R;with volume dekpu2:D;volume amount dekpu3:D;volume unit dekpu4:D;volume subunit # # x1 is ten [10; 1*10**1] of x2 in dimension/aspect x3 (default is units) dekto1:D;ten dekto2:R;measured in tens dekto3:D;tens aspect # # x1 is x2 candela [metric unit] in luminosity (default is 1) by standard x3 delno1:R;measured in candelas delno2:D;number* of candelas delno3:S;candela standard # # x1 is a bean/pea/leguminous seed from plant [legume] x2 dembi1:D;leguminous seed dembi2:D;leguminous plant # # x1 is a/the tooth [body-part] of x2; (adjective:) x1 is dental denci1:D;tooth denci1n:tooth/teeth denci1a:dental denci2:D;body* with teeth # # x1 is dense/concentrated/packed/intense in property x2 (ka) at location/locus x3 denmi1:P;concentrated denmi2:D;concentrated property denmi3:S;locus of concentration # # x1 awaits/waits/pauses for/until x2 at state x3 before starting/continuing x4 (activity/process) denpa1:A;wait denpa2:P;waited for denpa3:D;waiting state denpa4:D;paused activity # # x1 is a quantity of/contains/is made of dirt/soil/earth/ground from source x2 of composition x3 dertu1:S;earth dertu2:D;earth source dertu3:S;earth composition dertu3t:composition # # x1 is a heap/pile/stack/mound/hill of materials x2 at location x3 derxi1:D;heap derxi2:S;heaped materials derxi3:D;heap location # # x1 shakes/quakes/trembles/quivers/shudders/wobbles/vibrates from force x2 desku1:P;vibrating desku2:D;force* causing vibration desku2t:due to force # # x1 is the date [day,{week},{month},year] of event/state x2, at location x3, by calendar x4 detri1:D;date detri2:D;dated event detri2t:of event detri3:D;location* with date detri3t:at location detri4:D;calendar* defining date detri4t:by calendar # # x1 (event) interrupts/stops/halts/[disrupts] x2 (object/event/process) due to quality x3 dicra1:A;interrupt dicra2:P;interrupted dicra3:D;reason* for interruption dicra3t:due to # # x1 is electricity [electric charge or current] in/on x2 of polarity/quantity x3 (def. negative) dikca1:S;electricity dikca2:R;with electrical charge dikca3:D;amount* of electricity # # x1 is local to x2; x1 is confined to locus x2 within range x3 diklo1:P;local diklo2:D;centre* of locality diklo2t:to locus diklo3:S;range of locality diklo3t:within range # # x1 is regular/cyclical/periodic in property (ka)/activity x2 with period/interval x3 dikni1:P;regular dikni2:D;regular property dikni3:D;repeat period # # x1 is a quotient of 'x2/x3' [dividend x2 divided by divisor x3], leaving remainder x4 dilcu1:D;quotient dilcu2:D;divisor dilcu3:D;dividend dilcu4:D;remainder # # x1 is a cloud of material x2 in air mass x3 at floor/base elevation x4 dilnu1:D;cloud dilnu2:D;cloud material dilnu3:D;air mass* containing cloud dilnu4:D;cloud base # # x1 is a fate/destiny of x2; [doom, curse are mabla-forms]; x2 is fated/predestined/doomed to x1 dimna1:D;destiny dimna2:R;having destiny # # x1 is a building/edifice for purpose x2 dinju1:D;building dinju2:D;building purpose dinju2t:for purpose # # x1 is a nail/tack [pointed driven/frictional fastener] of type/size x2 (ka), made of material x3 dinko1:D;nail dinko2:D;nail type dinko2t:of type dinko3:D;nail material dinko3t:of material # # x1 is dear/precious/darling to x2; x1 is emotionally valued by x2 dirba1:P;precious dirba2:A;hold* something dear # # x1 radiates/emits x2 under conditions x3 dirce1:A;radiate dirce2:P;radiated dirce3:S;conditions for radiation # # x1 is a drop [small, cohesive shape] of material [liquid/vapor] x2 in surrounding material x3 dirgo1:D;drop dirgo2:S;drop-forming material dirgo2t:of material dirgo3:R;containing drop dirgo3t:in # # x1 is low/down/downward in frame of reference x2 as compared with baseline/standard height x3 dizlo1:P;low dizlo2:D;lowness frame of reference dizlo3:D;lowness standard # # x1 is made of/contains/is a quantity/expanse of water; (adjective:) x1 is aqueous/[aquatic] djacu1:S;water # # x1 is x2 full days in duration (default is 1 day) by standard x3; (adjective:) x1 is diurnal djedi1:D;full day djedi2:S;number of full days djedi3:D;standard* defining full day # # x1 desires/wants/wishes x2 (event/state) for purpose x3 djica1:A;desire djica2:P;desired djica3:D;purpose* of desire # # x1 is a ring/annulus/torus/circle [shape/form] of material x2, inside diam. x3, outside diam. x4 djine1:D;ring djine2:S;ring material djine2t:of material djine3:D;inside ring diameter djine4:D;outside ring diameter # # x1 knows fact(s) x2 (du'u) about subject x3 by epistemology x4 djuno1:A;know djuno2:D;fact* known djuno3:D;known subject* djuno4:D;epistemology for knowing # # x1 is the daytime of day x2 at location x3; (adjective:) x1 is diurnal (vs. nocturnal) donri1:D;day-time donri2:D;day* having daytime donri3:D;location* of daytime # # x1 reflects German/Germanic culture/nationality/language in aspect x2 dotco1:P;German dotco2:D;German aspect # # x1 is a drama/play about x2 [plot/theme/subject] by dramatist x3 for audience x4 with actors x5 draci1:D;drama draci2:D;drama plot draci2t:plot draci3:D;dramatist draci4:D;drama audience draci4t:audience draci5:D;drama actor draci5t:actors # # x1 is correct/proper/right/perfect in property/aspect x2 (ka) in situation x3 by standard x4 drani1:P;correct drani2:D;correct property drani2t:in property drani3:D;correct situation drani3t:in situation drani4:D;correctness standard drani4t:by standard # # x1 isn't the-same-thing-as/is different-from/other-than x2 by standard x3; x1 is something else drata1:P;different drata2:D;reference* for being different drata3:D;standard* for being different # # x1 is a roof/top/ceiling/lid of x2 drudi1:D;lid drudi2:P;lidded # # x1 is the logarithm of x2 with base x3 dugri1:D;logarithm dugri2:R;having logarithm dugri3:D;logarithm base # # x1 is an excess of/too much of x2 by standard x3 dukse1:D;excess dukse2:P;in excess dukse3:S;standard for excess dukse3t:by standard # # x1 is polar opposite from/contrary to x2 in property/on scale x3 (property/si'o) dukti1:P;contrary dukti2:R;having opposite dukti2t:to dukti3:D;scale* of opposites dukti3t:on scale # # x1 [donor] gives/donates gift/present x2 to recipient/beneficiary x3 [without payment/exchange] dunda1:A;give dunda2:D;gift dunda3:D;recipient # # x1 freezes/jells/solidifies at temperature x2 and pressure x3 dunja1:P;freezing dunja2:D;freezing temperature dunja2t:at temperature dunja3:D;freezing pressure dunja3t:at pressure # # x1 is anguished/distressed/emotionally wrought/stressed by x2 dunku1:P;distressed dunku2:D;stressor # # x1 is equal/congruent to/as much as x2 in property/dimension/quantity x3 dunli1:P;equal dunli2:D;equality reference dunli3:D;equality property # # x1 is winter/wintertime [cold season] of year x2 at location x3 dunra1:D;winter dunra2:D;winter year dunra2t:of year dunra3:D;winter location dunra3t:at location # # x1 is an elder/ancestor of x2 by bond/tie/degree x3; x1's generation precedes x2's parents dzena1:D;ancestor dzena2:D;descendent # # x1 reflects Antarctican culture/nationality/geography in aspect x2 dzipo1:P;Antarctican dzipo2:D;Antarctican aspect # # x1 discovers/finds out x2 (du'u) about subject/object x3; x1 finds (fi) x3 (object) facki1:A;discover facki2:D;discovery facki3:D;discovery subject facki3t:about # # x1 [member] is ordinary/common/typical/usual in property x2 (ka) among members of x3 (set) fadni1:P;typical fadni2:D;typical property fadni2t:in property fadni3:D;group* of typical things fadni3t:in group # # x1 is a fire/flame in fuel x2 burning-in/reacting-with oxidizer x3 (default air/oxygen) fagri1:S;fire fagri2:D;fuel fagri3:D;oxidizer # # x1 is a sail for gathering propelling material x2 on vehicle/motor x3 falnu1:D;sail falnu2:S;material driving sail falnu3:R;propelled by sail # # x1 is an aunt/uncle of x2 by bond/tie x3; x1 is an associated member of x2's parent's generation famti1:D;aunt*/uncle* famti2:R;having aunt/uncle famti2t:of famti3:D;aunt/uncle relationship # # x1 is a function/single-valued mapping from domain x2 to range x3 defined by expression/rule x4 fancu1:D;function fancu2:D;function domain fancu2t:from domain fancu3:D;function range fancu3t:to range fancu4:D;function definition fancu4t:defined by # # x1 is alien/foreign/[exotic]/unfamiliar to x2 in property x3 (ka) fange1:P;alien fange2:R;perceiving alien fange3:D;alien property # # x1 is an end/finish/termination of thing/process x2; [not necessarily implying completeness] fanmo1:P;final fanmo2:D;ending process # # x1 is a factory/foundry/industrial plant/mill producing x2 from materials x3 fanri1:D;factory fanri2:D;factory product fanri2t:product fanri3:D;raw material # # x1 prevents/keeps/stops/restrains/constrains event x2 from occurring fanta1:A;prevent fanta2:D;prevented event # # x1 translates text/utterance x2 to language x3 from language x4 with translation result x5 fanva1:A;translate fanva2:D;source text* for translation fanva3:D;target language* for translation fanva4:D;source language* for translation fanva5:D;result* of translation # # x1 (event) annoys/irritates/bothers/distracts x2 fanza1:A;annoy fanza2:P;annoyed # # x1 opposes/balances/contends against opponent(s) x2 (person/force ind./mass) about x3 (abstract) fapro1:A;oppose fapro2:D;opponent fapro3:D;contested issue # # x1 falls/drops to x2 from x3 in gravity well/frame of reference x4 farlu1:A;fall farlu2:D;destination* of fall farlu2t:destination farlu3:D;origin* of fall farlu3t:origin farlu4:D;frame of reference for fall farlu4t:frame of reference # # x1 is the direction of x2 (object/event) from origin/in frame of reference x3 farna1:D;direction farna2:R;found in direction farna3:D;origin* of direction # # x1 develops/evolves towards/into x2 from x3 through stages x4 farvi1:A;evolve farvi2:P;evolved farvi3:R;yet to evolve farvi4:D;evolution stage # # x1 (event) is an event that happens/occurs/takes place; x1 is an incident/happening/occurrence fasnu1:D;occurrence fasnu1v:occurring # # x1 (du'u) is a fact/reality/truth/actuality, in the absolute fatci1:D;fact # # x1 [sequence] is in reverse order from x2 [sequence]; x1 (object) is inverted from x2 (object) fatne1:P;reversed fatne2:D;original sequence fatne2t:original # # x1 is distributed/allotted/allocated/shared among x2 with shares/portions x3; (x2/x3 fa'u) fatri1:P;distributed fatri2:R;receiving share fatri3:D;portion # # x1 boils/evaporates at temperature x2 and pressure x3 febvi1:P;boiling febvi2:S;boiling temperature febvi2t:at temperature febvi3:S;boiling pressure febvi3t:at pressure # # x1 is 1x10**-15 of x2 in dimension/aspect x3 (default is units) femti1:D;10**-15 femti2:R;measured in 10**-15's femti3:D;10**-15 aspect # # x1 (agent) divides/partitions/separates x2 into sections/parts/ind. x3 by method/partition x4 fendi1:P;dividing fendi2:P;divided fendi3:D;partition fendi4:D;division method # # x1 is angry/mad at x2 for x3 (action/state/property) fengu1:P;angry fengu2:D;anger target fengu3:D;anger reason # # x1 (action/event) is crazy/insane/mad/frantic/in a frenzy (one sense) by standard x2 fenki1:P;crazy fenki2:D;standard* for craziness # # x1 is a crack/fissure/pass/cleft/ravine/chasm/[defect/flaw] [shape/form] in x2 fenra1:D;crack fenra2:P;cracked # # x1 sews/stitches/sutures materials x2 (ind./set) together with tool(s) x3, using filament x4 fenso1:A;stitch fenso2:D;sewn material fenso3:D;sewing tool fenso4:D;sewing thread # # x1 is measured in kopeck/cent money-subunits as x2 [quantity], in monetary system x3 fepni1:R;measured in money subunits fepni2:D;quantity* of money subunits fepni3:D;monetary system # # x1 is a/the lung [body-part] of x2; [metaphor: breathing/respiratory apparatus/bellows] fepri1:D;lung fepri2:D;body* with lung fepri2t:in body # # x1 is fertile/conducive for supporting the growth/development of x2; x1 is fruitful/prolific ferti1:P;fertile ferti2:P;having growth encouraged # # x1(s) is/are waste product(s) [left to waste] by x2 (event/activity) festi1:S;waste festi2:P;wasteful # # x1 is a female/doe of species x2 evidencing feminine trait(s) x3 (ka); x1 is feminine fetsi1:D;female fetsi2:S;species with female fetsi2t:of species fetsi3:D;feminine trait # # x1 is a fig [fruit/tree] of species/strain x2 figre1:D;fig figre2:S;fig species figre2t:of species # # x1 reflects Palestinian culture/nationality in aspect x2 filso1:P;Palestinian filso2:D;Palestinian aspect # # x1 is a fish of species x2 [metaphorical extension to sharks, non-fish aquatic vertebrates] finpe1:D;fish finpe2:S;fish species # # x1 invents/creates/composes/authors x2 for function/purpose x3 from existing elements/ideas x4 finti1:A;create finti2:D;creation finti3:S;purpose of creation finti4:S;elements in creation # # x1 is a law specifying x2 (state/event) for community x3 under conditions x4 by lawgiver(s) x5 flalu1:D;law flalu2:R;specified by law flalu3:D;legislated community flalu4:S;law conditions flalu5:D;lawgiver # # x1 is a flute/pipe/fife/recorder [flute-like/air-reed musical instrument] flani1:D;flute # # x1 is a current/flow/river of/in x2 flowing in direction to/towards x3 from direction/source x4 flecu1:D;current flecu2:R;having current flecu3:D;current destination flecu4:D;current source # # x1 fails at doing x2 (state/event); x1 is a failure at its role in x2 fliba1:A;fail fliba2:R;failed at # # x1 is a/the face [head/body-part] of x2; (adjective:) x1 is facial flira1:D;face flira1q:facial flira2:I;have* face flira2t:of # # x1 is a field [shape/form] of material x2; x1 is a broad uniform expanse of x2 foldi1:D;field foldi2:S;field material foldi2t:of material # # x1 is a quantity of foam/froth/suds of material x2, with bubbles/vacuoles of material x3 fonmo1:S;foam fonmo2:S;foam material fonmo2t:of material fonmo3:D;bubble # # x1 is a telephone transceiver/modem attached to system/network x2 fonxa1:D;telephone fonxa2:D;telephone system # # x1 is a fork/fork-type tool/utensil for purpose x2 with tines/prongs x3 on base/support x4 forca1:D;fork forca2:D;fork purpose forca3:S;prongs forca4:D;fork base # # x1 reflects French/Gallic culture/nationality/language in aspect x2 fraso1:P;French fraso2:D;French aspect # # x1 reacts/responds/answers with action x2 to stimulus x3 under conditions x4; x1 is responsive frati1:A;respond frati2:D;response frati3:D;stimulus frati3n:stimulus/stimuli frati4:S;response conditions frati4t:under conditions # # x1 forgives x2 for event/state/activity x3 fraxu1:A;forgive fraxu2:A;receive forgiveness fraxu3:P;forgiven # # x1 differs/is distinct from/contrasts with/is unlike x2 in property/dimension/quantity x3 frica1:P;different frica2:R;contrasted frica3:D;difference property # # x1 reflects African culture/nationality/geography in aspect x2 friko1:P;African friko2:D;African aspect # # x1 (action) is easy/simple/facile for x2 (agent) under conditions x3; x2 does x1 freely/easily frili1:P;easy frili2:D;person* for whom easy frili3:D;condition* for ease # # x1 is a fraction, with numerator x2, denominator x3 (x2/x3) frinu1:D;fraction frinu2:D;numerator frinu3:D;denominator # # x1 offers/proffers x2 [offering] to x3 with conditions x4 friti1:A;offer friti2:D;offering friti3:R;receiving offering friti4:S;offer conditions friti4t:under conditions # # x1 frowns/grimaces (facial expression) frumu1:A;frown # # x1 is a copy/replica/duplicate/clone of x2 in form/medium x3 made by method x4 (event) fukpi1:D;copy fukpi2:P;copied fukpi3:S;copy media fukpi4:D;copying method # # x1 (passive) floats on/in fluid (gas/liquid) x2; x1 is buoyant fulta1:A;float fulta2:R;floated on # # x1 (event/property) is determined by the luck/fortune of x2; (note mabla/zabna not implied) funca1:R;determined by fortune funca2:R;having fortune # # x1 rots/decays/ferments with decay/fermentation agent x2; x1 is rotten/decayed/fermented fusra1:P;rotting fusra2:R;encouraging rotting # # x1 is responsible/accountable for x2 (action/resulting state) to judge/authority x3 fuzme1:P;responsible fuzme2:D;responsibility fuzme3:R;holding responsible # # x1 is a cover/[lid/top] for covering/concealing/sheltering x2 gacri1:D;cover gacri2:P;covered # # x1 is an article/descriptor labelling description x2 (text) in language x3 with semantics x4 gadri1:D;article gadri2:R;labelled by article gadri3:D;article language gadri4:S;article semantics # # x1 (event) modifies/alters/changes/transforms/converts x2 into x3 galfi1:A;modify galfi2:P;modified galfi3:D;modification result galfi3t:into # # x1 is high/up/upward in frame of reference x2 as compared with baseline/standard height x3 galtu1:P;high galtu2:D;height frame of reference galtu3:D;standard height # # x1 is a/the throat/gullet [body-part] of x2; [metaphor: narrow(ing) opening of a deep hole] galxe1:D;throat galxe2:D;body* with throat galxe2t:of body # # x1 (portal/passage/entrance-way) is closed/shut/not open, preventing passage/access to x2 by x3 ganlo1:P;closed ganlo2:P;inaccessible ganlo3:P;blocked # # x1 is broad/wide in dimension x2 [2nd most significant dimension] by standard x3 ganra1:P;broad ganra2:D;broad dimension ganra3:D;broadness standard ganra3t:by standard # # x1 [observer] senses/detects/notices stimulus property x2 (ka) by means x3 under conditions x4 ganse1:A;detect ganse2:P;detected ganse3:S;detection means ganse4:S;detection conditions ganse4t:under conditions # # x1 is a/the testes/ovary/testicle/scrotum/balls/gonad/stamen/pistil [body-part] of x2, gender x3 ganti1:D;gonad ganti2:R;having gonad ganti3:D;gonad gender # # x1 is a/the anus/anal orifice/asshole/arsehole [body-part] of x2; [metaphor: exit, waste exit] ganxo1:S;anus ganxo2:R;having anus # # x1 organizes x2 [relative chaos] into x3 [ordered/organized result] by system/principle(s) x4 ganzu1:A;organize ganzu2:P;chaotic ganzu3:P;organized ganzu4:D;organisation method ganzu4t:by method # # x1 is gaseous/fumes/a gas/vapor of material/composition including x2, under conditions x3 gapci1:S;gas gapci2:S;gas composition gapci3:S;gas conditions # # x1 is directly/vertically above/upwards-from x2 in gravity/frame of reference x3 gapru1:R;above gapru2:R;below gapru3:D;vertical reference # # x1 is a rail/railing/bar [tool] supporting/restraining x2, of material x3 garna1:D;rail garna2:R;supported by rail garna3:S;rail material garna3t:of material # # x1 [person/agent] is an agentive cause of event x2; x1 does/brings about x2 gasnu1:I;bring* about gasnu2:R;brought about # # x1 is a quantity of/is made of/contains steel of composition including x2 gasta1:S;steel gasta2:S;steel composition gasta2:of composition # # x1 is a root [body-part] of plant/species x2; [metaphor: immobile, supporting, nourishing] genja1:D;root genja2:R;having root # # x1 reflects Argentinian culture/nationality in aspect x2 gento1:P;Argentinian gento2:D;Argentinian aspect # # x1 is a hook/crook [shape/form] of material x2 genxu1:D;hook genxu2:S;hook material genxu2t:of material # # x1 is a dog/canine/[bitch] of species/breed x2 gerku1:D;dog gerku2:D;dog breed # # x1 is the grammar/rules/defining form of language x2 for structure/text x3 gerna1:D;grammar gerna2:R;defined by grammar gerna3:D;grammatical structure # # x1 (person/object/event) guides/conducts/pilots/leads x2 (active participants) in/at x3 (event) gidva1:A;lead gidva2:P;led gidva3:D;guided event # # x1 is a billion [British milliard] [1x10**9] of x2 in dimension/aspect x3 (default is units) gigdo1:D;10**9 gigdo2:R;measured in 10**9s gigdo3:D;10**9 aspect # # x1 is a camp/encampment/temporary residence of x2 at location x3 ginka1:D;camp ginka2:P;camped ginka3:D;camp location # # x1 is group/cluster/team showing common property (ka) x2 due to set x3 linked by relations x4 girzu1:D;group girzu2:D;group property girzu3:S;set containing group girzu4:D;group relation # # x1 is a (Lojban) root word expressing relation x2 among argument roles x3, with affix(es) x4 gismu1:D;root word gismu2:D;root word relation gismu3:D;word argument role gismu4:D;word affix # # x1 is hot/[warm] by standard x2 glare1:P;hot glare2:D;heat standard # # x1 is happy/gay/merry/glad/gleeful about x2 (event/state) gleki1:P;happy gleki2:D;subject* of happiness # # x1 copulates/fucks/mates/has coitus/sexual intercourse with x2 gletu1:A;copulate gletu2:A;copulate # # x1 is English/pertains to English-speaking culture in aspect x2 glico1:P;English glico2:D;English aspect # # x1 is a mitten/glove [hand and lower arm garment] of material x2 gluta1:D;glove gluta2:S;glove material gluta2t:of material # # x1 is 1x10**-24 of x2 in dimension/aspect x3 (default is units) gocti1:D;10**-24 gocti2:R;measured in 10**-24 gocti3:D;10**-24 aspect # # x1 is 1x10**24 of x2 in dimension/aspect x3 (default is units) gotro1:D;10**24 gotro2:R;measured in 10**24 gotro3:D;10**24 aspect # # x1 [magnitude] is a unit/degree of/on scale/reference standard x2 (si'o) measuring property x3 gradu1:D;unit gradu2:D;unit standard gradu3:D;unit property # # x1 is x2 gram(s) [metric unit] in mass (default is 1) by standard x3 grake1:R;weighed in grams grake2:S;weight in grams grake3:D;gram standard # # x1 is a rod/pole/staff/stick/cane [shape/form] of material x2 grana1:D;rod*/pole* grana2:S;rod material # # x1 is a quantity of/is made of/contains grease/fat/oil from source x2 grasu1:S;grease grasu2:D;grease source # # x1 is a frame/structure/skeleton/outline supporting/load-bearing/determining the form of x2 greku1:D;frame greku2:R;supported by frame # # x1 is gray [color adjective] grusi1:P;gray # # x1 is a fruit [body-part] of species x2 grute1:D;fruit grute2:S;fruit species # # x1 is public/un-hidden/open/jointly available to/owned by all among community x2 (mass) gubni1:P;public gubni2:D;community # # x1 is the country of peoples x2 with land/territory x3; (people/territory relationship) gugde1:D;country gugde2:D;people* of country gugde3:D;land*/territory* # # x1 is industry/industrial/systematic manufacturing activity producing x2 by process/means x3 gundi1:S;industry gundi2:R;produced by industry gundi3:D;industrial process # # x1 [person] labors/works on/at x2 [activity] with goal/objective x3 gunka1:A;work gunka2:D;work activity gunka2t:activity gunka3:D;work goal gunka3t:goal # # x1 is a mass/team/aggregate/whole, together composed of components x2, considered jointly gunma1:D;aggregate gunma2:D;component* of aggregate # # x1 rolls/trundles on/against surface x2 rotating on axis/axle x3; x1 is a roller gunro1:A;roll gunro2:D;rolling surface gunro3:D;axle # # x1 is a goose/[gander] of species/breed x2 gunse1:D;goose gunse1n:goose/geese gunse2:S;goose species gunse2t:of species # # x1 (person/mass) attacks/invades/commits aggression upon victim x2 with goal/objective x3 gunta1:A;attack gunta2:P;attacked gunta3:D;attack goal # # x1 is grain/[British: corn]/cereal from plant/species x2 gurni1:S;grain gurni2:S;grain species gurni2t:of species # # x1 blade/scraper/erosive scrapes/erodes/abrades x2 from x3 guska1:D;blade guska2:S;scrapings guska3:P;eroded # # x1 [energy] is light/illumination illuminating x2 from light source x3 gusni1:S;light gusni2:P;illuminated gusni3:D;light source # # x1 is a restaurant/cafe/diner serving type-of-food x2 to audience x3 gusta1:D;restaurant gusta2:S;restaurant food gusta2t:food gusta3:D;restaurant customer gusta3t:customer # # x1 is x2 (default 1) short local distance unit(s) [non-metric], standard x3, x4 subunits gutci1:R;measured in distance units gutci2:S;number of distance units gutci3:D;distance standard gutci4:D;distance subunit # # x1 is a/the womb/uterus [body-part] of x2; [metaphor: nourishing, protective, giving birth] gutra1:D;womb gutra2:D;body* with womb gutra2t:of body # # x1 is a melon/squash [fruit/plant] of species/strain x2 guzme1:D;melon guzme2:S;melon species guzme2t:of species # # x1 brakes/causes to slow motion/activity x2 with device/mechanism/principle x3 jabre1:I;slow jabre2:P;slowed jabre3:S;means for slowing # # x1 (object) adorns/decorates x2; x1 is an adornment/decoration of x2; x2 is fancy/decorated jadni1:I;adorn jadni2:P;adorned # # x1 is a rocket [vehicle] propelled by jet expelling x2 carrying payload x3 jakne1:D;rocket jakne2:R;expelled by rocket jet jakne3:D;rocket payload # # x1 (action/event/state) is a result/outcome/conclusion of antecedent x2 (event/state/process) jalge1:D;outcome jalge2:I;cause* outcome # # x1 is a quantity of/contains/is made of starch from source x2 of composition including x3 jalna1:S;starch jalna2:D;starch source jalna2t:from source jalna3:S;starch composition jalna3t:with composition # # x1 is a cockroach/[orthopteran/termite] of order/species/breed x2 jalra1:D;cockroach jalra2:S;cockroach species jalra2t:of species # # x1 is a/the foot [body-part] of x2; [metaphor: lowest portion] (adjective:) x1 is pedal jamfu1:D;foot jamfu1n:foot/feet jamfu2:D;body* having foot # # x1 (person/mass) wars against x2 over territory/matter x3; x1 is at war with x2 jamna1:R;at war jamna2:R;at war jamna3:D;reason* for war # # x1 is a bell/chime/[tuning fork] [tuned percussion instrument] producing sound/note x2 janbe1:D;bell janbe2:D;chime # # x1 is a/the shoulder/hip/joint [body-part] attaching limb/extremity x2 to body x3 janco1:D;shoulder*/hip* janco2:D;limb* with end joint janco3:D;body* with joined limb # # x1 collides with/crashes/bumps/runs into x2 janli1:I;collide janli2:R;collided with # # x1 is a diplomat/consul representing polity x2 in/at negotiation x3 for function/purpose x4 jansu1:D;diplomat jansu2:R;represented by diplomat jansu2t:representing polity jansu3:D;diplomatic negotiation jansu3t:at negotiation jansu4:D;purpose* of diplomat jansu4t:for purpose # # x1 is an account/bill/invoice for goods/services x2, billed to x3 by x4 janta1:D;invoice janta2:S;invoiced goods janta3:A;receive* invoice janta4:A;send* invoice # # x1 is a suburban area of city/metropolis x2 jarbu1:D;suburban area jarbu2:R;with suburban area jarbu2t:of city # # x1 (agent) shows/exhibits/displays/[reveals]/demonstrates x2 (property) to audience x3 jarco1:A;show*/display* jarco2:D;shown property jarco3:S;audience of display # # x1 is narrow in dimension x2 [2nd most significant dimension] by standard x3 jarki1:P;narrow jarki2:D;narrow dimension jarki2t:in dimension jarki3:S;standard for narrowness jarki3t:by standard # # x1 is a passport issued to x2 (person) by authority x3 allowing x4 (activity) jaspu1:D;passport jaspu2:A;hold* passport jaspu3:A;issue* passport jaspu4:D;activity* allowed by passport jaspu4t:allowing # # x1 is captain/commander/leader/in-charge/boss of vehicle/domain x2 jatna1:D;commander jatna2:D;domain* of command jatna2t:over domain # # x1 is a rule prescribing/mandating/requiring x2 (event/state) within system/community x3 javni1:D;rule javni2:R;mandated by rule javni2t:mandating javni3:D;system* having rule javni3t:in system # # x1 is a bomb/explosive device with explosive material/principle x2 jbama1:D;bomb jbama2:S;means of explosion # # x1 is a berry (fruit/plant) of plant/species x2 jbari1:D;berry jbari2:S;berry species jbari2t:of species # # x1 is born to x2 at time x3 [birthday] and place x4 [birthplace]; x1 is native to (fo) x4 jbena1:P;born jbena2:A;give* birth jbena3:D;time* of birth jbena4:D;place* of birth # # x1 (agent) borrows/temporarily takes/assumes x2 (object) from source x3 for interval x4 jbera1:A;borrow jbera2:P;borrowed jbera3:A;lend jbera4:D;lending interval # # x1 is between/among set of points/bounds/limits x2 (set)/amidst mass x2 in property x3 (ka) jbini1:R;between jbini2:P;surrounding jbini3:D;betweenness property # # x1 is firm/hard/resistant/unyielding to force x2 under conditions x3 jdari1:P;firm jdari2:D;resisted force jdari3:S;firmness conditions # # x1 (person) decides/makes decision x2 (du'u) about matter x3 (event/state) jdice1:A;decide jdice2:D;decision jdice3:D;matter* of decision jdice3t:matter # # x1 (experiencer) decreases/contracts/is reduced/diminished in property/quantity x2 by amount x3 jdika1:A;decrease jdika2:D;decreasing property jdika2t:property jdika3:D;decrease amount jdika3t:amount # # x1 [amount] is the price of x2 to purchaser/consumer x3 set by vendor x4 jdima1:D;price jdima2:P;priced jdima3:D;purchaser jdima4:D;pricing vendor # # x1 is money/currency issued by x2; (adjective:) x1 is financial/monetary/pecuniary/fiscal jdini1:S;money jdini2:R;issuing money # # x1 is a quantity of jelly/semisolid [texture] of material/composition including x2 jduli1:S;jelly jduli2:S;jelly composition # # x1 is a polity/state governing territory/domain x2; [government/territory relationship] jecta1:D;polity jecta2:P;governed # # x1 is x2 weeks in duration (default is 1 week) by standard x3 jeftu1:R;lasting weeks jeftu2:S;number of weeks jeftu3:D;weeks standard # # x1 pertains to the common Judeo-Christian-Moslem culture/religion/nationality in aspect x2 jegvo1:P;Jehovist jegvo2:D;Jehovist aspect # # x1 burns/[ignites/is flammable/inflammable] at temperature x2 in atmosphere x3 jelca1:P;burning jelca2:D;burn temperature jelca3:D;burn atmosphere # # x1 is a gem/polished stone/pearl of type x2 from gemstone/material/source x3 jemna1:D;gem jemna2:D;gem type jemna3:D;gemstone # # x1 (event) shocks/stuns x2 jenca1:P;shocking jenca2:P;shocked # # x1 is an axle/spindle [tool] on which x2 rotates, of material/properties x3 jendu1:D;spindle jendu2:R;rotating on spindle jendu3:D;spindle material # # x1 (mass) is an army serving group/community x2 (mass) in function x3 (activity) jenmi1:D;army jenmi2:R;served by army jenmi3:D;army function # # x1 (agent/person) earns/[deserves/merits] wages/salary/pay x2 for work/service x3 (activity) jerna1:A;earn jerna2:D;salary jerna3:D;salaried work # # x1 chases/pursues/(physically) follows after x2; volition is not implied for x1 or x2 jersi1:A;chase jersi2:P;chased # # x1 reflects Algerian culture/nationality in aspect x2 jerxo1:P;Algerian jerxo2:D;Algerian aspect # # x1 is a needle [pointed shape/form, not tool] of material x2 jesni1:D;needle jesni2:D;needle material jesni2t:of material # # x1 is a jet [expelled stream] of material x2 expelled from x3 jetce1:D;jet jetce2:D;jet material jetce3:D;jet source # # x1 (du'u) is true/truth by standard/epistemology/metaphysics x2 jetnu1:P;true jetnu2:D;standard* for truth # # x1 is a/the claw/nail/talon [body-part] of x2; [metaphor: pointed, penetrating, physical weapon] jgalu1:D;claw jgalu2:D;body* with claw jgalu2t:of body # # x1 is an angle [2-dimensional shape/form] from vertex x2 subtended by lateral [segment] x3 jganu1:D;angle jganu2:D;vertex jganu3:D;segment # # x1 grasps/holds/clutches/seizes/grips/[hugs] x2 with x3 (part of x1) at locus x4 (part of x2) jgari1:A;hold jgari2:P;held jgari3:S;means for holding jgari3t:means jgari4:D;locus of hold jgari4n:locus/i of hold jgari4t:held at # # x1 is a knot/tangle in/between x2 (object/jo'u-objects) jgena1:D;knot jgena2:P;knotted # # x1 is a gene of creature [or locus on creature] x2 determining trait/process x3 jgina1:D;gene jgina2:R;described by gene jgina3:D;gene trait # # x1 (person) feels/has pride in/about x2 (abstraction) jgira1:P;proud jgira2:D;pride cause # # x1 is guitar/violin/fiddle/harp [stringed musical instrument] with actuator/plectrum/bow x2 jgita1:D;stringed instrument jgita2:S;plectrum/bow # # x1 is near/close to/approximates x2 in property/quantity x3 (ka/ni) jibni1:P;near jibni2:D;nearness reference jibni3:D;nearness property # # x1 is a job/occupation/employment/vocation (a type of work regularly done for pay) of person x2 jibri1:D;occupation jibri2:D;employed person # # x1 (object, or event: force) stirs/mixes/[roils/agitates] fluid (gas/liquid) x2 jicla1:A;mix jicla2:P;mixed # # x1 is a basis/foundation/underlying or fundamental principle of x2; x1 is at the bottom of x2 jicmu1:D;foundation jicmu2:R;having foundations # # x1 (person) intuits x2 (du'u) about subject x3; [epistemology] jijnu1:A;intuit jijnu2:P;intuited jijnu3:D;intuition subject # # x1 interacts/behaves socially with x2; x1 socializes with/is sociable towards x2 jikca1:A;interact jikca2:R;interacted with # # x1 is made of/contains/is a quantity of liquor/spirits distilled from x2 jikru1:D;liquor jikru2:D;source* of liquor jikru2t:from source # # x1 is a quantity of/contains/is made of alkali/base of composition including x2 jilka1:D;alkali jilka1q:alkaline jilka2:S;alkali composition jilka2t:of composition # # x1 (person) is jealous of/envies x2 (person) about/for x3 (property - ka) jilra1:P;jealous jilra2:P;envied jilra3:D;cause* of jealousy jilra3t:for reason # # x1 is a branch/bough/limb of x2; x2 forks into branches x1; [preferred over metaphorical birka] jimca1:D;branch jimca2:P;branched # # x1 understands/comprehends fact/truth x2 (du'u) about subject x3; x1 understands (fi) x3 jimpe1:A;understand jimpe2:D;understood fact jimpe3:D;understood subject # # x1 is a limit/extreme/bound/border/[confinement] of x2 in property/domain x3 jimte1:D;limit jimte2:P;confined jimte3:D;domain* of confinement jimte3t:in domain # # x1 is a pair of shears/scissors for cutting x2 jinci1:S;shears jinci2:R;cut by shears jinci2t:for cutting # # x1 (person/team) wins/gains prize x2 from/over x3 [competitors/losers] in competition x4 jinga1:A;win jinga2:D;prize jinga3:D;loser jinga4:D;competition # # x1 is a vaccine/immune-system stimulant protecting x2 against disease x3 introduced by method x4 jinku1:D;vaccine jinku2:P;vaccinated jinku3:D;disease* prevented by vaccine jinku3t:against jinku4:D;method* of vaccination jinku4t:by method # # x1 is a quantity of/contains/is made of made of metal of composition including x2 jinme1:D;metal jinme2:S;metal composition jinme2t:of composition # # x1 (object/person) is immersed/submerged/bathes in liquid x2 jinru1:P;immersed jinru2:D;immersing liquid jinru2t:in liquid # # x1 (object) is clean/pure of material/contaminant/dirt x2 by standard x3 jinsa1:P;clean jinsa2:S;dirt jinsa3:S;cleanliness standard jinsa3t:by standard # # x1 is a well/spring of fluid x2 at location x3 jinto1:D;well jinto2:D;fluid* in well jinto2t:of fluid jinto3:D;location* of well jinto3t:at location # # x1 thinks/opines x2 [opinion] (du'u) is true about subject/issue x3 on grounds x4 jinvi1:A;have* opinion jinvi2:D;opinion jinvi3:D;subject* of opinion jinvi4:S;grounds for opinion # # x1 (property - ka) is an innate/inherent/intrinsic/natural property/quality/aspect of x2 jinzi1:P;innate jinzi2:R;with innate property # # x1 is a chicken/[hen/cock/rooster]/small fowl [a type of bird] of species/breed x2 jipci1:D;chicken jipci2:S;species of chicken jipci2t:of species # # x1 is a tip/point/vertex/extremity/end [0-dimension shape/form] on object x2 at locus x3 jipno1:D;tip jipno2:R;with tip jipno3:S;locus of tip # # x1 is a/the horn [body-part] of x2; [metaphor: pointed extremity] jirna1:D;horn jirna2:P;horned # # x1 is made of/contains/is a quantity of juice/nectar from-source/of-type x2 jisra1:S;juice jisra2:D;juice source jisra2t:from source # # x1 (du'u) is false/is an untruth by standard/epistemology/metaphysics x2 jitfa1:P;false jitfa2:S;standard of falseness jitfa2t:by standard # # x1 has control over/harnesses/manages/directs/conducts x2 in x3 (activity/event/performance) jitro1:A;control jitro2:R;under control jitro3:D;controlled activity # # x1 weaves x2 from material/[yarn] x3 jivbu1:A;weave jivbu2:D;woven product jivbu3:D;yarn # # x1 competes/vies with opponent x2 in contest/competition x3 (event) for gain x4; x1 rivals x2 jivna1:A;compete jivna2:D;opponent jivna3:D;contest jivna4:D;prize # # x1 (mass/jo'u) gathers/collects at location x2 from locations x3 (mass/jo'u) jmaji1:I;gather jmaji2:D;location* of gathering jmaji3:D;origin* of gathering # # x1 is a shoal [shallow hazard]/reef of material x2 in body of water x3 jmifa1:D;shoal jmifa2:S;shoal material jmifa3:R;containing shoal # # x1 adds/combines x2 to/with x3, with result x4; x1 augments x2 by amount x3 jmina1:A;combine jmina2:P;combined jmina3:P;combined jmina4:D;combination # # x1 lives/is alive by standard x2; x1 is an organism/living thing jmive1:A;live jmive2:D;standard* of living # # x1 reflects Jordanian culture/nationality in aspect x2 jordo1:P;Jordanian jordo2:D;Jordanian aspect # # x1 is joined to/connects to/is united with x2 at common locus x3; x1 and x2 are a union jorne1:P;joined jorne2:P;joined jorne3:S;locus of join # # x1 is a table/flat solid upper surface of material x2, supported by legs/base/pedestal x3 jubme1:D;table jubme2:S;material of table jubme2t:of material jubme3:D;table support jubme3t:with support # # x1 is an address of/are coordinates of x2 in system x3 judri1:D;address judri2:R;having address judri3:S;system defining address judri3t:in system # # x1 (text) is a sentence/statement about x2 [topic/subject/predicate/focus] in language x3 jufra1:D;sentence jufra2:D;sentence topic jufra2t:about jufra3:S;language of sentence jufra3t:in language # # x1 is a spider/arachnid/[crustacean/crab/lobster/non-insect arthropod] of species/breed x2 jukni1:D;spider jukni2:S;spider species jukni2t:of species # # x1 cooks/prepares food-for-eating x2 by recipe/method x3 (process) jukpa1:A;cook jukpa2:D;cooked food jukpa3:D;recipe # # x1 is a net/filter allowing passage of x2, prohibiting passage of x3, netting properties x4 julne1:D;filter julne2:R;passed by filter julne3:R;blocked by filter julne4:D;filter property # # x1 is attentive towards/attends/tends/pays attention to object/affair x2 jundi1:P;attentive jundi2:D;object* of attention # # x1 reflects Chinese [Mandarin, Cantonese, Wu, etc.] culture/nationality/language in aspect x2 jungo1:P;Chinese jungo2:D;Chinese aspect # # x1 is clock/watch/timer measuring time units x2 to precision x3 with timing mechanism/method x4 junla1:D;timer junla2:D;time unit junla3:S;timing precision junla3t:precision junla4:D;timing mechanism junla4t:mechanism # # x1 (person) is serious/earnest/has gravity about x2 (event/state/activity) junri1:P;earnest junri2:D;topic* of seriousness junri2t:about topic # # x1 is the weight of object x2 in [gravitational or other force] field x3 junta1:D;weight junta2:P;weighed junta3:D;weight-producing field junta3t:in field # # x1 is a bacteria/germ/microbe/protozoan/amoeba [1-celled life] of species/defining property x2 jurme1:S;bacteria jurme2:S;bacteria species jurme2t:of species # # x1 (event/action/state) is severe/harsh to x2 [victim/experiencer] jursa1:P;harsh jursa2:R;experiencing harshness jursa2t:to victim # # x1 is a species of genus x2, family x3, etc.; [open-ended tree-structure categorization] jutsi1:S;species jutsi2:S;genus jutsi3:D;species family # # x1 (action) is clumsy/awkward by standard x2 juxre1:P;clumsy juxre2:D;clumsiness standard juxre2t:by standard # # x1 is the view/scene/panorama/sight/prospect of x2 (object/location) from point-of-view x3 jvinu1:D;view jvinu2:P;viewed jvinu3:D;viewpoint # # x1 is a cup/glass/tumbler/mug/vessel/[bowl] containing contents x2, and of material x3 kabri1:D;cup kabri2:S;cup contents kabri2t:contents kabri3:S;cup material kabri3t:of material # # x1 is a camera/photographic equipment recording illumination type x2 images to medium x3 kacma1:D;camera kacma2:D;image type kacma3:D;photographic medium kacma3t:medium # # x1 reflects Canadian culture/nationality in aspect x2 kadno1:P;Canadian kadno2:D;Canadian aspect # # x1 coughs/farts/burps up/out x2 [predominantly gaseous] from orifice x3 kafke1:A;cough kafke2:P;coughed kafke3:D;coughing orifices kafke3t:from orifice # # x1 is a company/corporation/firm/partnership chartered by authority x2 for purpose x3 kagni1:D;corporation kagni2:D;authority* chartering corporation kagni2t:by authority of kagni3:D;corporation purpose kagni3t:exists for purpose # # x1 (event/experience) warns/cautions x2 (person) of/about danger x3 (event/state/property) kajde1:A;warn kajde2:P;warned kajde3:D;danger* warned of kajde3t:danger # # x1 is a shelf/counter/bar in/on/attached to supporting object x2, for purpose x3 kajna1:D;shelf kajna2:R;supported by shelf kajna2t:supported thing kajna3:D;purpose* of shelf kajna3t:for purpose # # x1 is able to do/be/capable of doing/being x2 (event/state) under conditions x3 (event/state) kakne1:P;capable kakne2n:thing(s) that can be done kakne2v:able to be done kakne2a:can be done kakne2t:can be done kakne3:S;conditions for capability kakne3t:conditions # # x1 (agent) digs x2 [material] up/out of x3 [source/hole] with limbs/tool(s) x4 kakpa1:A;dig kakpa2:P;dug kakpa3:R;dug from kakpa4:D;digging tool kakpa4t:using # # x1 is a/the feces/excrement/dung/shit of x2 (animal/person); (adjective:) x1 is fecal (matter) kalci1:S;excrement kalci2:R;producing excrement # # x1 (portal/passage/entrance-way) is open/ajar/not shut permitting passage/access to x2 by x3 kalri1:P;open kalri2:R;reachable through open portal kalri2t:reachable kalri3:R;given access by open portal kalri3t:given access # # x1 is chaotic/disordered in property/aspect x2 (ka) kalsa1:P;chaotic kalsa2:S;chaotic property kalsa2t:in propery # # x1 hunts/stalks prey/quarry/game x2 for purpose x3 kalte1:A;hunt kalte2:P;hunted kalte3:S;purpose of hunt # # x1 is a column/pillar of material x2 kamju1:D;pillar kamju2:S;material of pillar kamju2t:of material # # x1 (mass) is a committee with task/purpose x2 of body x3 kamni1:D;committee kamni2:D;committee purpose kamni2t:for purpose kamni3:D;body* with committee kamni3t:of body # # x1 (property - ka) is common/general/universal among members of set x2 (complete set) kampu1:P;common/general kampu2:S;set with commonality kampu2t:amongst # # x1 is a goat/angora/[billy-goat/kid] of species/breed x2 kanba1:D;goat kanba2:S;goat species kanba2t:of species # # x1 (agent) counts the number in set x2 to be x3 [number/count] counting [off] by units x4 kancu1:A;count kancu2:D;counted set kancu3:D;count result kancu4:D;count unit # # x1 is dim/dull/pale/non-intense in property x2 (ka) as received/measured by observer x3 kandi1:P;non-intense kandi2:S;non-intense property kandi2t:in property kandi3:A;measure* non-intensity kandi3t:to observer # # x1 calculates/reckons/computes x2 [value (ni)/state] from data x3 by process x4 kanji1:A;calculate kanji2:D;calculated value kanji2t:value kanji3:S;data for calculation kanji3t:from data kanji4:D;calculation process kanji4t:using process # # x1 is a/the eye [body-part] of x2; [metaphor: sensory apparatus]; (adjective:) x1 is ocular kanla1:D;eye kanla2:D;body* with eye # # x1 is healthy/fit/well/in good health by standard x2 kanro1:P;healthy kanro2:S;standard of health # # x1 is with/accompanies/is a companion of x2, in state/condition/enterprise x3 (event/state) kansa1:A;accompany kansa2:P;accompanied kansa3:D;circumstance* of accompaniment # # x1 is a quantum/ray/elementary particle/smallest measurable increment of property/activity x2 kantu1:D;quantum kantu1n:quantum/-a kantu2:P;quantised # # x1 is a conjunction, stating that x2 (du'u) and x3 (du'u) are both true kanxe1:D;conjunction kanxe2:D;conjunct kanxe3:D;conjunct # # x1 [observer] compares x2 with x3 in property x4 (ka), determining comparison x5 (state) karbi1:A;compare karbi2:P;compared karbi3:P;compared karbi4:D;compared property karbi4t:in property karbi5:D;comparison # # x1 is a car/automobile/truck/van [a wheeled motor vehicle] for carrying x2, propelled by x3 karce1:D;car karce2:D;car passenger karce3:D;car engine # # x1 is a card [small nearly-2-dimensional shape/form] of material x2, shape x3 karda1:D;card karda2:S;card material karda2t:of material karda3:D;card shape karda3t:of shape # # x1 (object/commodity/property/event) is costly/expensive/dear to x2 by standard x3 kargu1:P;expensive kargu2:A;experience* expensive kargu2t:expensive for kargu3:S;standard for cost kargu3t:by standard # # x1 is a collar/ring/belt/band around/surrounding x2 made of material x3 karli1:D;collar karli2:R;surrounded by collar karli2t:thing surrounded karli3:S;collar material karli3t:of material # # x1 is a journal/periodical/magazine/[newspaper] with content x2 published by x3 for audience x4 karni1:D;journal karni2:S;journal contents karni2t:with contents karni3:D;journal publisher karni3t:with publisher karni4:D;journal audience karni4t:with audience # # x1 (tool/blade/force) cuts [through]/splits/divides x2 (object) into pieces x3 katna1:A;cut katna2:P;cut katna3:D;piece* resulting from cut katna3t:into pieces # # x1 captures/catches/apprehends/seizes/nabs x2 with trap/restraint x3 kavbu1:A;capture kavbu2:P;captured kavbu3:D;trap* used for capture # # x1 (person) pities/feels sorry for x2 (person) about x3 (abstraction) kecti1:A;feel* sorrow kecti2:A;receive* pity kecti3:D;reason* for sorrow kecti3t:for reason # # x1 [agent] plays with plaything/toy x2 kelci1:A;play kelci2:D;toy # # x1 is x2 degree(s) Kelvin [metric unit] in temperature (default is 1) by standard x3 kelvo1:R;measured in Kelvin kelvo2:D;number* of Kelvin kelvo3:D;Kelvin standard # # x1 is a cancer [malignant disease] in x2 kenra1:D;cancer kenra2:P;cancerous # # x1 is outer space near/associated with celestial body/region x2 kensa1:S;outer space kensa2:D;location* in outer space kensa2t:at location # # x1 is a/the hair/fur [body-part] of x2 at body location x3 kerfa1:S;hair kerfa2:D;body* with hair kerfa3:D;location* of hair kerfa3t:location # # x1 is a/the ear [body-part] of x2; [metaphor: sensory apparatus, information gathering] kerlo1:D;ear kerlo2:D;body* with ear kerlo2t:on body # # x1 reflects South American culture/nationality/geography in aspect x2 ketco1:P;South American ketco2:D;South American aspect # # x1 is a cavity/hole/hollow/cavern in x2; x1 is concave within x2; x2 is hollow at locus x1 kevna1:D;cavity kevna2:P;with cavity # # x1 cushions x2 with material x3; x1 is a cushion/pillow/pad [for x2] of padding material x3 kicne1:A;cushion kicne1n:cushion kicne2:P;cushioned kicne3:S;cushion material kicne3t:of material # # x1 is a quantity of/contains/is made of oxygen (O); [metaphor: supporting life/combustion] kijno1:D;oxygen # # x1 is a thousand [1000; 1x10**3] of x2 in dimension/aspect x3 (default is units) kilto1:D;1000 kilto2:R;measured in 1000 kilto3:D;1000 aspect # # x1 is sharp/keen at locus x2 kinli1:P;sharp kinli2:D;location* of sharpness kinli2t:at location # # x1 reflects Pakistani/Pashto culture/nationality/language in aspect x2 kisto1:P;Pakistani kisto2:D;Pakistani aspect # # x1 is a street/avenue/lane/drive/cul-de-sac/way/alley/[road] at x2 accessing x3 klaji1:D;street klaji2:D;street location klaji2t:at location klaji3:R;accessed by street klaji3t:accessing # # x1 weeps/cries tears x2 about/for reason x3 (event/state) klaku1:A;weep klaku2:D;tear klaku3:D;reason* for weeping klaku3t:for reason # # x1 comes/goes to destination x2 from origin x3 via route x4 using means/vehicle x5 klama1:A;go klama2:D;destination klama3:D;origin klama4:D;route klama5:D;vehicle # # x1 is a quantity quantified/measured/enumerated by x2 (quantifier) on scale x3 (si'o) klani1:P;quantified klani2:A;quantify klani3:D;measurement scale klani3t:on scale # # x1 (mass/si'o) is a class/category/subgroup/subset within x2 with defining property x3 (ka) klesi1:D;class klesi2:R;containing class klesi3:D;class property # # x1 (object/medium) is clear/transparent/without obstacle to in-the-clear x2 [transmission] klina1:P;transparent klina2:D;unhindered transmission klina2t:transmission # # x1 is a quantity of/contains/is made of halogen of type x2 [chlorine, fluorine, iodine, etc.] kliru1:D;halogen kliru2:D;halogen type kliru2t:of type # # x1 is a quantity of/contains/is made of clay [moist, clammy dirt] of composition including x2 kliti1:S;clay kliti2:S;clay composition kliti2t:of composition # # x1 is a screw [fastener] for purpose x2, threads [pitch, material] x3, frame [size, material] x4 klupe1:D;screw klupe2:D;screw purpose klupe2t:for purpose klupe3:D;screw thread klupe4:D;screw size*/material* # # x1 (obj.) is loose/bloused/not tight on x2 (obj.) at locus x3 kluza1:P;loose kluza2:R;having loose thing kluza3:D;location* of looseness kluza3t:at location # # x1 is a quantity of cabbage/lettuce/leafy vegetable of species/strain x2 kobli1:D;cabbage*/lettuce* kobli2:S;cabbage/lettuce species kobli2t:of species # # x1 is a corner/point/at-least-3-dimensional [solid] angle [shape/form] in/on x2, of material x3 kojna1:D;corner kojna2:P;with corner kojna3:D;corner material kojna3t:material # # x1 is a quantity of/contains/is made of coal/peat/anthracite/bituminous from source x2 kolme1:S;coal kolme2:D;coal source kolme2t:from source # # x1 is a comb [many-needled shape] of material x2 with tines/needles x3 komcu1:D;comb komcu2:S;comb material komcu2t:of material komcu3:D;comb needle # # x1 is a cone [shape/form] of material x2 with vertex x3 konju1:D;cone konju2:S;cone material konju2t:of material konju3:D;cone vertex konju3n:cone vertex/ices # # x1 is an edge/margin/border/curb/boundary of x2 next-to/bordering-on x3 korbi1:D;edge korbi2:R;having edge korbi3:R;bordered by edge korbi3t:bordering on # # (adjective:) x1 is bent/crooked/not straight or direct/[twisted]/folded korcu1:P;bent # # x1 is a quantity of/contains/is made of cork/bark from tree/species x2; [material] korka1:S;cork korka2:S;cork species korka2t:of species # # x1 is a coat/jacket/sweater/cloak/[cape/shawl/pullover] [extra outer garment] of material x2 kosta1:D;outer garment kosta2:S;outer garment material kosta2t:of material # # x1 is x2 local area unit(s) [non-metric] (default 1) by standard x3, x4 subunits kramu1:R;with area kramu2:S;size of area kramu3:D;area standard kramu4:D;area subunit # # x1 (site/event) is a source/start/beginning/origin of x2 (object/event/process) krasi1:D;origin krasi2:D;object*/process* with origin # # x1 represents/is an agent/proxy/stands-in for [absent] x2 in matter(s)/function(s) x3 krati1:A;represent krati2:P;represented krati3:D;function* of proxy krati3t:in function # # x1 (event) is the x3'rd recurrence/repetition of x2 (abstract); x2 happens again in [form] x1 krefu1:D;recurrence krefu2:A;recur krefu2v:happening again krefu3:S;number of recurrence # # x1 believes [without evidence/proof] belief/creed x2 (du'u) is true/assumed about subject x3 krici1:A;believe krici2:D;belief krici3:D;subject* of belief # # x1 is a quantity of/contains/is made of crystal of composition x2 in form/arrangement x3 krili1:D;crystal krili2:S;crystal composition krili3:S;crystal arrangement krili3t:in arrangement # # x1 (event/state) is a reason/justification/explanation for/causing/permitting x2 (event/state) krinu1:D;reason krinu2:P;justified # # x1 cries out/yells/howls sound x2; x1 is a crier krixa1:A;yell krixa2:D;yelled sound # # x1 intersects/crosses/traverses x2 at locus x3 kruca1:A;intersect kruca2:P;intersected kruca3:D;intersection # # x1 is made of/contains/is a quantity of cream/emulsion/puree [consistency] of composition x2 kruji1:S;cream kruji2:S;cream composition kruji2t:of composition # # x1 is a curve/turn/bend in x2, at locus x3, and defined by set of points/properties x4 kruvi1:D;curve kruvi2:P;with curve kruvi3:D;curve locus kruvi3n:curve locus/i kruvi3t:at locus/i kruvi4:D;property* defining curve kruvi4t:defined by # # x1 is a cube/regular polyhedron/polygon of dimensions x2 (def. 3), surfaces/sides x3 (def. 6) kubli1:D;cube kubli2:D;cube dimension kubli2t:of dimension kubli3:D;cube side kubli3t:with sides # # x1 is curious/wonders about/is interested in/[inquisitive about] x2 (object/abstract) kucli1:P;curious kucli2:D;subject* of curiosity kucli2t:about # # x1 feels comfort/is comfortable with conditions/environmental property(ies) x2 kufra1:P;comfortable kufra2:A;inspire* comfort kufra2t:about # # x1 is delicious/tasty/delightful to observer/sense x2 [person, or sensory activity] kukte1:P;tasty kukte2:A;observe* taste kukte2t:observer # # x1 [mass of ideas, customs, skills, arts] is culture of nation/ethos x2 (mass); x1 is ethnic kulnu1:D;culture kulnu2:R;having culture # # x1 is a room of/in structure x2 surrounded by partitions/walls/ceiling/floor x3 (mass/jo'u) kumfa1:D;room kumfa2:R;having rooms kumfa3:D;room partition # # x1 is a camel/llama/alpaca/vicuna/dromedary of species/breed x2 kumte1:D;camel kumte2:S;camel species kumte2t:of species # # x1 is/contains/is made from a mineral/ore of type/metal x2 mined from location/lode/mine x3 kunra1:D;mineral*/ore* kunra2:D;ore type kunra3:D;mineral mine # # x1 [container] is empty/vacant of x2 [material]; x1 is hollow kunti1:P;empty kunti2:R;lacking from container # # x1 is a right-angled shape/form defined by set of vertices x2, dimensions x3 (default 2) kurfa1:P;right-angled kurfa2:D;vertex* of right-angled thing kurfa2t:with vertices kurfa3:D;dimension* of right-angled thing kurfa3t:with dimensions # # x1 takes-care-of/looks after/attends to/provides for/is caretaker for x2 (object/event/person) kurji1:D;caretaker kurji2:R;looked after # # x1 is bitter/acrid/sharply disagreeable to observer/sense x2 kurki1:P;bitter kurki2:A;observe* bitterness kurki2t:to observer # # x1 ranges/extends/spans/persists/reaches across/over interval/gap/area/scope/extent/range x2 kuspe1:I;extend* over kuspe2:D;extent # # x1 (person) is cruel/mean/unkind to victim x2 kusru1:P;cruel kusru2:D;victim* of cruelty kusru2t:to victim # # x1 is a wolf/lupine of species/breed x2 labno1:D;wolf labno1n:wolf/ves labno2:S;wolf species labno2t:of species # # x1 pulls/tugs/draws/drags x2 by handle/at locus x3 lacpu1:A;pull lacpu2:P;pulled lacpu3:R;pulled by # # x1 relies/depends/counts on/trusts x2 to bring about/ensure/maintain x3 (event/state) lacri1:A;rely lacri2:R;relied on lacri3:D;reliance result # # x1 is made of/contains/is a quantity of milk from source x2; (adjective:) x1 is lactic/dairy ladru1:S;milk ladru2:D;milk source # # x1 (force) lifts/applies raising/supporting force to x2 at locus x3 in gravity well x4 lafti1:A;lift lafti2:P;lifted lafti3:D;lifting point lafti4:S;gravity against lift # # x1 (event/state/property) is probable/likely under conditions x2 lakne1:P;probable lakne2:S;probability conditions # # x1 is quantity of wax [substance especially soft/moldable when warm] from source x2 lakse1:S;wax lakse2:S;wax source # # x1 is a lake/lagoon/pool at site/within land mass x2 lalxu1:D;lake lalxu2:D;lake location # # x1 is adjacent/beside/next to/in contact with x2 in property/sequence x3 in direction x4 lamji1:P;adjacent lamji2:R;having adjacency lamji3:D;adjacency property lamji4:D;adjacency direction # # x1 is a quantity of protein/albumin of type x2 composed of amino acids (sequence/jo'u) lanbi1:S;protein lanbi2:D;protein type # # x1 is a flag/banner/standard of/symbolizing x2 with pattern(s) x3 on material x4 lanci1:D;flag lanci2:R;symbolised by flag lanci3:D;flag pattern lanci4:D;flag material # # x1 is a basket with contents x2, woven from material x3 lanka1:D;basket lanka2:S;basket contents lanka3:D;basket material # # x1 analyzes/examines-in-detail x2 by method/technique/system x3 [process/activity] lanli1:A;analyse lanli2:P;analysed lanli3:D;analysis method # # x1 is a sheep/[lamb/ewe/ram] of species/breed x2 of flock x3 lanme1:S;sheep lanme2:S;sheep species # # x1 is a can/tightly sealed/pre-sealed container for perishable contents x2, made of x3 lante1:D;can lante2:P;canned lante3:D;can material # # x1 is in balance/equilibrium under forces x2 (mass) lanxe1:P;balanced lanxe2:D;balancing force # # x1 (mass) is a family with members including x2 bonded/tied/joined according to standard x3 lanzu1:D;family lanzu2:D;family member lanzu3:S;standard defining family lanzu3t:by standard # # x1 (process) is an art [creative application] of craft/skill x2 (idea/activity) larcu1:D;art larcu2:D;skill # # x1 (agent) fastens/connects/attaches/binds/lashes x2 to x3 with fastener x4 lasna1:P;fasten lasna2:P;fastened lasna3:R;fastened to lasna4:D;fastener # # x1 is a quantity of/contains/is made of brass [copper/zinc alloy] of composition including x2 lastu1:S;brass lastu2:D;brass composition # # x1 reflects Latin/Roman/Romance culture/empire/language in aspect x2 latmo1:P;Latin latmo2:D;Latin aspect # # x1 is a lotus, plant/flower/herb of species/strain x2 symbolizing x3 to culture/religion x4 latna1:S;lotus latna2:S;lotus species latna3:R;symbolised by lotus latna4:D;culture* recognizing lotus # # x1 (person) is lazy/avoiding work/effort concerning action x2 lazni1:P;lazy lazni2:R;lazily avoided # # x1 takes/gets/gains/obtains/seizes/[removes] x2 (object/property) from x3 (possessor) lebna1:A;take lebna2:P;taken lebna3:P;disposessed # # x1 is a lens/glass [focussing shape/form] focussing x2 to focus/foci x3 by means/material x4 lenjo1:D;lens lenjo2:R;focussed by lens lenjo3:D;focus lenjo3n:focus/i lenjo4:D;lens material # # x1 is cold/cool by standard x2 lenku1:P;cold lenku2:D;coldness standard lenku2t:by standard # # x1 (event) is late by standard x2 lerci1:P;late lerci2:D;lateness standard # # x1 (la'e zo BY/word-bu) is a letter/digit/symbol in alphabet/character-set x2 representing x3 lerfu1:D;symbol lerfu2:D;alphabet lerfu3:R;represented by symbol # # x1 reflects Libyan culture/nationality in aspect x2 libjo1:P;Libyan libjo2:D;Libyan aspect # # x1 precedes/leads x2 in sequence x3; x1 is former/preceding/previous; x2 is latter/following lidne1:A;precede lidne2:P;preceded lidne3:D;sequence # # x1 [person/passive/state] undergoes/experiences x2 (event/experience); x2 happens to x1 lifri1:A;experience lifri2:P;experienced lifri2v:happening # # x1 is a religion of believers including x2 sharing common beliefs/practices/tenets including x3 lijda1:D;religion lijda2:D;religious believer lijda3:D;religious belief # # x1 (agent) swims in fluid x2 limna1:A;swim limna2:S;fluid swum in # # x1 is lightning/electrical arc/thunderbolt striking at/extending to x2 from x3 lindi1:S;lightning lindi2:D;lightning destination lindi3:D;lightning source # # x1 is a line/among lines [1-dimensional shape/form] defined by set of points x2 linji1:D;line linji2:S;points defining line # # x1 is a length of chain/links of material x2 with link properties x3 linsi1:D;chain linsi2:D;chain material linsi3:D;chain link property # # x1 is light in mass/weight by standard x2 linto1:P;light linto2:D;lightness standard # # x1 is a story/tale/yarn/narrative about plot/subject/moral x2 by storyteller x3 to audience x4 lisri1:D;story lisri2:D;story plot lisri2t:plot lisri3:D;storyteller lisri4:D;story audience lisri4t:audience # # x1 (physical object) is a list/catalog/register of sequence/set x2 in order x3 in medium x4 liste1:D;list liste2:D;list sequence liste3:D;list order liste4:D;list medium # # x1 is x2 liter(s) [metric unit] in volume (default is 1) by standard x3 litce1:R;measured in litres litce2:D;number* of litres litce3:D;litre standard # # x1 is liquid/fluid, of composition/material including x2, under conditions x3 litki1:D;liquid litki2:S;liquid composition litki3:S;liquidity conditions # # x1 travels/journeys/goes/moves via route x2 using means/vehicle x3; x1 is a traveller litru1:A;travel litru2:D;route* of travel litru2t:by route litru3:D;vehicle for travel litru3t:by vehicle # # x1 is a/the liver [body-part] of x2 livga1:D;liver livga2:D;body* with liver livga2t:of body # # x1 is a fuel/energy-source for powering x2 livla1:S;fuel livla2:R;powered by fuel # # x1 [rules/methods] is a logic for deducing/concluding/inferring/reasoning to/about x2 (du'u) logji1:D;logic system logji2:R;reasoned about # # x1 reflects [Loglandic]/Lojbanic language/culture/nationality/community in aspect x2 lojbo1:P;Lojbanic lojbo2:D;Lojbanic aspect # # x1 is a floor/bottom/ground of x2 loldi1:D;floor loldi2:P;having floor # # x1 is a fox [bushy-tailed wild dog/canine] of species/breed x2 lorxu1:D;fox lorxu2:S;fox species # # x1 reflects Lebanese culture/nationality in aspect x2 lubno1:P;Lebanese lubno2:D;Lebanese aspect # # x1 (text) is a compound predicate word with meaning x2 and arguments x3 built from metaphor x4 lujvo1:D;compound word lujvo2:D;compound word meaning lujvo3:D;compound word arguments lujvo4:D;compound word source metaphor # # x1 (agent) washes/cleanses x2 of soil/contaminant x3 in/with cleaning material(s) x4 lumci1:A;wash lumci2:P;washed lumci3:D;contaminant* removed by washing lumci3t:contaminant lumci4:D;cleaning material # # x1 is bare/naked/nude; x1 is without cover/clothes/[protection] lunbe1:P;naked # # x1 is Earth's moon (default); x1 is a major natural satellite/moon of planet x2 lunra1:D;moon lunra2:D;planet* with moon # # x1 condenses/liquefies on/into x2 at temperature x3, pressure x4; x1 is dew/condensate on x2 lunsa1:P;condensing lunsa2:D;condensation site lunsa3:D;condensation temperature lunsa4:D;condensation pressure # # x1 is a derogative connotation/sense of x2 used by x3; x3 derogates/'curses at' x2 in form x1 mabla1:D;derogative form mabla2:P;derogated mabla3:A;derogate # # x1 is a mammal/'animal'/beast of species x2 mabru1:D;mammal mabru2:S;mammal species # # x1 (event/action/process) is manual [not automatic] in function x2 under conditions x3 macnu1:P;manual macnu2:D;manual function macnu3:D;manual conditions macnu3t:under conditions # # x1 is mature/ripe/fully-grown/adult in development-quality x2 (ka) makcu1:P;mature makcu2:D;mature property # # x1 is magic/supernatural/sorcery/witchcraft/wizardry to x2, performed by person/force/deity x3 makfa1:D;magic makfa2:A;experience* magic makfa3:A;perform* magic # # x1 is magnetic [adjective] producing magnetic field x2 maksi1:P;magnetic maksi2:D;magnetic field # # x1 is a temple/church/sanctuary/synagogue/shrine of religion x2 at location/serving area x3 malsi1:D;church malsi2:D;religion* of church malsi3:R;served by church # # x1 is a mother of x2; x1 bears/mothers/acts maternally toward x2; [not necessarily biological] mamta1:D;mother mamta2:P;having mother # # x1 feels wonder/awe/marvels about x2 manci1:A;feel* awe manci2:P;marvelled at # # x1 (object/event) is uniform/homogeneous in property x2 (ka) manfo1:P;uniform manfo2:D;uniform property # # x1 is dark/lacking in illumination manku1:P;dark # # x1 is a frame of reference/standard for observing/measuring/determining x2, with/by rules x3 manri1:D;standard manri2:R;measured by standard manri3:D;standard rules # # x1 satisfies evaluator x2 in property (ka)/state x3 mansa1:P;satisfying mansa2:P;satisfied mansa3:D;satisfactory property # # x1 is an ant of species/breed x2 manti1:D;ant manti2:S;ant species manti2t:of species # # x1 is a cap/hat/crown/helmet/piece of headgear [head-top garment] of material x2 mapku1:D;hat mapku2:D;hat material # # x1 is a quantity of/contains/is made of cotton [type of fabric/material] mapni1:S;cotton # # x1 fits/matches/suits/is compatible/appropriate/corresponds to/with x2 in property/aspect x3 mapti1:P;compatible mapti2:P;target* of compatibility mapti2t:target(s) mapti3:D;compatible property mapti3t:property(ies) # # x1 is a shelter/haven/refuge/retreat/harbor for/protecting x2 from danger/threat x3 marbi1:D;shelter marbi2:P;sheltered marbi3:D;sheltered danger # # x1 is a vehicle/mode of transport carrying x2 in/on surface/medium x3, propelled by x4 marce1:D;vehicle marce2:R;conveyed by vehicle marce3:D;vehicle surface marce4:D;vehicle propulsion # # x1 are the ethics/morals/moral standards/ethical standards of x2 (ind./mass) about situation x3 marde1:S;ethics marde2:R;having ethics marde3:D;situation* with ethics # # x1 is a quantity of/contains/made of mercury/quicksilver; [metaphor: fluid metal; temperature] margu1:S;mercury # # x1 is material/stuff/matter of type/composition including x2 in shape/form x3 marji1:S;matter marji2:S;matter composition marji3:D;matter shape # # x1 is a quantity of hemp/marijuana/jute of species/strain x2 marna1:S;hemp marna2:S;hemp species marna2t:of species # # x1 [force] mashes/crushes/squashes/smashes x2 into pulp/mash/crumbs/deformed mass x3 marxa1:A;crush marxa2:P;crushed marxa3:D;result* of crushing # # x1 is slow/sluggish at doing/being/bringing about x2 (event/state) masno1:P;slow masno2:R;achieved slowly # # x1 is x2 months in duration (default is 1 month) by month standard x3 masti1:P;measured in months masti2:D;number* of months masti3:D;month standard # # x1 is a mat/pad/mattress/pallet [flat, soft, dense form] of material x2 matci1:D;mat matci2:D;mat material # # x1 is a quantity of/contains/is made of linen/flax [type of fabric/material] matli1:S;linen # # x1 is a quantity of/contains butter/oleo/margarine/shortening from source x2 matne1:S;butter matne2:D;butter source # # x1 is a motor/engine, driving/propelling/providing power to x2 matra1:D;engine matra2:R;powered by engine # # x1 is a quantity of oats [grain] of species/strain x2 mavji1:S;oats mavji2:S;oats species mavji2t:of species # # x1 is a quantity of wheat [grain] of species/strain x2 maxri1:S;wheat maxri2:S;wheat species maxri2t:of species # # x1 is a/the brow/forehead [projecting flat/smooth head/body-part] of x2 mebri1:D;brow mebri2:D;body* with brow mebri2t:of body # # x1 is a million [1x10**6] of x2 in dimension/aspect x3 (default is units) megdo1:D;10**6 megdo2:R;measured in 10**6 megdo3:D;10**6 aspect # # x1 [quantifier/expression] is a mathematical expression interpreted under rules/convention x2 mekso1:D;math expression mekso2:S;math rules # # x1 is beautiful/pleasant to x2 in aspect x3 (ka) by aesthetic standard x4 melbi1:P;beautiful melbi2:D;observer* of beauty melbi3:D;aspect* of beauty melbi4:S;standard of beauty # # x1 reflects Malaysian/Malay culture/nationality/language in aspect x2 meljo1:P;Malaysian meljo2:D;Malaysian aspect # # x1 is a mind/intellect/psyche/mentality/[consciousness] of body x2 menli1:D;mind menli2:D;body* with mind menli2t:of body # # x1 is a sister of/sororal to x2 by bond/tie/standard/parent(s) x3; [not necessarily biological] mensi1:D;sister mensi2:P;having sister # # x1 is x2 minutes in duration (default is 1 minute) by standard x3 mentu1:P;with duration in minutes mentu1t:has duration mentu2:S;number of minutes mentu3:D;minutes standard mentu3t:by standard # # x1 pertains to USA/American culture/nationality/dialect in aspect x2 merko1:P;American merko2:D;American aspect # # x1 (agent) measures/evaluates x2 [quantity] as x3 units on scale x4 (si'o), with accuracy x5 merli1:A;measure merli2:P;measured merli3:D;measurement merli4:D;measurement scale merli5:S;measurement accuracy # # x1 reflects Mexican culture/nationality in aspect x2 mexno1:P;Mexican mexno2:D;Mexican aspect # # x1 is in/at the middle/center/midpoint/[is a focus] of x2; (adjective:) x1 is central midju1:R;at middle midju2:R;having middle # # x1 is encoded/cipher text of plain-text x2 by code/coding system x3; x1 is in code; x3 is a code mifra1:D;cipher text mifra2:D;plaintext mifra3:D;cipher system # # x1 doctors/treats/nurses/[cures]/is physician/midwife to x2 for ailment x3 by treatment/cure x4 mikce1:D;doctor mikce2:R;treated mikce3:D;ailment mikce4:D;treatment # # x1 is a millionth [1x10**-6] of x2 in dimension/aspect x3 (default is units) mikri1:D;10**-6 mikri2:R;measured in 10**-6 mikri3:D;10**-6 aspect # # x1 is a thousandth [1/1000; 1x10**-3] of x2 in dimension/aspect x3 (default is units) milti1:D;10**-3 milti2:R;measured in 10**-3 milti3:D;10**-3 aspect # # x1 is mild/non-extreme/gentle/middling/somewhat in property x2 (ka); x1 is not very x2 milxe1:P;mild milxe2:D;mild property milxe2t:in property # # x1 issues commands/orders to x2 for result x3 (event/state) to happen; x3 is commanded to occur minde1:A;command minde2:P;commanded minde3:D;purpose* of command minde3t:purpose # # x1 is a machine for use/function x2; [automated apparatus, without direct function control] minji1:D;machine minji2:D;machine function # # x1 is x2 (default 1) long local distance unit(s) [non-metric], x3 subunits, standard x4 minli1:D;distance minli2:D;number* of distance units minli3:D;distance subunit minli4:D;distance standard # # x1 reflects/mirrors/echoes x2 [object/radiation] to observer/point x3 as x4; x2 bounces on x1 minra1:A;reflect minra2:P;reflected minra3:A;observe* reflection minra3t:observer(s) minra4:D;form* of reflection minra4t:form # # x1 is the same/identical thing as x2 by standard x3; (x1 and x2 interchangeable) mintu1:P;identical mintu2:D;identical reference mintu2t:identical to mintu3:standard for being identical mintu3t:by standard # # x1 keeps x2 secret/hidden from x3 by method x4; x2 is a secret; x1 hides/conceals x2 mipri1:A;conceal mipri2:P;secret mipri3:P;ignorant of secret mipri4:D;method* of secretion mipri4t:method(s) # # x1 is a deer/elk/moose/[hart/stag/doe] of species/breed x2 mirli1:D;deer mirli2:S;deer species mirli2t:of species # # x1 (person/object/event) is famous/renowned/is a celebrity among community of persons x2 (mass) misno1:P;famous misno2:R;considering famous # # x1 reflects Egyptian culture/nationality in aspect x2 misro1:P;Egyptian misro2:D;Egyptian aspect # # x1 is x2 meter(s) [metric unit] in length (default 1) measured in direction x3 by standard x4 mitre1:R;measured in metres mitre2:D;number of metres mitre3:D;metre direction mitre4:D;metre standard # # x1 (mass) is a mixture/blend/colloid/commingling with ingredients including x2 mixre1:D;mixture mixre2:S;ingredients # # x1 is to the side of/lateral to x2 and facing x3 from point of view/in-frame-of-reference x4 mlana1:D;side mlana2:P;with side mlana3:P;faced by side mlana3t:facing mlana4:D;reference frame* defining side mlana4t:in reference frame # # x1 is a cat/[puss/pussy/kitten] [feline animal] of species/breed x2; (adjective:) x1 is feline mlatu1:D;cat mlatu1a:feline mlatu2:S;cat species mlatu2t:of species # # x1 is less than x2 in property/quantity x3 (ka/ni) by amount x4 mleca1:P;lesser mleca2:P;greater mleca3:D;lesser property mleca4:D;less by amount # # x1 is a mold/fungus/mushrooms/truffles of species/strain x2 parasitic/growing on x3 mledi1:S;mould mledi2:S;mould species mledi3:R;grown on by mould # # x1 is a satellite/moon orbiting x2 with characteristics x3, orbital parameters x4 mluni1:D;moon mluni2:R;orbited by moon mluni3:S;moon characteristics mluni4:D;moon orbital parameter # # x1 is a point/instant/moment [0-dimensional shape/form] in/on/at time/place x2 mokca1:D;instant mokca2:D;place* with instant mokca2t:at place # # x1 is a/the mouth/oral cavity [body-part] of x2; (metaphor: entrance/intake for consumption) moklu1:D;mouth moklu1a:oral moklu2:D;body* with mouth moklu2t:of body # # x1 is a mill/foundry/industrial plant/[assembly line] performing process x2 molki1:D;industrial plant molki2:D;industrial process # # x1 is x2 mole(s) [metric unit] in substance (default is 1) by standard x3 molro1:R;measured in moles molro2:D;number* of moles molro3:D;mole standard # # x1 remembers/recalls/recollects fact(s)/memory x2 (du'u) about subject x3 morji1:A;remember morji2:P;remembered morji3:D;remembered subject morji3t:subject(s) # # x1 reflects Moroccan culture/nationality in aspect x2 morko1:P;Moroccan morko2:D;Moroccan aspect # # x1 is/reflects/represents a pattern of forms/events x2 arranged according to structure x3 morna1:D;pattern morna2:P;patterned morna3:D;pattern structure # # x1 is dead/has ceased to be alive morsi1:P;dead # # x1 is friction [force opposing motion] due to contact/rubbing between x2 and x3; (fe) x2 rubs x3 mosra1:S;friction mosra2:P;rubbing mosra3:P;rubbed # # x1 is a quantity of rye [grain] of species/strain x2 mraji1:S;rye mraji2:S;rye species mraji2t:of species # # x1 mails/posts [transfer via intermediary service] x2 to x3 from x4 by carrier/network/system x5 mrilu1:A;post mrilu2:P;posted mrilu3:D;post destination mrilu4:D;post oridin mrilu5:D;postal system # # x1 [tool] is a hammer for/hammers x2 [target] consisting of weight/head x3 propelled by x4 mruli1:D;hammer mruli2:P;hammered mruli3:D;hammer head mruli4:D;hammer propulsion # # x1 is immaterial/not physical/without material form mucti1:P;immaterial # # x1 is a quantity of/is made of/contains wood/lumber from tree(s) of type/species x2 mudri1:S;wood mudri2:S;wood species mudri2t:of species # # x1 (action/event/state) motivates/is a motive/incentive for action/event x2, per volition of x3 mukti1:D;motive mukti2:D;motivated event mukti3:P;motivated # # x1 (event) is complete/done/finished; x1 (object) has become whole in property x2 by standard x3 mulno1:P;complete mulno2:D;complete property mulno3:D;standard* for completeness # # x1 is a universe/cosmos [complete and ordered entirety] of domain/sphere x2 defined by rules x3 munje1:D;universe munje2:D;domain* of universe munje3:D;rule* for universe # # x1 is an example/sample/specimen/instance/case/illustration of common property(s) x2 of set x3 mupli1:D;example mupli2:D;example property mupli3:D;set* with example # # x1 is the [astronomical] twilight/dawn/dusk/half-light/glimmering of day x2 at location x3 murse1:S;twilight murse2:D;day* with twilight murse3:D;twilight location # # x1 is a curtain/blinds/drapes for covering/obscuring aperture x2, and made of material x3 murta1:D;curtain murta2:R;obscured by curtain murta3:D;curtain material # # x1 pertains to the Islamic/Moslem/Koranic [Quranic] culture/religion/nation in aspect x2 muslo1:P;Islamic muslo2:D;Islamic aspect # # x1 is much/extreme in property x2 (ka), towards x3 extreme/direction; x1 is, in x2, very x3 mutce1:P;extreme mutce2:D;extreme property mutce3:D;extreme # # x1 (object) moves to destination/receiver x2 [away] from origin x3 over path/route x4 muvdu1:P;moving muvdu2:D;movement destination muvdu2t:to muvdu3:D;movement origin muvdu3t:from muvdu4:D;movement route muvdu4t:via # # x1 is a museum for preserving [and possibly exhibiting] x2 at location x3 muzga1:D;museum muzga2:R;preserved at museum muzga3:D;museum location # # x1 (event/state) is a problem to/encountered by x2 in situation/task/inquiry x3 nabmi1:D;problem nabmi2:R;encountering problem nabmi3:D;problem situation # # x1 is a male/buck of species x2 evidencing masculine trait(s) x3 (ka); x1 is masculine nakni1:D;male nakni2:S;male species nakni3:D;male trait # # x1 is a/the wing [body-part] of x2; [metaphor: lateral supporting surface] nalci1:D;wing nalci2:P;winged # # x1 (li) is a number/quantifier/digit/value/figure (noun); refers to the value and not the symbol namcu1:D;number # # x1 is a quantity of/contains bread [leavened or unleavened] made from grains x2 nanba1:S;bread nanba2:D;bread source # # x1 is x2 years in duration (default is 1 year) by standard x3; (adjective:) x1 is annual nanca1:R;measured in years nanca1a:annual nanca2:D;number of years nanca3:D;year standard # # x1 is difficult/hard/challenging for x2 under conditions x3; x1 challenges (non-agentive) x2 nandu1:P;difficulty nandu2:I;have* difficulty nandu3:S;conditions for difficulty nandu3t:under conditions # # x1 is a boy/lad [young male person] of age x2 immature by standard x3 nanla1:D;boy nanla2:D;boy's age nanla3:D;boyhood standard # # x1 is a man/men; x1 is a male humanoid person [not necessarily adult] nanmu1:D;man nanmu1n:man/men # # x1 is a billionth/thousand-millionth [1x10**-9] of x2 in dimension/aspect x3 (default is units) nanvi1:D;10**-9 nanvi2:P;measured in 10**-9 nanvi3:D;10**-9 aspect # # x1 is a nut [body-part: hard-shelled fruit] from plant/species x2 with shell x3 and kernel x4 narge1:D;nut narge2:S;nut species narge3:D;nut shell narge4:D;nut kernel # # x1 is orange [color adjective] narju1:P;orange # # x1 (du'u) contradicts/denies/refutes/negates x2 (du'u) under rules/logic x3 natfe1:A;contradict natfe2:P;contradicted natfe3:S;contradiction logic # # x1 is a nation/ethnic group of peoples x2; [people sharing a history/culture] natmi1:D;nation natmi2:S;people of nation # # x1 is a quantity of/contains/is made of inert gas of type x2 [neon/argon/radon/xenon] navni1:S;inert gas navni2:S;inert gas type # # x1 is a canal/channel to x2 from x3 with route x4 naxle1:D;channel naxle2:D;channel destination naxle2t:to naxle3:D;channel origin naxle3t:to naxle4:D;channel route naxle4t:via # # x1 is the nose [body-part] of x2 with nostril(s)/nasal passage(s) x3; [metaphor: protrusion] nazbi1:D;nose nazbi1a:nazal nazbi2:D;body* with nose nazbi2t:of body nazbi3:nazal passage # # x1 is energy of type x2 in form x3 nejni1:S;energy nejni2:D;energy type nejni3:D;energy form # # x1 is fond of/likes/has a taste for x2 (object/state) nelci1:A;like nelci2:P;liked # # x1 is in/inside/within x2; x1 is on the inside/interior of x2 [totally within the bounds of x2] nenri1:S;contents nenri2:D;container # # x1 logically necessitates/entails/implies action/event/state x2 under rules/logic system x3 nibli1:P;logically necessitating nibli2:P;logically necessitated nibli3:D;logic system # # x1 is a nighttime of day x2 at location x3; (adjective:) x1 is at night/nocturnal nicte1:D;night-time nicte2:D;day* having night nicte3:D;location* of night # # x1 is made of/contains/is a quantity of nickel/other metal resistant to oxidation nikle1:S;nickel # # x1 [furniture items] furnishes x2 [location] serving purpose/function x3 nilce1:S;furniture nilce2:P;furnished nilce3:D;furniture purpose # # x1 is a quantity of citrus [fruit/tree, etc.] of species/strain x2 nimre1:S;citrus nimre2:D;citrus species nimre2t:of species # # x1 is a woman/women; x1 is a female humanoid person [not necessarily adult] ninmu1:D;woman/women ninmu1n:woman/women # # x1 is a nerve/neuron [body-part] of x2; [metaphor: information/control network connection] nirna1:D;nerve nirna2:D;body* having nerve # # x1 needs/requires/is dependent on/[wants] necessity x2 for purpose/action/stage of process x3 nitcu1:R;with need nitcu2:R;needed nitcu3:D;purpose* of need nitcu3t:for purpose # # x1 (agent) knits x2 [cloth/object] from yarn/thread x3 nivji1:A;knit nivji2:P;knitted nivji3:S;knitted yarn # # x1 is a girl [young female person] of age x2 immature by standard x3 nixli1:D;girl nixli2:S;girl's age nixli3:S;girlhood standard # # x1 is noble/aristocratic/elite/high-born/titled in/under culture/society/standard x2 nobli1:P;noble nobli2:S;culture defining nobility # # x1 is a message/notice/memorandum about subject x2 from author x3 to intended audience x4 notci1:D;message notci2:D;message subject notci2t:about notci3:D;message author notci4:D;message audience # # x1 is magenta/fuchsia/purplish-red [color adjective] nukni1:P;magenta # # x1 (agent) promises/commits/assures/threatens x2 (event/state) to x3 [beneficiary/victim] nupre1:A;promise nupre2:P;promised nupre3:R;receiving promise # # x1 is a rural/rustic/pastoral area of x2; x1 is in the country nurma1:D;rural area nurma1q:rural nurma2:R;having rural area nurma2t:of # # x1 is neutral/not taking sides/medial/not towards any extreme on scale/in dissension x2 nutli1:P;neutral nutli2:D;neutrality scale # # x1 (du'u) is news/tidings/new information about subject x2 from source x3, to observer x4 nuzba1:S;news nuzba2:D;news subject nuzba2t:subject nuzba3:D;news source nuzba3t:source(s) nuzba4:D;news observer nuzba4t:observer(s) # # x1 hopes/wishes for/desires x2 (event), expected likelihood x3 (0-1); x1 hopes that x2 happens pacna1:A;hope pacna2:P;hoped for pacna3:S;likelihood for hope # # x1 is a part/component/piece/portion/segment of x2 [where x2 is a whole/mass]; x2 is partly x1 pagbu1:D;part pagbu2:P;with part pagbu2t:part of # # x1 passes through/penetrates barrier/medium/portal x2 to destination side x3 from origin side x4 pagre1:A;penetrate pagre2:P;penetrated pagre3:D;destination* of penetration pagre3t:destination pagre4:D;origin* or penetration pagre4t:D;origin # # x1 judges/referees/arbitrates/is a judge determining/deciding matter x2 (abstract) pajni1:A;judge pajni2:D;judged matter # # x1 is evil/depraved/wicked [morally bad] by standard x2 palci1:P;wicked palci2:D;wickedness standard # # x1 are pants/trousers/slacks/leggings [legged garment] of material x2 palku1:S;trousers palku2:D;trouser material pulku2t:material(s) # # x1 is a tray/platter/flat container [pan/sheet/griddle] of contents x2, and made of material x3 palne1:D;tray palne2:S;tray contents palne3:D;tray material # # x1 is a plate/dish/platter/saucer [flat/mildly concave food service bed] made of material x2 palta1:D;plate palta2:D;plate material # # x1 is a pump/injector [tool/apparatus] pumping/inserting fluid x2 to x3 from x4 by means x5 pambe1:D;pump pambe2:P;pumped pambe3:D;pumping destination pambe3t:to pambe4:D;pumping origin pambe4t:from pambe5:S;pumping means # # x1 is an odor/fragrance/scent/smell emitted by x2 and detected by observer/sensor x3 panci1:D;smell panci2:A;emit* smell panci3:A;detect* smell # # x1 (agent) punctuates x2 (expression) with symbol/word x3 with syntactic/semantic effect x4 pandi1:A;punctuate pandi2:P;punctuated pandi3:S;punctuation pandi4:D;punctuation effect # # x1 is a quantity of/contains/is made of sponge/porous material panje1:S;sponge # # x1 is a park/land reserve managed by community/polity/company x2 for purpose x3 panka1:D;park panka2:S;park management panka3:D;park purpose # # x1 is a slice [thin flat portion] of x2 (mass) panlo1:D;slice panlo2:P;sliced # # x1 is at peace with x2 panpi1:R;at peace panpi2:R;at peace # # x1 parallels x2 differing only in property x3 (ka; jo'u/fa'u term) by standard/geometry x4 panra1:R;being parallel panra2:D;parallel reference panra3:D;different property panra4:D;parallel standard # # x1 protests/objects to/complains about x2 (event/state) to audience x3 with action x4 pante1:A;protest pante2:D;protest subject pante3:D;protest audience pante4:D;protest action # # x1 is a [biological] offspring/child/kid/hybrid of parent(s) x2; (adjective:) x1 is filial panzi1:S;offspring panzi2:R;having offspring # # x1 is a [physical] page/leaf of book/document/bound mass of pages x2 papri1:D;page papri2:R;having pages # # x1 (me'o, fraction) is a ratio/rate of x2 (quantity) with respect to x3 (quantity), [x2:x3] parbi1:D;ratio parbi2:R;having ratio parbi3:D;ratio reference # # x1 is a robe/tunic/gown/cloak/dress/[coveralls] [a long/full body garment] of material x2 pastu1:D;robe pastu2:D;robe material # # x1 is a father of x2; x1 begets/sires/acts paternal towards x2; [not necessarily biological] patfu1:D;father patfu2:P;with father patfu2v:having father # # x1 is a potato [an edible tuber] of variety/cultivar x2 patlu1:D;potato patlu2:D;potato variety # # x1 is a pot/kettle/urn/tub/sink, a deep container for contents x2, of material/properties x3 patxu1:D;pot patxu2:S;pot contents patxu3:D;pot material # # x1 is paper from source x2 pelji1:S;paper pelji2:D;paper source # # x1 is yellow/golden [color adjective] pelxu1:P;yellow # # x1 is a poem/verse about plot/theme/subject/pattern x2 by author x3 for intended audience x4 pemci1:D;poem pemci2:D;poem subject pemci3:A;write* poem pemci4:S;poem audience # # x1 is a pen using ink x2 applied by process x3 penbi1:D;pen penbi2:S;pen ink penbi3:D;ink application process # # x1 (agent) touches x2 with x3 [a locus on x1 or an instrument] at x4 [a locus on x2] pencu1:A;touch pencu2:P;touched pencu3:D;touching implement pencu4:D;touch locus # # x1 is/acts as a friend of/to x2 (experiencer); x2 befriends x1 pendo1:D;friend pendo2:R;having friend # # x1 meets/encounters x2 at/in location x3 penmi1:A;encounter penmi2:P;encountered penmi3:D;location* of encounter # # x1 thinks/considers/cogitates/reasons/is pensive about/reflects upon subject/concept x2 pensi1:A;consider pensi2:D;considered subject* # # x1 is a pear [fruit] of species/strain x2 perli1:D;pear perli2:S;pear species # # x1 is paste/pulp/dough/mash/mud/slurry [soft, smooth-textured, moist solid] of composition x2 pesxu1:S;paste pesxu2:S;paste composition # # x1 is 1x10**15 of x2 in dimension/aspect x3 (default is units) petso1:D;10**15 petso2:R;measured in 10**15 petso3:D;10**15 aspect # # x1 is a leaf of plant x2; x1 is foliage of x2 pezli1:D;leaf pezli1n:leaf/leaves pezli2:D;plant* with leaf pezli2t:of plant # # x1 is a trillionth [1x10**-12] of x2 in dimension/aspect x3 (default is units) picti1:D;10**-12 picti2:R;measured in 10**-12 picti3:D;10**-12 aspect # # x1 is a pin/peg (needle-shaped tool) for fastening to/piercing x2, of material/properties x3 pijne1:D;pin pijne2:R;pierced by pin pijne3:D;pin material # # x1 begs/pleads/supplicates/entreats/implores/beseeches/prays [asks with humility] x2 for x3 pikci1:A;plead pikci2:R;receiving plea pikci3:D;plea reason # # x1 is a ticket entitling x2 to entitlement/privilege x3 (event/state) under conditions x4 pikta1:D;ticket pikta2:D;ticket holder pikta3:D;privilege* of ticket pikta3t:privilege(s) pikta4:S;ticket privilege conditions pikta4t:conditions # # x1 is the product/total/result of factors/multiplicands (x2 and x3) x2 multiplied by x3 pilji1:D;product pilji2:D;multiplicand pilji3:D;multiplicand # # x1 is a crust/rind/peel/skin/hide/outer cover of x2 pilka1:D;crust pilka2:R;having crust # # x1 uses/employs x2 [tool, apparatus, machine, agent, acting entity, material] for purpose x3 pilno1:A;use pilno2:D;tool pilno3:D;purpose # # x1 is a/the feather/plume(s)/plumage [body-part] of animal/species x2 pimlu1:D;feather pimlu2:D;feathered animal # # x1 is a/the urine/piss/pee of x2 pinca1:S;urine pinca2:R;having urine # # x1 is poor/indigent/impoverished/lacking in goods/possessions/property x2 pindi1:P;poor pindi2:P;lacked # # x1 is a prisoner/captive of x2, restrained/held/confined by means/force x3 pinfu1:D;prisoner pinfu2:D;captor pinfu3:S;means of imprisonment # # x1 is a/the clitoris/penis [projecting reproductive organ; body-part] of x2 pinji1:D;penis pinji2:D;body* with penis # # x1 (text) is a comment/remark/observation about subject x2 expressed by x3 to audience x4 pinka1:D;comment pinka2:D;subject* of comment pinka3:A;express* comment pinka4:D;audience* for comment # # x1 is a pencil/crayon/stylus applying lead/marking material x2, frame/support [of material] x3 pinsi1:D;pencil pinsi2:D;pencil lead pinsi3:D;pencil material # # x1 is flat/level/horizontal in gravity/frame of reference x2 pinta1:P;level pinta2:D;level frame of reference # # x1 (agent) drinks/imbibes beverage/drink/liquid refreshment x2 from/out-of container/source x3 pinxe1:A;drink pinxe2:P;drunk pinxe3:D;drinking vessel # # x1 is a piano/harpsichord/synthesizer/organ; a keyboard musical instrument pipno1:D;keyboard instrument # # x1 is a picture/illustration representing/showing x2, made by artist x3 in medium x4 pixra1:D;picture pixra2:P;shown by picture pixra3:D;artist pixra4:S;art medium # # x1 is plump/fat/obese [excessively thick/bulbous/swollen] by standard x2 plana1:P;fat plana2:D;obesity standard # # x1 (agent) plans/designs/plots plan/arrangement/plot/[schematic] x2 for state/process x3 platu1:A;plan platu2:D;plan platu3:P;planned # # x1 pays/compensates/remunerates/[rewards] payment x2 to recipient/payee x3 for goods/services x4 pleji1:A;pay pleji2:D;payment pleji3:D;payee pleji4:R;paid for # # x1 is a/the pubic area/external genitalia [body-part] of x2 plibu1:P;pubic plibu2:D;body* with pubis # # x1 is a planet revolving around x2 with planetary characteristics x3, orbital parameters x4 plini1:D;planet plini2:R;orbited around plini3:S;planetary characteristics plini4:D;orbital parameter # # x1 (agent/object) leaps/jumps/springs/bounds to x2 from x3 reaching height x4 propelled by x5 plipe1:A;leap plipe2:D;leap destination plipe2t:tp plipe3:D;leap origin plipe3t:from plipe4:S;height plipe5:S;jump propulsion # # x1 is an apple [fruit] of species/strain x2 plise1:D;apple plise2:S;apple species # # x1 is a plane [2-dimensional shape/form] defined by points x2 (set); x1 is flat/[smooth] plita1:D;plane plita2:S;points defining plane # # x1 (agent) plows/furrows/tills [cuts into and turns up] x2 with tool x3 propelled by x4 plixa1:A;plough plixa2:P;ploughed plixa3:D;plough plixa4:D;plough propulsion # # x1 is complex/complicated/involved in aspect/property x2 (ka) by standard x3 pluja1:P;complex pluja2:D;complex property pluja3:D;complexity standard # # x1 (event/state) seems pleasant to/pleases x2 under conditions x3 pluka1:P;pleasant pluka2:P;pleased pluka3:S;pleasure conditions pluka3t:conditions # # x1 is a route/path/way/course/track to x2 from x3 via/defined by points including x4 (set) pluta1:D;route pluta2:D;route destination pluta2t:to pluta3:D;route origin pluta3t:from pluta4:S;points on route # # x1 (force) folds/creases x2 at locus/loci/forming crease(s)/bend(s) x3 polje1:A;fold polje2:P;folded polje3:D;fold # # x1 reflects Polynesian/Oceanian (geographic region) culture/nationality/languages in aspect x2 polno1:P;Polynesian polno2:D;Polynesian aspect # # x1 reflects Japanese culture/nationality/language in aspect x2 ponjo1:P;Japanese ponjo2:D;Japanese aspect # # x1 possesses/owns/has x2 under law/custom x3; x1 is owner/proprietor of x2 under x3 ponse1:A;possess ponse2:P;possessed ponse3:D;custom* defining possession # # x1 breaks/fractures/shatters/[splits/splinters/cracks] into pieces x2 porpi1:P;breaking porpi2:S;broken pieces # # x1 [ordered set] is sequenced/ordered/listed by comparison/rules x2 on unordered set x3 porsi1:P;ordered porsi2:D;ordering rule porsi3:D;unordered set # # x1 reflects Portuguese culture/nationality/language in aspect x2 porto1:P;Portuguese porto2:D;Portuguese aspect # # x1 is a profit/gain/benefit/advantage to x2 accruing/resulting from activity/process x3 prali1:D;profit prali2:D;beneficiary prali3:D;profitable activity # # x1 loves/feels strong affectionate devotion towards x2 (object/state) prami1:A;love prami2:P;loved # # x1 is perfect/ideal/archetypical/faultless/flawless/un-improvable in property/aspect x2 (ka) prane1:P;perfect prane2:D;perfect property # # x1 spreads/expands over/into x2 from initial state x3 preja1:P;spread preja2:D;domain* of spread preja3:D;state* before spreading # # x1 is a person/people (noun) [not necessarily human]; x1 displays personality/a persona prenu1:D;person # # x1 (quoted text) is a question/query about subject x2 by questioner x3 to audience x4 preti1:D;question preti2:D;question subject preti3:D;questioner preti4:D;questioner audience # # x1 is wise/sage about matter x2 (abstraction) to observer x3 prije1:P;sage prije2:D;topic* of sagacity prije3:A;observe sagacity # # x1 is a print/impression/image on/in surface x2 of/made by/using tool/press/implement/object x3 prina1:D;print prina2:D;surface* printed on prina3:D;printing press # # x1 is to the right/right-hand side of x2 which faces/in-frame-of-reference x3 pritu1:P;at the right pritu2:P;with something at the right pritu3:D;frame* of reference for right # # x1 is prose about plot/theme/subject x2 by author x3 for intended audience x4 prosa1:S;prose prosa2:D;prose subject prosa3:D;prose author prosa4:D;prose audience # # x1 is a process with inputs x2, outputs/results x3, passing through steps/stages x4 pruce1:D;process pruce2:D;process input pruce2t:with input pruce3:D;process output pruce3t:with output pruce4:D;process stage pruce4t:passing through stage # # (adjective:) x1 is elastic/springy pruni1:P;elastic # # x1 is spiritual/pertains to the soul in nature [either energy or being]; x1 is ghostly/ethereal pruxi1:P;spiritual # # x1 is dust/precipitate [suspensible solid] from x2 in medium/on surface x3 pulce1:S;dust pulce2:D;dust source pulce3:P;dusty # # x1 is a police officer/[enforcer/vigilante] enforcing law(s)/rule(s)/order x2 pulji1:D;police officer pulji2:P;enforced by police # # x1 is a pulley [tool] for performing action/function x2 rotating on axle x3 pulni1:D;pulley pulni2:D;pulley function pulni3:D;pulley axle # # x1 (agent) puts/places/sets x2 on/at surface/locus x3 punji1:A;place punji2:P;placed punji3:D;placement locus # # x1 is a swelling/protrusion/convexity [shape/form] at/in/on x2, of material x3 punli1:D;swelling punli2:D;swelling locus punli3:D;swelling material # # x1 is in the past of/earlier than/before x2 in time sequence; x1 is former; x2 is latter purci1:P;earlier purci2:P;later # # x1 is a garden/tended/cultivated field of family/community/farmer x2 growing plants/crop x3 purdi1:D;garden purdi2:D;gardener purdi3:D;garden plant # # x1 is a powder of material x2 purmo1:S;powder purmo2:D;powder material # # x1 (action/activity/behavior) is sane/rational by standard x2 racli1:P;sane racli2:D;sanity standard # # x1 is a rabbit/hare/[doe] of species/breed x2 ractu1:D;rabbit ractu2:S;rabbit species # # x1 is x2 radian(s) [metric unit] in angular measure (default is 1) by standard x3 radno1:P;measured in radians radno2:D;number* of radians radno3:D;radian standard # # x1 is an affix/suffix/prefix/combining-form for word/concept x2, form/properties x3, language x4 rafsi1:D;combining-form rafsi2:D;word rafsi3:D;property rafsi4:D;language # # x1 is located across/on the other side of gap/boundary x2 from x3; x1 is opposite (fi) x3 ragve1:P;opposite ragve2:D;boundary ragve3:P;opposite # # x1 reflects Iraqi culture/nationality in aspect x2 rakso1:P;Iraqi rakso2:D;Iraqi aspect # # x1 (object/person/event/situation) troubles/disturbs x2 (person) causing problem(s) x3 raktu1:A;disturb raktu2:P;disturbed raktu3:S;disturbance # # x1 is delicate/fragile/subtle/refined in property x2 (ka) ralci1:P;fragile ralci2:D;fragile property # # x1 is principal/chief/leader/main/[staple], most significant among x2 (set) in property x3 (ka) ralju1:P;principal ralju2:R;having principal ralju3:D;principal property # # x1 retains/keeps/holds x2 in its possession ralte1:A;keep ralte2:P;kept # # x1 yields/gives way/surrenders to x2 (force/agent) under conditions x3 randa1:A;surrender randa2:R;surrendered to randa3:S;surrender conditions # # x1 is a/the body organ [body-part] of body/species x2 performing function x3 rango1:D;body organ rango2:D;body* with organ rango3:D;organ functions # # x1 (event/state) continues/persists over interval x2; x1 (property - ka) is continuous over x2 ranji1:P;persistant ranji2:D;persistance interval # # x1 is a myth/legend, a culturally significant story about x2 in mythos x3 of culture x4 ranmi1:D;myth ranmi2:D;myth subject ranmi3:D;mythos ranmi4:D;culture* having myth # # x1 is a quantity of/contains/is made of bronze of composition including x2 ransu1:S;bronze ransu2:D;bronze composition # # x1 is soft/malleable/moldable/yielding to force x2 in conditions x3 ranti1:P;soft ranti2:D;force* producing softness ranti3:D;softness conditions # # x1 is ironic(al)/contrary to expectation x2 in state/property/aspect x3 ranxi1:P;ironic ranxi2:D;irony expectation ranxi3:D;ironic aspect # # x1 [action] repeats/is repeated for a total of x2 (quantity) occurrences rapli1:P;repeating rapli2:D;repeat count # # x1 is natural/spontaneous/instinctive, not [consciously] caused by person(s) rarna1:P;spontaneous # # x1 is a rat of species/breed x2 ratcu1:D;rat ratcu2:S;rat species # # x1 is an atom of element/atomic number x2 of isotope number/atomic weight x3 ratni1:D;atom ratni2:S;atomic number ratni3:D;isotope # # x1 is a/the tail/appendix [body-part] of x2; [metaphor: trailing, following portion/appendage] rebla1:D;tail rebla2:D;body* with tail # # x1 is a quantity of/contains meat/flesh from source/animal x2 rectu1:S;meat rectu2:D;meat source # # x1 is a human/human being/man (non-specific gender-free sense); (adjective:) x1 is human remna1:D;human # # x1 throws/launches/casts/hurls x2 to/at/in direction x3 (propulsion derives internally to x1) renro1:A;throw renro2:P;thrown renro3:D;throw direction # # x1 survives/endures/undergoes/abides/lasts/persists through x2 for interval/duration x3 renvi1:A;survive renvi2:D;adversity renvi3:D;survival interval # # x1 is a reptile of species/breed x2 respa1:D;reptile respa2:S;reptile species # # x1 is rich/wealthy in goods/possessions/property/aspect x2 ricfu1:P;rich ricfu2:D;wealth aspect # # x1 is repugnant to/causes disgust to x2 under conditions x3 rigni1:P;disgusting rigni2:P;disgusted rigni3:D;disgust conditions # # x1 is made of/contains/is a quantity of silver/argentum (Ag); [metaphor: valuable, tarnishing] rijno1:S;silver # # x1 (sequence/non-text quote) is a rhythm/beat of music/expressive form x2 rilti1:D;rhythm rilti2:R;having rhythm # # x1 rhymes/alliterates with x2 in language/phonetics x3, matching sound correspondence x4 (ka) rimni1:P;rhyming rimni2:R;rhymed with rimni3:D;rhyming language rimni4:D;rhyming sound # # x1 liquid/fluid drains/strains/flushes from source x2 through drain/strainer x3 by force x4 rinci1:P;draining rinci2:D;drainage source rinci3:D;drain rinci4:D;draining force # # x1 is restrained/held [back]/constrained/kept by restraint x2 against x3 (event) rinju1:P;restrained rinju2:D;restraint rinju3:P;prevented by restraint rinju3t:thing prevented # # x1 (event/state) effects/physically causes effect x2 (event/state) under conditions x3 rinka1:E;cause rinka2:E;caused rinka3:D;causal condition # # x1 (agent) greets/hails/[welcomes/says hello to]/responds to arrival of x2 in manner x3 (action) rinsa1:A;welcome rinsa2:P;welcomed rinsa3:S;manner of welcome rinsa3t:manner # # x1 [member] is rare/unusual/uncommon/atypical in property x2 (ka) among members of x3 (set) rirci1:P;rare rirci2:D;rare property rirci3:D;set* with rare property # # x1 is a parent of/raises/rears x2; x1 mentors/acts parental toward child/protege x2 rirni1:D;parent rirni2:R;having parent # # x1 is a river of land mass x2, draining watershed x3 into x4/terminating at x4 rirxe1:D;river rirxe2:R;having river rirxe3:D;watershed rirxe4:D;river destination # # x1 is a quantity of rice [a type of grain] of strain/cultivar x2 rismi1:S;rice rismi2:S;rice variety # # x1 is a/the heart [body-part] of x2; [emotional/shape metaphors are NOT culturally neutral] risna1:D;heart risna2:D;body* with heart # # x1 is a rite/ceremony/ritual for purpose/goal x2, by custom/in community x3, with form/rules x4 ritli1:D;ceremony ritli2:D;ceremony goal ritli3:D;ceremony community ritli4:D;ceremony form # # x1 avoids/evades/shuns/escapes/skirts [fate] x2 (event) through action/state x3 (event) rivbi1:A;avoid rivbi2:P;avoided rivbi3:D;avoidance action # # x1 is a quantity of/is made of/contains rock/stone of type/composition x2 from location x3 rokci1:S;rock rokci2:D;rock composition rokci3:D;rock location # # x1 is a highly reflective/polished non-tarnishing metallic surface, of metal x2 [often chromium] romge1:P;reflective romge2:D;reflective metal # # x1 reflects European culture/nationality/geography/Indo-European languages in aspect x2 ropno1:P;European ropno2:D;European aspect # # x1 engenders/procreates/begets x2 with coparent x3 rorci1:A;engender rorci2:P;engendered rorci3:A;co-engender # # x1 is thick in dimension/direction x2 by standard x3; [relatively long in smallest dimension] rotsu1:P;thick rotsu2:D;thick dimension rotsu3:D;thickness standard # # x1 is a rose [flower - characterized by prickly stem/fragrance] of species/strain x2 rozgu1:D;rose rozgu2:S;rose species rozgu2t:of species # # x1 is weak/feeble/frail in property/quality/aspect x2 (ka) by standard x3 ruble1:P;weak ruble2:D;weak property ruble3:D;weakness standard # # x1 is rough/coarse/uneven/[grainy/scabrous/rugged] in texture/regularity rufsu1:P;rough # # x1 melts [becomes liquid from solid state] at temperature x2 and pressure x3 runme1:P;melting runme2:D;melting temperature runme3:D;melting pressure # # x1 dissolves in solvent x2 forming solution/[suspension] x3 under conditions x4 runta1:P;dissolving runta2:D;solvent runta3:D;solution runta4:S;dissolve conditions # # x1 is measured in major-money-units (dollar/yuan/ruble) as x2 (quantity), monetary system x3 rupnu1:S;money rupnu2:D;money amount rupnu3:D;monetary system # # x1 reflects Russian culture/nationality/language in aspect x2 rusko1:P;Russian rusko2:D;Russian aspect # # x1 is an artifact; x1 is artificial; x1 is made/caused by people/se kulnu x2; x1 is man-made rutni1:P;artificial # # x1 [source] provides/supplies/furnishes x2 [supply/commodity] to x3 [recipient] sabji1:A;provide sabji2:R;provided sabji3:D;recipient # # x1 is a cabin of vehicle x2 sabnu1:D;cabin sabnu2:D;vehicle* with cabin # # x1 is a match [incendiary device] made of x2 sacki1:D;match sacki2:D;match material # # x1 (me'o) is the [decimal/binary] equivalent of fractional x2 (me'o) in base x3 (quantity) saclu1:D;decimal expansion saclu2:D;fraction saclu3:D;decimal base # # x1 reflects Saudi Arabian culture/nationality in aspect x2 sadjo1:P;Saudi Arabian sadjo2:D;Saudi Arabian aspect # # x1 sucks/is suction/vacuum/relatively low pressure of fluid/gas x2 relative to high pressure x3 sakci1:A;suck sakci2:P;sucked sakci3:D;suction source # # x1 slides/slips/glides on x2 sakli1:P;sliding sakli2:D;sliding surface # # x1 is made of/contains/is a quantity of sugar [sweet edible] from source x2 of composition x3 sakta1:S;sugar sakta2:D;sugar source sakta3:D;sugar composition # # x1 celebrates/recognizes/honors x2 (event/abstract) with activity/[party] x3 salci1:A;celebrate salci2:P;celebrated salci3:D;party # # x1 is sloped/inclined/slanted/aslant with angle x2 to horizon/frame x3 salpo1:P;sloped salpo2:D;slope angle salpo3:D;slope reference # # x1 (mass) is a quantity of salad [food] with ingredients/components including x2 salta1:S;salad salta2:D;salad ingredient # # x1 is a quantity of cassava/taro/manioc/tapioca/yam [edible starchy root] of species/strain x2 samcu1:S;cassava samcu2:S;cassava species # # x1 is simple/unmixed/uncomplicated in property x2 (ka) sampu1:P;simple sampu2:D;simple property # # x1 is sound produced/emitted by x2 sance1:D;sound sance2:A;produce* sound sance2t:producer # # x1 sings/chants x2 [song/hymn/melody/melodic sounds] to audience x3 sanga1:A;sing sanga2:P;sung sanga3:D;song audience # # x1 is conscious/aware of x2 (object/abstract); x1 discerns/recognizes x2 (object/abstract) sanji1:P;conscious sanji2:P;noticed # # x1 stands [is vertically oriented] on surface x2 supported by limbs/support/pedestal x3 sanli1:A;stand sanli2:D;standing surface sanli3:D;standing support # # x1 (mass) is a meal composed of dishes including x2 sanmi1:D;meal sanmi2:D;meal dish # # x1 is a sauce/topping/gravy/frosting for use with x2, containing ingredient(s) including x3 sanso1:D;sauce sanso2:R;accompanied by sauce sanso3:D;sauce ingredient # # x1 is an umbrella/parasol shielding x2 from x3, made of material x4, supported by x5 santa1:D;umbrella santa2:R;shielded by umbrella santa3:R;blocked by umbrella santa4:D;umbrella material santa5:D;umbrella support # # x1 (abstract) is necessary/required for continuing state/process x2 under conditions x3 sarcu1:P;necessary sarcu2:R;having necessity sarcu3:S;necessity conditions # # x1 supports/holds up/is underpinning of/[helps] x2 against force/opposition x3 with/by means x4 sarji1:A;support sarji2:P;supported sarji3:P;supported against sarji4:S;means for support # # x1 is a spiral/helix/whorl/[vortex] [shape/form] with limits x2, of dimensionality x3 sarlu1:D;helix sarlu2:D;helix limit sarlu3:D;helix dimension # # x1 is harmonious/concordant/in agreement/concord with x2 in property x3 (ka) sarxe1:P;harmonious sarxe2:P;harmonious sarxe3:D;agreed property # # x1 (mass of facts) is science of/about subject matter x2 based on methodology x3 saske1:S;science saske2:D;science subject saske3:D;science methodology # # x1 [measurement/match] is exact/precise to precision x2 in property/quantity x3 (ka/ni) satci1:P;exact satci2:D;precision satci2t:to precision satci3:D;exact property satci3t:in property # # x1 (agent) strokes/rubs/pets x2 with x3 satre1:A;stroke satre2:P;stroked satre3:D;stroking implement satre3t:implement # # x1 is a noise/din/clamor [sensory input without useful information] to x2 via sensory channel x3 savru1:D;noise savru2:A;experience* noise savru3:A;sense* noise # # x1 operates/drives/runs x2 [apparatus/machine] with goal/objective/use/end/function x3 sazri1:A;operate sazri2:P;operated sazri3:D;goal* of operating # # x1 is surface/face [bounded shape/form] of [higher-dimension] object x2, on side x3, edges x4 sefta1:D;surface sefta2:R;having surface sefta3:D;surface side sefta4:D;surface edge # # x1 is a cell/atom/unit/molecule of x2; x1 is an indivisible, most basic subunit of x2 selci1:P;indivisible selci2:R;having subunit # # x1 (agent) serves x2 with service x3 (activity); x1 is a servant (noun) of x2 performing x3 selfu1:A;serve selfu2:A;receive* service selfu3:D;service # # x1 reflects Semitic [metaphor: Middle-Eastern] language/culture/nationality in aspect x2 semto1:P;Semitic semto2:D;Semitic aspect # # x1 sneezes (intransitive verb) senci1:P;sneezing # # x1 doubts/is dubious/doubtful/skeptical/questions that x2 (du'u) is true senpi1:A;doubt senpi2:P;doubted # # x1 is a layer/stratum [shape/form] of x2 [material] within structure/continuum/composite x3 senta1:D;layer senta2:P;layered senta3:D;layered structure # # x1 dreams about/that x2 (fact/idea/event/state); x2 is a dream/reverie of x1 senva1:A;dream senva2:P;dreamed # # x1 is apart/separate from x2, separated by partition/wall/gap/interval/separating medium x3 sepli1:P;kept separate sepli2:P;kept separate from sepli2t:from sepli3:D;separating partition sepli3t:partition # # x1 are stairs/stairway/steps for climbing structure x2 with steps x3 serti1:S;stairway serti2:R;climbed by stairs serti3:D;step # # x1 (agent) inserts/interposes/puts/deposits x2 into interior x3/into among/between members of x3 setca1:A;insert setca2:P;inserted setca3:R;receiving insert # # x1 is a self/ego/id/identity-image of x2 sevzi1:D;ego sevzi2:R;having ego # # x1 is a fly [a small non-stinging flying insect] of species/breed x2 sfani1:D;fly sfani2:S;fly species # # x1 (agent) punishes x2 for infraction x3 (event/state/action) with punishment x4 (event/state) sfasa1:A;punish sfasa2:P;punished sfasa3:P;punishable sfasa4:D;punishment # # x1 is a sofa/couch (noun) sfofa1:D;sofa # # x1 dives/swoops [manner of controlled falling] to x2 from x3 sfubu1:A;dive sfubu2:D;diving destination sfubu2t:to sfubu3:D;diving origin sfubu3t:from # # x1 [sound source] whistles/makes whistling sound/note/tone/melody x2 siclu1:A;whistle siclu2:D;whistling sound # # x1 is a coin/token/is specie issued by x2 having value x3 of composition including x4 sicni1:D;coin sicni2:D;coin issuer sicni3:D;coin value sicni4:D;coin composition # # x1 (idea abstract) is an idea/concept/thought about x2 (object/abstract) by thinker x3 sidbo1:D;idea sidbo2:D;idea subject sidbo3:R;having idea # # x1 helps/assists/aids object/person x2 do/achieve/maintain event/activity x3 sidju1:A;help sidju2:A;receive* help sidju3:P;done with help # # x1 is a cigar/cigarette/cigarillo made from tobacco/smokable substance x2 by x3 sigja1:D;cigar sigja2:D;tobacco sigja3:D;cigar manufacturer # # x1 is a quantity of/contains/is made of silk produced by x2 silka1:S;silk silka2:D;silk source # # x1 is a portion/quantity of salt from source x2, of composition including x3 silna1:S;salt silna2:D;salt source silna3:S;salt composition # # x1 seems/appears to have property(ies) x2 to observer x3 under conditions x4 simlu1:A;seem simlu2:D;apparent property simlu3:D;observer of apparent property simlu3t:observer simlu4:S;conditions for observing apparent property simlu4t:conditions # # x1 is similar/parallel to x2 in property/quantity x3 (ka/ni); x1 looks/appears like x2 simsa1:P;similar simsa2:D;similarity reference simsa3:D;similarity property # # x1 (set) has members who mutually/reciprocally x2 (event [x1 should be reflexive in 1+ sumti]) simxu1:P;mutual simxu2:P;mutually done # # x1 is a snake/serpent of species/breed x2 since1:D;snake since2:D;snake breed # # x1 esteems/respects/venerates/highly regards x2 [object of respect] sinma1:A;esteem sinma2:P;esteemed # # x1 is the trigonometric sine of angle/arcsine x2 sinso1:D;sine sinso2:D;angle* with sine # # x1 is a sign/symbol/signal representing/referring/signifying/meaning x2 to observer x3 sinxa1:D;sign sinxa2:D;meaning* of sign sinxa3:D;observer* of sign # # x1 is asleep (adjective); x1 sleeps/is sleeping sipna1:P;sleeping # # x1 is straight/direct/line segment/interval between x2 and x3; (adjective:) x1 is linear sirji1:D;line sirji2:D;line start sirji3:D;line end # # x1 reflects Syrian culture/nationality in aspect x2 sirxo1:P;Syrian sirxo2:D;Syrian aspect # # x1 seeks/searches/looks for property x2 among set x3 (complete specification of set) sisku1:A;search sisku2:D;sought property sisku3:P;sought amongst # # x1 [agent] ceases/stops/halts/ends activity/process/state x2 [not necessarily completing it] sisti1:A;cease sisti2:P;ceased # # x1 cites/quotes/refers to/makes reference to source x2 for information/statement x3 (du'u) sitna1:A;quote sitna2:P;quoted sitna3:D;quotation purpose # # x1 is private/personal/privy/[secret/confidential/confined] to x2; x1 is not-public/hidden sivni1:P;private sivni2:R;having secret # # x1 is a skirt/kilt/dress of material x2; x1 is skirted [garment open at the bottom; not legged] skaci1:D;skirt skaci2:D;skirt material # # x1 is a computer for purpose x2 skami1:D;computer skami2:D;computer purpose # # x1 is a pelt/skin/hide/leather from x2 skapi1:D;skin skapi2:D;source* of skin # # x1 is/appears to be of color/hue x2 as perceived/seen by x3 under conditions x4 skari1:R;having colour skari2:D;hue skari3:A;perceive* colour skari4:S;colour conditions # # x1 tells about/describes x2 (object/event/state) to audience x3 with description x4 (property) skicu1:A;describe skicu2:P;described skicu3:D;audience* for describing skicu4:D;description # # x1 is a ski/skid/skate/runner for surface (of material) x2 supporting skier/skater/sled/cargo x3 skiji1:D;skate skiji2:R;skated over skiji3:R;supported by skate # # x1 is a cinema/movie/film about x2 [plot/theme/subject/activity], filmmaker x3, for audience x4 skina1:D;film skina2:D;film plot skina3:D;film-maker skina4:D;film audience # # x1 is cord/cable/rope/line/twine/cordage/woven strands of material x2 skori1:D;rope skori2:S;rope material skori2t:of material # # x1 reflects Gaelic/Scottish culture/nationality/language in aspect x2 skoto1:P;Scottish skoto2:D;Scottish aspect # # x1 is a groove/trench/furrow [shape/form] in object/surface x2 skuro1:D;groove skuro2:D;grooved surface skuro2t:in surface # # x1 is old/familiar/well-known to observer x2 in feature x3 (ka) by standard x4 slabu1:P;familiar slabu2:D;observer* of familiarity slabu2t:observer slabu3:D;familiar feature slabu3t:feature slabu4:S;standard of familiarity slabu4t:by standard # # x1 is a syllable in language x2 slaka1:D;syllable slaka2:D;syllabic language slaka2t:in language # # x1 is a quantity of/contains/is made of acid of composition x2; (adjective:) x1 is acidic slami1:S;acid slami2:S;acid composition # # x1 is a cylinder [shape/form] of material x2 slanu1:D;cylinder slanu2:S;cylinder material slanu2t:of material # # x1 is sour/tart to observer x2 slari1:P;sour slari2:D;sourness observer slari2t:to # # x1 is a quantity of/is made of/contains plastic/polymer of type/component unit(s) x2 slasi1:S;plastic slasi2:D;plastic type slasi2t:of type # # x1 is solid, of composition/material including x2, under conditions x3 sligu1:P;solid sligu2:S;composition of solid sligu3:S;solidity conditions sligu3t:under conditions # # x1 oscillates at rate/frequency x2 through set/sequence-of-states x3 (complete specification) slilu1:P;oscillating slilu2:D;frequency slilu3:D;oscillatory state # # x1 is a quantity of/contains/is made of sulfur/brimstone (S); [metaphor: foul odor, volcanic] sliri1:S;sulphur # # x1 reflects Slavic language/culture/ethos in aspect x2 slovo1:P;Slavic slovo2:D;Slavic aspect # # x1 is a/the muscle [body-part] controlling x2, of body x3; [metaphor: tools of physical power] sluji1:D;muscle sluji2:P;controlled by muscle(s) sluji2t:thing controlled sluji3:D;body* with muscle(s) sluji3t:body # # x1 is a quantity of/contains onions/scallions of type/cultivar x2 sluni1:D;onion sluni2:D;onion variety # # x1 is a mouse of species/breed x2 smacu1:S;mouse smacu2:S;mouse species smacu2:of species # # x1 guesses/conjectures/surmises x2 (du'u) is true about subject x3; [epistemology] smadi1:P;guess smadi2:P;guessed smadi3:D;subject* of guess # # x1 (source) is quiet/silent/[still] at observation point x2 by standard x3 smaji1:P;silent smaji2:D;observation point* for silence smaji2t:D;at point(s) smaji3:S;standard of silence smaji3t:by standard # # x1 is a monkey/ape/simian/baboon/chimpanzee of species/breed x2 smani1:D;monkey smani2:S;monkey species # # x1 is a sock/stocking [flexible foot and lower leg garment] of material x2 smoka1:D;sock smoka2:S;sock material # # x1 is a spoon/scoop (tool) for use x2, made of material x3 smuci1:D;spoon smuci2:D;spoon purpose smuci3:D;spoon material # # x1 is a meaning/interpretation of x2 recognized/seen/accepted by x3 smuni1:D;meaning smuni2:P;interpreted smuni3:A;accept* meaning # # x1 [agent] succeeds in/achieves/completes/accomplishes x2 as a result of effort/attempt/try x3 snada1:A;succeed snada2:D;accomplishment snada3:D;successful effort snada3t:by effort # # x1 is to the south/southern side of x2 according to frame of reference x3 snanu1:P;to the south snanu2:P;to the north snanu3:D;southness reference frame snanu3t:reference frame # # x1 is x2 seconds in duration (default is 1 second) by standard x3 snidu1:P;measured in seconds snidu2:D;number* of seconds snidu3:D;seconds standard # # x1 is made of/contains/is a quantity/expanse of snow snime1:S;snow # # x1 adheres/sticks to x2; (adjective:) x1 is sticky/gummy/adhesive snipa1:P;sticky snipa2:R;stuck to # # x1 is a sandwich/layering [not restricted to food] of x2 sandwiched between x3 snuji1:D;sandwich snuji2:D;sandwich filling snuji3:D;sandwich casing # # x1 is secure/safe from threat x2 (event) snura1:P;safe snura2:D;threat # # x1 (event/state) is an accident/unintentional on the part of x2; x1 is an accident snuti1:D;accident snuti2:A;cause* accident # # x1 is a quantity of soya [grain/bean] of species/strain x2 sobde1:S;soya sobde2:S;soya species # # x1 is a quantity of/contains/is made of alkali metal of type x2 [default sodium] sodna1:S;alkali sodna2:D;alkali type # # x1 is made of/contains/is a quantity of a carbonated beverage/soda of flavor/brand x2 sodva1:S;soda sodva2:D;soda type # # x1 reflects Russian empire/USSR/ex-USSR (Soviet]/CIS culture/nationality in aspect x2 softo1:P;Soviet softo2:D;Soviet aspect # # x1 is a quantity of/contains/is made of gold (Au); [metaphor: valuable, heavy, non-reactive] solji1:S;gold # # x1 is the sun of home planet x2 (default Earth) of race x3; (adjective:) x1 is solar solri1:D;sun solri2:D;planet* with sun # # x1 sows/plants x2 [crop/plants] at/in x3 sombo1:A;sow sombo2:P;sown sombo3:D;sowing location # # x1 is a soldier/warrior/fighter of army x2 sonci1:D;soldier sonci2:D;army # # x1 is a store/deposit/supply/reserve of materials/energy x2 in containment x3 sorcu1:D;stockpile sorcu2:P;stockpiled sorcu3:D;containment # # x1 is a quantity of sorghum of species/strain x2 sorgu1:S;sorghum sorgu2:S;sorghum species # # x1 is an egg/ovum/sperm/pollen/gamete of/from organism [mother/father] x2 sovda1:D;egg sovda2:A;create* egg # # x1 (event/action abstract) surprises/startles/is unexpected [and generally sudden] to x2 spaji1:P;surprising spaji2:P;surprised # # x1 (agent) polishes object/surface x2 with polish x3, applied using tool x4 spali1:A;polish spali2:P;polished spali3:S;polish spali4:D;polising tool # # x1 reflects Spanish-speaking culture/nationality/language in aspect x2 spano1:P;Spanish spano2:D;Spanish aspect # # x1 is a plant/herb/greenery of species/strain/cultivar x2 spati1:D;plant spati2:S;plant species spati2t:of species # # x1 is married to x2; x1 is a spouse of x2 under law/custom/tradition/system/convention x3 speni1:P;married speni2:P;married to speni3:D;custom* for marriage # # x1 [object/substance] is a piece/portion/lump/chunk/particle of x2 [substance] spisa1:S;portion spisa2:P;portioned # # x1 is a hospital treating patient(s) x2 for condition/injuries/disease/illness x3 spita1:D;hospital spita2:D;patient spita3:D;ailment # # x1 is broken/inoperable/broken down/non-utile/not usable for function x2 spofu1:P;broken spofu2:D;lost function # # x1 bursts/explodes/violently breaks up/decomposes/combusts into pieces/energy/fragments x2 spoja1:P;exploding spoja2:D;fragment # # x1 answers/replies to/responds to person/object/event/situation/stimulus x2 with response x3 spuda1:A;answer spuda2:D;stimulus spuda3:D;response # # x1 spits/expectorates x2 [predominantly liquid] from x3 to/onto x4 sputu1:A;spit sputu2:S;spit sputu3:D;spit source sputu3t:from sputu4:D;spit destination sputu4t:onto # # x1 is vertical/upright/erect/plumb/oriented straight up and down in reference frame/gravity x2 sraji1:P;vertical sraji2:D;vertical reference frame # # x1 [abrasive/cutting/scratching object/implement] scratches/[carves]/erodes/cuts [into] x2 sraku1:A;scratch sraku2:P;scratched # # x1 reflects Australian culture/nationality/geography/dialect in aspect x2 sralo1:P;Australian sralo2:D;Australian aspect # # x1 pertains to/is germane/relevant to/concerns/is related/associated with/is about x2 srana1:P;germaine srana2:R;pertained to # # x1 is a blade/expanse of grass of species x2 srasu1:S;grass srasu2:S;grass species # # x1 errs in doing/being/making mistake x2 (event), an error under conditions x3 by standard x4 srera1:A;err srera2:D;mistake srera3:S;error conditions srera4:D;error standard # # x1 reflects Sanskrit language/Sanskritic/Vedic culture/nationality in aspect x2 srito1:P;Sanskrit srito2:D;Sanskrit aspect # # x1 assumes/supposes that x2 (du'u) is true about subject x3; [epistemology] sruma1:A;assume sruma2:P;assumed sruma3:D;topic* of assumption sruma3t:about # # x1 encircles/encloses/is surrounding x2 in direction(s)/dimension(s)/plane x3 sruri1:P;enclosing sruri2:P;enclosed sruri3:D;enclosure direction # # x1 is honest/open/truthfully revealing to/candid/frank with x2 about matter/fact x3 stace1:P;honest stace2:A;experience* honesty stace3:D;matter* of candour # # x1 is the edible x2 portion of plant x3; x1 is a vegetable stagi1:D;vegetable stagi2:D;edible portion* of plant stagi2:D;plant* with edible part # # x1 is a quantity of/contains/is made of ceramic made by x2, of composition x3, in form/shape x4 staku1:S;ceramic staku2:A;make* ceramic staku3:S;ceramic composition staku4:D;ceramic form # # x1 remains/stays at/abides/lasts with x2 stali1:A;stay stali2:D;place* stayed at stali2t:at place(s) # # x1 is a/the stalk/stem/trunk [body-part] of plant/species x2; [metaphor: main support] stani1:D;stem stani2:D;plant* with stem # # x1 steps/treads on/in surface x2 using limbs x3 stapa1:A;tread stapa2:D;surface* treaded on stapa3:D;treading limb # # x1 is a quantity of soup/stew/olla/olio [food] of ingredients including x2 stasu1:S;soup stasu2:D;soup ingredient # # x1 has a talent/aptitude/innate skill for doing/being x2 stati1:P;talented stati2:D;talent # # x1 feels frustration about x2 (abstraction) steba1:P;frustrated steba2:D;frustration # # x1 (ka) is specific/particular/specialized/[special]/a defining property of x2 among x3 (set) steci1:P;specific steci2:P;special steci3:D;set* with special member steci3t:amongst # # x1 is a/the head [body-part] of x2; [metaphor: uppermost portion] stedu1:D;head stedu2:D;body* with head # # x1 is a lock/seal of/on/for sealing x2 with/by locking mechanism x3 stela1:D;lock stela2:P;locked stela3:D;locking mechanism # # x1 is x2 steradian(s) [metric unit] in solid angle (default is 1) by standard x3 stero1:R;measured in steradian stero2:D;number of steradians stero3:D;steradian standard # # x1 is to the west/western side of x2 according to frame of reference x3 stici1:P;to the west stici2:P;to the east stici3:D;westness reference frame stici3t:reference frame # # x1 (agent) suggests/proposes idea/action x2 to audience x3; x1 (event) inspires x2 in/among x3 stidi1:A;suggest stidi2:D;suggested idea stidi2t:idea stidi3:D;audience* of suggestion stidi3t:to audience # # x1 (event) adjusts/regulates/changes x2 (ka/ni) in amount/degree x3 stika1:A;adjust stika2:P;adjusted stika3:D;amount* of adjustment # # x1 is a chair/stool/seat/bench, a piece or portion of a piece of furniture intended for sitting stizu1:D;seat # # x1 is constant/invariant/unchanging in property x2 (ka) in response to stimulus/conditions x3 stodi1:P;constant stodi2:D;constant property stodi2t:in property stodi3:S;conditions for constancy stodi3t:under conditions # # x1 is to the east/eastern side of x2 according to frame of reference x3 stuna1:P;to the east stuna2:P;to the west stuna3:D;eastness reference frame stuna3t:reference frame # # x1 is a structure/arrangement/organization of x2 [set/system/complexity] stura1:D;structure stura2:P;structured # # x1 is an inherent/inalienable site/place/position/situation/spot/location of x2 (object/event) stuzi1:D;site stuzi2:P;sited # # x1 (si'o) is abstracted/generalized/idealized from x2 [something concrete] by rules x3 sucta1:D;abstraction sucta2:P;abstracted sucta3:D;abstraction rule # # x1 is dry of liquid x2; (adjective:) x1 is arid sudga1:P;dry sudga2:D;liquid # # x1 is a/the hoof [body-part] of x2 sufti1:D;hoof sufti1n:hoof/ves sufti2:P;hoofed # # x1 (event/state) is sudden/sharply changes at stage/point x2 in process/property/function x3 suksa1:P;sudden suksa2:D;discontinuity suksa3:R;suddenly changed # # x1 is a mathematical sum/result/total of x2 plus/increased by x3 sumji1:D;total sumji2:D;summand sumji3:D;summand # # x1 (experiencer) smells/scents (transitive verb) x2; x2 smells/has odor/scent to observer x1 sumne1:A;smell sumne2:P;smelled # # x1 is a/the argument of predicate/function x2 filling place x3 (kind/number) sumti1:D;argument sumti2:D;predicate sumti3:D;argument place # # x1 is a quantity of garlic [bulb] of species/strain x2 sunga1:S;garlic sunga2:S;garlic species # # x1 is a quantity of/made from/consists of wool [tight curly hair] from animal/species/source x2 sunla1:S;wool sunla2:D;wool source # # x1 relaxes/rests/is at ease in/by doing/being x2 (activity) surla1:A;relax surla2:P;relaxing # # x1 is fast/swift/quick/hastes/rapid at doing/being/bringing about x2 (event/state) sutra1:P;swift sutra2:E;event/state* achieved swiftly # # x1 is a quantity of/contains/is made of carbon/graphite/[diamond]/charcoal; x1 is organic tabno1:S;carbon # # x1 is a horn/trumpet/trombone/bugle [brass-wind/lip-reed musical instrument] tabra1:D;horn # # x1 [process] is a method/technique/approach/means for doing x2 (event) under conditions x3 tadji1:D;method tadji2:R;having method tadji3:D;method condition # # x1 studies/is a student of x2; x1 is a scholar; (adjective:) x1 is scholarly tadni1:A;study tadni1n:student tadni1a:scholarly tadni2:P;studied # # x1 is snug/tight on x2 in dimension/direction x3 at locus x4 tagji1:P;snug tagji2:R;fitted snugly tagji3:D;snug dimension tagji4:S;locus of snugness # # x1 (person) challenges x2 at/in property x3 talsa1:A;challenge talsa2:P;challenged talsa3:D;challenged property # # x1 is a tomato [fruit/vegetable/plant] of species/strain x2 tamca1:D;tomato tamca2:S;tomato species # # x1 is a/the thumb/big toe [body-part] on limb x2 of x3; [metaphor based on relative shape] tamji1:D;thumb tamji2:D;body* with thumb # # x1 is cousin to x2 by bond/tie x3; [non-immediate family member, default same generation] tamne1:D;cousin tamne2:R;having cousin tamne3:D;cousin bond # # x1 is a board/plank [3-dimensional long flat rectangle] of material x2 tanbo1:D;board tanbo2:D;board material # # x1 is a/the tongue [body-part] of x2; (metaphor: similar to nazbi, tamji, degji) tance1:D;tongue tance2:D;body* with tongue # # x1 is the trigonometric tangent of angle/arctangent x2 tanjo1:D;tangent tanjo2:D;angle* with tangent # # x1 is a quantity of tobacco [leaf] of species/strain x2 tanko1:S;tobacco tanko2:S;tobacco species # # x1 is a binary metaphor formed with x2 modifying x3, giving meaning x4 in usage/instance x5 tanru1:D;metaphor tanru2:D;metaphor modifier tanru2t:modifier tanru3:D;metaphor base tanru3t:base tanru4:D;metaphor meaning tanru4t:meaning tanru5:D;metaphor usage tanru5t:usage # # x1 is a pan/basin/tub/sink, a shallow container for contents x2, of material/properties x3 tansi1:D;basin tansi2:S;basin contents tansi2t:for contents tansi3:D;basin material tansi3t:of material # # x1 is a box/carton/trunk/crate for contents x2, and made of material x3 tanxe1:D;box tanxe2:D;box content tanxe3:S;box material # # x1 is a tile/cake [shape/form] of material x2, shape x3, thickness x4 tapla1:D;tile tapla2:D;tile material tapla2t:of material tapla3:D;tile shape tapla3t:of shape tapla4:D;tile thickness tapla4t:of thickness # # x1 is an embryo/zygote/fetus/fertilized egg with mother x2, and father x3 tarbi1:D;embryo tarbi2:D;embryo mother tarbi3:D;embryo father # # x1 is a star/sun with stellar properties x2 tarci1:D;star tarci2:D;stellar property # # x1 is a quantity of/contains/is made of tar/asphalt from source x2 tarla1:S;tar tarla2:D;tar source tarla2t:from source # # x1 [ideal] is the conceptual shape/form of object/abstraction/manifestation x2 (object/abstract) tarmi1:D;shape*/form* tarmi2:P;shaped # # x1 behaves/conducts oneself as/in-manner x2 (event/property) under conditions x3 tarti1:A;behave tarti2:S;behaviour tarti3:S;behaviour conditions tarti3t:under conditions # # x1 thirsts for x2; x1 needs/wants drink/fluid/lubrication x2 taske1:P;thirsty taske2:D;drink # # x1 is tired/fatigued by effort/situation x2 (event); x1 needs/wants rest tatpi1:P;tired tatpi2:P;tiring # # x1 is a/the breast/mammary/teat [body-part] of x2; [metaphor: projection providing liquid] tatru1:D;breast tatru2:D;body* with breast tatru2t:of body # # x1 talks/speaks to x2 about subject x3 in language x4 tavla1:A;talk tavla2:P;talked to tavla3:D;subject* of talk tavla4:D;language* of talk # # x1 is dress/a garment/clothing for wearing by x2 (gender/species/body part) serving purpose x3 taxfu1:D;garment taxfu2:A;wear* garment taxfu2t:worn on/by taxfu3:D;garment purpose taxfu3t:purpose # # x1 is a custom/habit/[ritual/rut] of x2 under conditions x3 tcaci1:D;custom tcaci2:R;having custom tcaci3:S;conditions for custom tcaci3t:under conditions # # x1 is a town/city of metropolitan area x2, in political unit x3, serving hinterland/region x4 tcadu1:D;town tcadu2:D;area* with town tcadu2t:of area tcadu3:D;political unit* with town tcadu3t:in political unit tcadu4:D;region* served by town tcadu4t:serving # # x1 is a station/node of/in/on transport/communication/distribution system/network x2 tcana1:D;node tcana2:D;network tcana2t:in network # # x1 is made of/contains/is a quantity of tea brewed from leaves x2 tcati1:S;tea tcati2:S;tea leaves # # x1 stretches/extends to range x2 [interval/extent] in dimension x3 from relaxed range x4 tcena1:P;stretchy tcena2:D;stretched range tcena2t:to range tcena3:D;stretch dimension tcena4:D;unstretched range tcena4t:from # # x1 (event/experience) misleads/deceives/dupes/fools/cheats/tricks x2 into x3 (event/state) tcica1:P;deceptive tcica2:P;deceived tcica3:D;result* of deception tcica3t:into # # x1 [agent] reads x2 [text] from surface/document/reading material x3; x1 is a reader tcidu1:A;read tcidu2:D;read text* tcidu3:D;reading material # # x1 [hours, {minutes}, {seconds}] is the time/hour of state/event x2 on day x3 at location x4 tcika1:S;time tcika2:P;having time tcika3:D;day* of time tcika3t:day tcika4:D;location* of time tcika4t:location # # x1 is a detail/feature/particular of x2 tcila1:D;detail tcila2:P;detailed # # x1 is weather at place/region x2; (adjective:) x1 is meteorological tcima1:S;weather tcima2:D;location* of weather # # x1 [state/property] is a situation/condition/state/position/are conditions/circumstances of x2 tcini1:S;circumstances tcini2:R;having circumstances tcini2t:of # # x1 is a label/tag of x2 showing information x3 tcita1:D;tag tcita2:R;having tag tcita3:S;tag information # # x1 is the time-duration/interval/period/[elapsed time] from time/event x2 to time/event x3 temci1:D;interval temci2:D;start event temci3:D;end event # # x1 is the exponential result of base x2 to power/exponent x3 tenfa1:D;exponential tenfa2:D;exponential base tenfa3:D;exponent # # x1 (property-ka) is a texture of x2 tengu1:D;texture tengu2:P;textured # # x1 is the Earth/the home planet of race x2; (adjective:) x1 is terrestrial/earthbound terdi1:S;earth terdi2:D;race* with home planet # # x1 fears x2; x1 is afraid/scared/frightened by/fearful of x2 (event/tu'a object) terpa1:P;fearful terpa2:R;causing fear # # x1 is a trillion [1x10**12] of x2 in dimension/aspect x3 (default is units) terto1:D;trillion terto2:R;counted in trillions terto2t:of terto3:D;trillion aspect # # x1 performs x2 [performance] for/before audience x3 tigni1:A;perform tigni2:D;performance tigni3:D;audience* for performance tigni3t:audience # # x1 kicks [hits with x1's foot/feet x4] x2 in/at locus x3, using x1's foot/feet x4 tikpa1:A;kick tikpa2:P;kicked tikpa3:D;locus of kick tikpa3n:locus/i of kick tikpa3t:kicked at/on tikpa4:S;kicking foot/feet # # x1 is heavy/weighty in mass/weight by standard x2 tilju1:P;heavy tilju2:S;standard of heaviness # # x1 obeys/follows the command/rule x2 made by x3; (adjective:) x1 is obedient tinbe1:R;obeying tinbe2:D;rule tinbe3:A;rule # # x1 is a quantity of/contains/is made of tin (Sn); [metaphor: cheap or base metal] tinci1:S;tin # # x1 is stiff/rigid/inflexible/resistant in direction x2 against force x3 under conditions x4 tinsa1:P;rigid tinsa2:D;rigid direction tinsa2t:in direction tinsa3:D;force* rigidly resisted tinsa3t:against force tinsa4:S;rigidity conditions tinsa4t:under conditions # # x1 hears x2 against background/noise x3; x2 is audible; (adjective:) x1 is aural tirna1:A;hear tirna2:R;heard tirna3:S;background noise # # x1 is a quantity of/contains/is made of iron (Fe); [metaphor: strong, durable, tarnishing] tirse1:S;iron # # x1 is a tiger/leopard/jaguar/[tigress] of species/breed x2 with coat markings x3 tirxu1:D;tiger tirxu2:S;tiger species tirxu2t:of species tirxu3:D;tiger markings tirxu3t:with markings # # x1 (object) fills/becomes stuffed [up]/inflates/blows up with material x2; x2 pours into x1 tisna1:R;becoming full tisna2:S;filler material tisna2t:with material # # x1 is sweet/sugary/saccharine to observer x2 titla1:P;sweet titla2:A;observe* sweetness titla2t:to observer # # x1 broadcasts/televises programming x2 via medium/channel x3 to television receiver x4 tivni1:A;broadcast tivni2:D;TV programme tivni3:D;TV channel tivni4:D;TV receiver # # x1 is a daughter of mother/father/parents x2; [not necessarily biological] tixnu1:D;daughter tixnu2:D;parent* of daughter tixnu2t:parent # # x1 is an oven [enclosure that heats its contents] for baking/heating/drying x2 toknu1:D;oven toknu2:P;baked # # x1 is a butterfly/moth of species/breed x2 toldi1:D;moth toldi2:S;moth species toldi2t:of species # # x1 is a tone/note of frequency/pitch x2 from source x3 tonga1:D;tone tonga2:D;tone pitch tonga2t:of pitch tonga3:D;tone source tonga3t:from source # # x1 is short in dimension/direction x2 (default longest dimension) by measurement standard x3 tordu1:P;short tordu2:D;short dimension tordu2t:in dimension tordu3:S;shortness standard tordu3t:by standard # # x1 twists under load/force/torsion x2 torni1:A;twist torni2:D;twisting force torni2t:under force # # x1 is superlative in property x2 (ka), the x3 extreme (ka; default ka zmadu) among set/range x4 traji1:P;superlative traji2:D;superlative property traji2t:in property traji3:D;superlative extreme traji3t:at extreme traji4:D;set* having superlative traji4t:amongst set # # x1 is a quantity of/contains/is made of nitrogen/ammonia/nitrates trano1:S;nitrogen # # x1 is taut/tense/strained tight in direction x2 trati1:P;taut trati2:D;taut direction trati2t:in direction # # x1 is a train [vehicle] of cars/units x2 (mass) for rails/system/railroad x3, propelled by x4 trene1:D;train trene2:S;train cars trene3:D;railway trene4:S;train propulsion trene4t:propelled by # # x1 is a tree of species/cultivar x2 tricu1:D;tree tricu2:D;tree species tricu2t:of species # # x1 attracts/appeals to/lures x2 (person/event) with property/quality x3 (ka) trina1:P;attractive trina2:P;attracted trina3:D;attractive property trina3t:with property # # x1 is posterior/behind/back/in the rear of x2 which faces/in-frame-of-reference x3 trixe1:P;at the back of trixe2:P;having back trixe3:S;reference frame defining back trixe3t:frame of reference # # x1 tries/attempts/makes an effort to do/attain x2 (event/state/property) by actions/method x3 troci1:A;try troci2:P;attempted troci3:D;method* tried troci3t:method # # x1 is strong/powerful/[tough] in property/quality x2 (ka) by standard x3 tsali1:P;strong tsali2:S;strong property tsali3:S;standard of strength # # x1 is an expanse of sky/the heavens at place x2; [celestial] tsani1:D;sky tsani2:D;place* with sky # # x1 is a seasoning/condiment/spice causing flavor/effect x2 (event/property) tsapi1:S;seasoning tsapi2:D;seasoning flavour # # x1(s) is/are (a) seed(s)/spore(s) [body-part] of organism x2 for producing offspring x3 tsiju1:D;seed tsiju2:D;organism* with seed tsiju2t:of organism tsiju3:S;offspring from seed tsiju3t:offspring produced # # x1 is a stage/platform/dais/[scaffold] at/in x2 supporting x3, made of material x4 tsina1:D;platform tsina2:D;platform location tsina2t:at location tsina3:R;supported by platform tsina3t:supporting tsina4:S;platform material tsina4t:of material # # x1 is a length of tubing/pipe/hollow cylinder [shape/form] of material x2, hollow of material x3 tubnu1:D;tube tubnu2:S;tube material tubnu2t:of material tubnu3:S;tube contents # # x1 [person] agrees with person(s)/position/side x2 that x3 (du'u) is true about matter x4 tugni1:A;agree tugni2:R;agreed with tugni3:D;agreed view tugni4:D;topic* of agreement # # x1 is a tulip (defined by flower shape) of species/strain x2 tujli1:D;tulip tujli2:S;tulip species tujli2t:of species # # x1 is a parcel/expanse of land at location x2; x1 is terrain tumla1:S;terrain tumla2:D;terrain location tumla2t:at # # x1 is a sibling of x2 by bond/tie/standard/parent(s) x3 tunba1:D;sibling tunba2:R;having sibling tunba3:D;parent* of sibling # # x1 is made of/contains/is a quantity of copper (Cu); [metaphor: reddish, electrical conductor] tunka1:S;copper # # x1 gulps/swallows tunlo1:A;gulp tunlo2:P;swallowed # # x1 (object, usually pointed) pokes/jabs/stabs/prods x2 (experiencer) tunta1:A;poke tunta2:P;poked # # x1 is a/the leg [body-part] of x2; [metaphor: supporting branch] tuple1:D;leg tuple2:D;body* with leg tuple2t:of body # # x1 governs/rules/is ruler/governor/sovereign/reigns over people/territory/domain/subjects x2 turni1:A;govern turni2:P;governed # # x1 is a tool/utensil/resource/instrument/implement used for doing x2; [form determines function] tutci1:D;utensil tutci2:D;utensil purpose # # x1 is territory/domain/space of/belonging to/controlled by x2 tutra1:D;domain tutra2:D;domain controller tutra2t:controlled by # # x1 is a quantity of air/normally-gaseous atmosphere of planet x2, of composition including x3 vacri1:S;air vacri2:D;planet* with air vacri3:S;air composition # # x1 (object/event) is important/significant to x2 (person/event) in aspect/for reason x3 (nu/ka) vajni1:P;important vajni2:D;importance finder vajni2t:to vajni3:D;importance reason # # x1 is a word meaning/causing x2 in language x3; (adjective: x1 is lexical/verbal) valsi1:D;word valsi2:D;word meaning valsi3:D;word language valsi3t:in language # # x1 (ni) is the equivalent value/worth of x2 [item(s) of value] to x3 for use/appreciation x4 vamji1:R;equivalent in value vamji2:R;having equivalent vamji3:D;equivalence observer vamji4:D;equivalence use # # x1 vomits/regurgitates x2; x1 throws x2 up; [violent] digestive expulsion vamtu1:A;vomit vamtu2:S;vomit # # x1 (ind./mass) is part of an environment/surroundings/context/ambience of x2 vanbi1:D;environment vanbi2:R;having environment # # x1 is an evening [from end-of-work until sleep typical for locale] of day x2 at location x3 vanci1:D;evening vanci2:D;day* of evening vanci2t:of day vanci3:D;location* of evening vanci3t:at location # # x1 is made of/contains/is a quantity of wine from fruit/grapes x2 vanju1:S;wine vanju2:D;wine fruit vanju2t:from fruit # # x1 contains/holds/encloses/includes contents x2 within; x1 is a vessel containing x2 vasru1:A;contain vasru2:S;contents # # x1 breathes/respires x2 [gas] vasxu1:A;breathe vasxu2:D;breath # # x1 [seller] sells/vends x2 [goods/service/commodity] to buyer x3 for amount/cost/expense x4 vecnu1:A;sell vecnu2:S;goods/commodity vecnu3:A;buy vecnu4:D;sale price # # x1 takes revenge on/retaliates against x2 (person) for wrong x3 (nu) with vengeance x4 (nu) venfu1:A;take* revenge venfu2:D;victim* of revenge venfu2t:on victim venfu3:D;reason* for revenge venfu3t:for reason venfu4:D;act* of vengeance venfu4t:vengeance # # x1 is spring/springtime [warming season] of year x2 at location x3; (adjective:) x1 is vernal vensa1:S;springtime vensa1a:vernal vensa2:D;year* of springtime vensa2t:of year vensa3:D;location* of spring vensa3t:at location # # x1 is a child/kid/juvenile [a young person] of age x2, immature by standard x3 verba1:D;child verba1n:child/children verba2:D;child's age verba3:S;standard of childhood verba3t:child by standard # # x1 is a/the vagina [body-part] of x2 vibna1:D;vagina vibna2:D;body* having vagina vibna2t:of body # # x1 is a video monitor/CRT/screen [machine] serving function x2 vidni1:D;screen vidni2:D;function* of screen vidni2t:serving function # # x1 is a virus of species/breed/defining property x2 capable of infecting [at] x3 vidru1:D;virus vidru2:S;virus species vidru2t:of species vidru3:R;susceptible to virus vidru3t:infecting # # (adjective:) x1 is fresh/unspoiled vifne1:P;fresh # # x1 [body] excretes waste x2 from source x3 via means/route x4 vikmi1:A;excrete* waste vikmi2:D;excreted waste vikmi3:D;source* of excreted waste vikmi3t:from source vikmi4:S;means of excretion # # x1 is thick/viscous under conditions x2 viknu1:P;thick viknu2:S;viscosity conditions viknu2t:under conditions # # x1 removes/subtracts/deducts/takes away x2 from x3 with/leaving result/remnant/remainder x4 vimcu1:A;remove vimcu2:P;removed vimcu3:D;source* of removal vimcu3t:from source vimcu4:D;remainder # # x1 is poisonous/venomous/toxic/a toxin to x2 vindu1:P;poisonous vindu2:D;poison victim # # x1 is an airplane/aircraft [flying vehicle] for carrying passengers/cargo x2, propelled by x3 vinji1:D;aircraft vinji2:D;aircraft cargo vinji2t:with cargo vinji3:A;propel* aircraft vinji3t:with propulsion # # x1 is a deputy/vice/subordinate in aspect [or organization principle] x2 (ka) to principal x3 vipsi1:P;subordinate vipsi2:D;aspect* of being subordinate vipsi2t:in aspect vipsi3:P;superordinate # # x1 is brave/valiant/courageous in activity x2 (event) by standard x3 virnu1:P;brave virnu2:D;activity* requiring bravery virnu3:S;standard of bravery virnu3t:by standard # # x1 sees/views/perceives visually x2 under conditions x3 viska1:A;see viska2:P;seen viska3:D;viewing condition # # x1 is irregular/occasional/intermittent in property/action/aspect x2 vitci1:P;irregular vitci2:S;irregular property vitci2t:in property # # x1 is a guest/visitor of x2 at place/event x3; x1 visits x2/x3 vitke1:A;visit vitke2:D;host vitke3:D;visited place*/event* vitke3t:place(s)/event(s) # # x1 is permanent/lasting/[eternal] in property x2 (ka) by standard x3 [time-span/expectant one] vitno1:P;permanent vitno2:S;permanent property vitno2t:in property vitno3:S;standard for permanence vitno3t:by standard # # x1 is a/the vulva [body-part] of x2 vlagi1:D;vulva vlagi2:D;body* with vulva vlagi2t:of body # # x1 is an event/state/act of violence vlile1:D;violent act* # # x1 is a logical alternation/disjunction, stating that x2 (du'u) and/or x3 (du'u) is/are true vlina1:D;logical disjunction vlina2:D;alternative* of disjunction vlina2t:alternative1 vlina3:D;alternative* of disjunction vlina3t:alternative2 # # x1 has the power to bring about x2 under conditions x3; x1 is powerful in aspect x2 under x3 vlipa1:P;powerful vlipa2:P;brought about by power vlipa3:S;conditions for exerting power # # x1 flies [in air/atmosphere] using lifting/propulsion means x2 vofli1:A;fly vofli2:S;lifting means # # x1 is a voice/speech sound of individual x2 voksa1:D;voice sound voksa2:R;having voice # # x1 is a doorway/gateway/access way between x2 and x3 of structure x4 vorme1:D;doorway vorme2:P;with doorway vorme3:P;with doorway vorme4:D;doorway structure vorme4t:structure # # x1 is a lever [tool] [of apparatus] for doing x2 [function/action], with fulcrum x3 and arm x4 vraga1:D;lever vraga2:D;purpose* of lever vraga3:D;fulcrum vraga4:D;lever arm # # x1 is a record of x2 (data/facts/du'u) about x3 (object/event) preserved in medium x4 vreji1:D;recording vreji2:D;recorded fact vreji3:D;recorded topic vreji3t:about topic vreji4:D;recording medium vreji4t:in medium # # x1 lies/rests/reclines/reposes on x2; x1 is reclining/recumbent/lying on x2 vreta1:A;recline vreta2:D;surface for reclining on vreta2t:on surface # # x1 (set/mass/ind.) is miscellaneous/various/assorted in property x2 (ka) vrici1:P;miscellaneous vrici2:D;miscellaneous property # # x1 is virtuous/saintly/[fine/moral/nice/holy/morally good] by standard x2 vrude1:P;virtuous vrude2:S;standard of virtue vrude2t:by standard # # x1 (ka) is a taste/flavor of/emitted by x2; x2 tastes of/like x1 vrusi1:D;taste vrusi2:R;having taste # # x1 reflects Ukrainian language/culture/nationality in aspect x2 vukro1:P;Ukrainian vukro2:D;Ukrainian aspect # # x1 dwells/lives/resides/abides at/inhabits/is a resident of location/habitat/nest/home/abode x2 xabju1:A;dwell xabju2:D;dwelling # # x1 is exactly/approximately half/semi-/demi-/hemi- of x2 by standard x3 xadba1:D;half xadba1n:half/halves xadba2:R;halved xadba3:S;standard for half xadba3t:by standard # # x1 is a/the body/corpus/corpse of x2; (adjective:) x1 is corporal/corporeal xadni1:D;body xadni1a:corporal xadni2:R;having body # # x1 hungers for x2; x1 needs/wants food/fuel x2 xagji1:P;hungry xagji2:D;subject* of hunger xagji2t:hungry for # # x1 is a oboe/clarinet/saxophone [reed musical instrument] with reed x2 xagri1:D;reed instrument xagri1t:instrument xagri2:D;reed* of instrument xagri2t:reed # # x1 is funny/comical to x2 in property/aspect x3 (nu/ka); x3 is what is funny about x1 to x2 xajmi1:P;funny xajmi2:P;amused xajmi3:D;aspect* of funniness xajmi3t:in aspect # # x1 (event) uses up/depletes/consumes/[wastes] x2 [resource] xaksu1:A;consume xaksu2:P;consumed # # x1 uses levity/is non-serious/frivolous about x2 (abstraction) xalbo1:P;flippant xalbo2:D;subject* of flippancy xalbo2t:about # # x1 is a quantity of/contains/is made of alcohol of type x2 from source/process x3 xalka1:S;alcohol xalka2:S;type of alcohol xalka2t:of type xalka3:D;alcohol source xalka3t:from source # # x1 (person) is panicked by crisis x2 (event/state) xalni1:P;panicked xalni2:D;crisis xalni2n:crisis(es) # # x1 (object/event) is good/beneficial/nice/[acceptable] for x2 by standard x3 xamgu1:P;good xamgu2:P;goodness beneficiary xamgu3:D;goodness standard # # x1 is x2 ampere(s) [metric unit] in current (default is 1) by standard x3 xampo1:R;measured in amperes xampo1t:measured xampo2:S;number of amperes xampo2t:number xampo3:S;standard for ampere xampo3t:by standard # # x1 is a sea/ocean/gulf/[atmosphere] of planet x2, of fluid x3; (adjective:) x1 is marine xamsi1:D;sea*/ocean* xamsi1a:marine xamsi2:D;planet* with sea xamsi3:S;sea fluid # # x1 is a/the hand [body-part] of x2; [metaphor: manipulating tool, waldo] xance1:D;hand xance2:D;body* with hand xance2t:of body # # x1 is nervous/anxious about x2 (abstraction) under conditions x3 xanka1:P;anxious xanka2:A;cause* anxiety xanka2t:cause xanka3:S;conditions for anxiety xanka3t:under conditions # # x1 [concept] exists in the imagination of/is imagined by/is imaginary to x2 xanri1:P;imagined xanri2:A;imagine # # x1 is an elephant of species/breed x2 xanto1:D;elephant xanto2:S;elephant species xanto2t:of species # # x1 is a weapon/arms for use against x2 by x3 xarci1:D;weapon xarci2:R;attacked by weapon xarci2t:to attack xarci3:D;weapon user # # x1 is a pig/hog/swine/[boar] [pork/ham/bacon-producer] of species/breed x2 xarju1:D;pig xarju2:S;pig species xarju2t:of species # # x1 is stubborn/willfully opposing/resisting x2 about x3 (event/state) xarnu1:P;stubborn xarnu2:P;wilfully resisted xarnu2t:thing resisted xarnu3:D;reason* for resistance xarnu3t:because # # x1 is a donkey/jackass of species/breed x2 xasli1:D;donkey xasli2:S;donkey species xasli2t:of species # # x1 is a/the sweat/perspiration from body x2, excreted by gland(s)/organs x3 xasne1:S;sweat xasne2:D;sweating body xasne3:D;sweating gland # # x1 is a letter/missive/[note] to intended audience x2 from author/originator x3 with content x4 xatra1:D;letter xatra2:D;audience* for letter xatra2t:to audience xatra3:D;author* of letter xatra3t:with author xatra4:D;content* of letter xatra4t:with content # # x1 is 1x10**-18 of x2 in dimension/aspect x3 (default is units) xatsi1:D;10**-18 xatsi2:R;measured in 10**-18 xatsi3:D;10**-18 aspect # # x1 reflects Asiatic culture/nationality/geography in aspect x2 xazdo1:P;Asiatic xazdo2:D;Asiatic aspect # # x1 hates/despises x2 (object/abstraction); x1 is full of hate for x2; x2 is odious to x1 xebni1:A;hate xebni2:P;hated # # x1 reflects Hebrew/Jewish/Israeli culture/nationality/language in aspect x2 xebro1:P;Hebrew xebro2:D;Hebrew aspect # # x1 is a hundred [100; 1x10**2] of x2 in dimension/aspect x3 (default is units) xecto1:D;hundred xecto2:R;measured in hundreds xecto2t:of xecto3:D;hundreds aspect # # x1 is a/the jaw [body-part] of x2 xedja1:D;jaw xedja2:D;body* with jaw xedja2t:of body # # x1 is black/extremely dark-colored [color adjective] xekri1:P;black # # x1 reflects Greek/Hellenic culture/nationality/language in aspect x2 xelso1:P;Greek xelso2:D;Greek aspect # # x1 (person) is kind to x2 in actions/behavior x3 xendo1:P;kind xendo2:A;receive* kindness xendo3:S;kind actions # # x1 regrets/rues (abstraction) x2; x1 is regretful/rueful/sorry/[remorseful] about x2 xenru1:A;regret xenru2:R;regretted # # x1 is 1x10**18 of x2 in dimension/aspect x3 (default is units) xexso1:D;10**18 xexso2:R;measured in 10**18 xexso3:D;10**18 aspect # # x1 reflects Hindi language/culture/religion in aspect x2 xindo1:P;Hindi xindo2:D;Hindi aspect # # x1 is a quantity of ink of color/pigment x2 used by writing device x3 xinmo1:S;ink xinmo2:S;ink color xinmo3:D;writing device* using ink xinmo3t:for writing device # # x1 is a horse/equine/[colt/mare/stallion/pony] of species/breed x2 xirma1:D;horse xirma2:S;horse species xirma2t:of species # # x1 is a wheel [tool] of device/vehicle x2, made of materials/having properties x3 xislu1:D;wheel xislu2:D;wheeled vehicle*/device* xislu2t:of vehicle/device xislu3:S;wheel material/properties xislu3t:of material/properties # # x1 reflects Hispano-American culture/nationalities in aspect x2 xispo1:P;Hispanic xispo2:D;Hispanic aspect # # x1 is bad for x2 by standard x3; x1 is poor/unacceptable to x2 xlali1:P;bad xlali2:A;suffer* badness xlali3:S;standard of badness # # x1 (agent) influences/lures/tempts x2 into action/state x3 by influence/threat/lure x4 xlura1:A;tempt xlura2:P;tempted xlura3:D;action*/state* resulting from temptation xlura3t:resulting action/state xlura4:D;temptation # # x1 is a hotel/inn/hostel at location x2 operated by x3 xotli1:D;hotel xotli2:D;hotel location xotli2t:at location xotli3:D;hotel operator xotli3t:operated by # # x1 reflects Arabic-speaking culture/nationality in aspect x2 xrabo1:P;Arabic xrabo2:D;Arabic aspect # # x1 (event) injures/harms/damages victim x2 in property x3 (ka) resulting in injury x4 (state) xrani1:R;causing harm xrani2:P;harmed xrani3:D;damaged aspect xrani4:S;damage # # x1 pertains to the Christian religion/culture/nationality in aspect x2 xriso1:P;Christian xriso2:D;Christian aspect # # x1 is a quantity of buckwheat/rhubarb/sorrel grass of species/strain x2 xruba1:S;buckwheat/rhubarb xruba2:S;buckwheat species xruba2t:of species # # x1 is a turkey [food/bird] of species/breed x2 xruki1:D;turkey xruki2:S;turkey species xruki2t:of species # # x1 is a/the flower/blossom/bloom [body-part] of plant/species x2; (adjective:) x1 is floral xrula1:D;flower xrula2:D;flowering plant # # x1 (agent) returns x2 to origin/earlier state x3 from x4; x1 moves/gives x2 back to x3 from x4 xruti1:A;return xruti2:P;returned xruti3:D;original state xruti3t:to xruti4:D;later state xruti4t:from # # x1 is an instance of substance/chemical/drug x2 (individual or mass) with purity x3 xukmi1:S;chemical xukmi2:D;chemical type xukmi2t:of type xukmi3:S;chemical purity # # x1 is red/crimson/ruddy [color adjective] xunre1:P;red # # x1 reflects Urdu language/culture/nationality in aspect x2 xurdo1:P;Urdu xurdo2:D;Urdu aspect # # x1 (agent) asserts/claims/declares x2 (du'u) is true [can be used for epistemology of authority] xusra1:A;assert xusra2:P;asserted # # x1 is smooth/even/[soft/silky] in texture/regularity xutla1:P;smooth # # x1 is a favorable connotation/sense/way-of-looking-at x2 used by x3 zabna1:D;favourable sense zabna2:R;viewed favourably zabna3:R;viewing favourably # # x1 is a gymnast at/performs gymnastics feat x2 zajba1:D;gymnast zajba2:D;gymnastic feat # # x1 [individual or mass of hard surfaces] grinds/pulverizes/crushes x2 into powder x3 zalvi1:A;grind zalvi2:P;ground zalvi3:S;powder produced by griding zalvi3t:into powder # # x1 approves of/gives favor to plan/action x2 (object/event) zanru1:A;approver zanru2:D;approved plan # # x1 is a market/store/exchange/shop(s) selling/trading (for) x2, operated by/with participants x3 zarci1:D;trading place zarci2:P;traded zarci3:A;trade # # x1 is a/the buttock(s)/arse/rear/seat [body-part] of x2; [metaphor: rounded surface, support] zargu1:S;buttocks zargu2:D;body* with buttocks zargu2t:of body # # x1 is temporary/not permanent/expected to change in property x2 (ka) by standard/expectant x3 zasni1:P;temporary zasni2:D;temporary property zasni2t:in property zasni3:S;standard for non-permanance zasni3t:by standard # # x1 exists/is real/actual/reality for x2 under metaphysics x3 zasti1:A;exist zasti2:A;observe* existence zasti3:S;metaphysics of existence # # x1 is a quantity of/contains/is made of soap from source x2 of composition including x3 zbabu1:S;soap zbabu2:S;soap source zbabu2t:from source zbabu3:S;soap composition zbabu3t:of composition # # x1 is a bay in/of coast/shoreline x2 zbani1:D;bay zbani2:D;shoreline* with bay zbani2t:in shoreline # # x1 makes/assembles/builds/manufactures/creates x2 out of materials/parts/components x3 zbasu1:A;make zbasu2:P;made zbasu3:S;material/part(s) # # x1 is a pedestal/base/stand/pallet supporting x2 (object/event), of materials/properties x3 zbepi1:D;pedestal zbepi2:R;supported by pedestal zbepi2t:supported zbepi3:S;pedestal material zbepi3t:of material # # x1 is a nest/house/lair/den/[home] of/for x2 zdani1:D;home zdani2:A;reside # # x1 (abstract) is amusing/entertaining to x2 in property/aspect x3; x3 is what amuses x2 about x1 zdile1:P;amusing zdile2:P;amused zdile3:D;amusing property # # x1 (event/state) is a punishable crime/[taboo/sin] to people/culture/judges/jury x2 zekri1:D;crime*/sin* zekri2:A;consider* as crime zekri2t:to judge # # x1 (experiencer) increases/is incremented/augmented in property/quantity x2 by amount x3 zenba1:P;augmented zenba2:D;augmented property zenba2t:in property zenba3:D;amount* of increase zenba3t:by amount # # x1 is 1x10**-21 of x2 in dimension/aspect x3 (default is units) zepti1:S;10**-21 zepti2:R;measured in 10**-21's zepti2t:of zepti3:D;units of 10**-21 zepti3t:in units # # x1 is 1x10**21 of x2 in dimension/aspect x3 (default is units) zetro1:S;10**21 zetro2:R;measured in 10**21's zetro2t:of zetro3:D;units of 10**21 zetro3t:in units # # x1 observes/[notices]/watches/beholds x2 using senses/means x3 under conditions x4 zgana1:A;observe zgana2:P;observed zgana3:S;means of observation zgana3t:using means zgana4:S;conditions for observation zgana4t:under conditions # # x1 is music performed/produced by x2 (event) zgike1:S;music zgike2:D;musical event zgike2t:produced by event # # x1 is free/at liberty to do/be x2 (event/state) under conditions x3 zifre1:R;at liberty zifre2:R;allowed by liberty zifre2t:to do/be zifre3:S;liberty conditions zifre3t:under conditions # # x1 is a quantity of/contains/is made of zinc (Zn); [metaphor: hard metal] zinki1:S;zinc # # x1 is purple/violet [color adjective] zirpu1:P;purple # # x1 (agent) invests resources x2 in investment x3 expecting return/profit x4 (object(s)/event) zivle1:A;invest zivle2:D;invested resource zivle2t:resource zivle3:D;investment zivle4:S;anticipated return # # x1 exceeds/is more than x2 in property/quantity x3 (ka/ni) by amount/excess x4 zmadu1:A;exceed zmadu2:P;exceeded zmadu3:D;property* of exceeding zmadu4:D;amount* of exceeding # # x1 is automatic in function x2 under conditions x3 zmiku1:P;automatic zmiku2:D;automatic function zmiku3:D;condition* for automation # # x1 is a volitional entity employing means/taking action x2 for purpose/goal x3/to end x3 zukte1:A;take* action zukte2:D;action zukte3:D;purpose* of action # # x1 is a quantity of maize/corn [grain] of species/strain x2 zumri1:S;maize zumri2:S;maize species zumri2t:of species # # x1 feels guilt/remorse about x2 (abstraction) zungi1:A;feel* guilt zungi2:D;cause* of guilt zungi2t:about # # x1 is to the left/left-hand side of x2 which faces/in-frame-of-reference x3 zunle1:R;at left zunle2:R;with left side zunle2t:of zunle3:S;reference for leftness zunle3t:facing/frame # # x1 (evt./state) interferes with/hinders/disrupts x2 (evt./state/process) due to quality x3 (ka) zunti1:A;hinder zunti2:P;hindered zunti3:D;nature of hindrance zunti3t:in way # # x1 sits [assumes sitting position] on surface x2 zutse1:A;sit zutse2:D;sitting surface # # x1 (object/event) is at/attending/present at x2 (event/location) zvati1:P;present zvati2:D;location* of presence zvati2t:location jbofihe-0.38/output.c100644 765 764 110433 7350750740 13657 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/output.c,v 1.31 2001/06/22 22:16:04 richard Exp $ Generate glossed output, calling the appropriate backend (latex, text, html etc). ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include "nodes.h" #include "functions.h" #include "cmavotab.h" #include "rpc_tab.h" #include "output.h" static DriverVector *drv; typedef enum { SHOW_NONE, SHOW_LOJBAN, /* Show just the lojban word */ SHOW_ENGLISH, /* Show just the translation */ SHOW_TAG_TRANS, /* Show just the translation of a tag */ SHOW_LOJBAN_AND_INDICATORS, /* Show just lojban for most, but both lojban and translation for indicators */ SHOW_BOTH /* Show lojban and translation */ } WhatToShow; /*+ Forward prototype +*/ static void output_internal(TreeNode *x, WhatToShow what); static void add_bracketing_internal(TreeNode *x, int *seq)/*{{{*/ { struct nonterm *y; int i, n; if (x->type == N_NONTERM) { y = &x->data.nonterm; y->number = 0; y->brackets = BR_NONE; switch (y->type) { case TERM: y->number = ++*seq; y->brackets = BR_ROUND; break; case SUMTI_2: case SUMTI_3: case SUMTI_4: case SUMTI_5: if (y->nchildren > 1) { y->number = ++*seq; y->brackets = BR_CEIL; } break; case SUMTI_5A: case SUMTI_5B: case NAME_SUMTI_6: if (prop_require_brac(x, NO)) { y->number = ++*seq; y->brackets = BR_CEIL; } break; case SUMTI: case SUMTI_1: case LAHE_SUMTI_6: case NAHE_BO_SUMTI_6: case FREE_VOCATIVE: if ((y->nchildren > 1) || (prop_require_brac(x, NO))) { y->number = ++*seq; y->brackets = BR_CEIL; } break; case SUMTI_TAIL_1A: if (prop_require_brac(x, NO)) { y->number = ++*seq; y->brackets = BR_CEIL; } break; case SELBRI_1: case SELBRI_2: case SELBRI_3: case SELBRI_4: case SELBRI_5: case SELBRI_6: if (y->nchildren > 1) { y->number = ++*seq; y->brackets = BR_FLOOR; } break; case MAIN_SELBRI: case METALINGUISTIC_MAIN_SELBRI: y->number = ++*seq; y->brackets = BR_TRIANGLE; break; case SENTENCE: case FRAGMENT: y->number = ++*seq; y->brackets = BR_SQUARE; break; case RELATIVE_CLAUSES: /* Drill to relative_clause_seq inside it */ if (y->children[0]->data.nonterm.nchildren > 1) { y->number = ++*seq; y->brackets = BR_ROUND; } break; case RELATIVE_CLAUSE: y->number = ++*seq; y->brackets = BR_ANGLE; break; case ABSTRACTION: y->number = ++*seq; y->brackets = BR_ANGLE; break; case TANRU_UNIT_1: if (y->nchildren > 1) { y->number = ++*seq; y->brackets = BR_BRACE; } break; case TANRU_UNIT_2: if (prop_require_brac(x, NO)) { y->number = ++*seq; y->brackets = BR_BRACE; } break; case FREE: y->number = ++*seq; y->brackets = BR_ROUND; break; case NUMBER: case LERFU_STRING: case MEX_OPERATOR: if (prop_require_brac(x, NO)) { y->number = ++*seq; y->brackets = BR_ROUND; } break; default: y->number = 0; y->brackets = BR_NONE; } n = y->nchildren; for (i=0; ichildren[i], seq); } } else if (x->type == N_ZEI) { x->data.zei.number = ++*seq; x->data.zei.brackets = BR_FLOOR; } } /*}}}*/ void add_bracketing_tags(TreeNode *top)/*{{{*/ /* Go through parse tree and mark specific non-terminals with bracketing type and sequence number */ { int seq = 0; add_bracketing_internal(top, &seq); } /*}}}*/ static void translate_bai (TreeNode *x, char *eng)/*{{{*/ { XBaiConversion *baiconv; XTenseCtx *xtc; char buffer[1024], *trans; eng[0] = 0; buffer[0] = 0; baiconv = prop_bai_conversion(x, NO); xtc = prop_tense_ctx(x, NO); if (baiconv) { static char *prefixes[] = {"", "se", "te", "ve", "xe"}; strcat(buffer, prefixes[baiconv->conv - 1]); } strcat(buffer, cmavo_table[x->data.cmavo.code].cmavo); if (xtc) { switch (xtc->ctx) { case TSC_OTHER: break; case TSC_SELBRI: break; case TSC_TERM: break; case TSC_NOUN: break; case TSC_LINK: break; case TSC_CONNECT: break; case TSC_JAITAG: strcat(buffer,"@JAI"); break; } } trans = translate(buffer); if (trans) { strcpy(eng, trans); } else { trans = translate(cmavo_table[x->data.cmavo.code].cmavo); if (trans) { strcpy(eng, trans); strcat(eng, " (CONV?)"); } else { strcpy(eng, "?"); } } } /*}}}*/ static void translate_se (TreeNode *x, char *eng)/*{{{*/ { char *trans; if (prop_dont_gloss(x, NO)) { eng[0] = 0; } else { trans = translate(cmavo_table[x->data.cmavo.code].cmavo); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } } } /*}}}*/ static void translate_goi (TreeNode *x, char *eng)/*{{{*/ { char *trans; if (prop_dont_gloss(x, NO)) { eng[0] = 0; } else { trans = translate(cmavo_table[x->data.cmavo.code].cmavo); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } } } /*}}}*/ static void translate_koha (TreeNode *x, char *eng)/*{{{*/ { char *trans; char *cmavo; cmavo = cmavo_table[x->data.cmavo.code].cmavo; trans = translate(cmavo); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } if (!strcmp(cmavo, "ke'a")) { XRelClauseLink *xrcl = prop_rel_clause_link(x, NO); if (xrcl) { XAntecedent *xan = prop_antecedent(xrcl->rel, NO); if (xan) { int bl = xan->node->data.nonterm.number; char tbuf[16]; strcat(eng, " #"); sprintf(tbuf, "%d", bl); strcat(eng, tbuf); } } } } /*}}}*/ static void get_cmavo_text_inside_node_internal(TreeNode *x, char *sofar)/*{{{*/ { struct nonterm *nt; int i, n; int selmao; char *t; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; n = nt->nchildren; for (i=0; ichildren[i]; get_cmavo_text_inside_node_internal(c, sofar); } } else if (x->type == N_CMAVO) { selmao = x->data.cmavo.selmao; switch (selmao) { case UI: case BAhE: case DAhO: case Y: case FUhO: break; default: t = cmavo_table[x->data.cmavo.code].cmavo; strcat(sofar, t); break; } } else if (x->type == N_BU) { strcat(sofar, x->data.bu.word); } return; } /*}}}*/ static char * get_cmavo_text_inside_node(TreeNode *x)/*{{{*/ { static char buffer[4096]; buffer[0] = 0; get_cmavo_text_inside_node_internal(x, buffer); return buffer; } /*}}}*/ static void translate_other_cmavo (TreeNode *x, char *eng)/*{{{*/ { char *trans; trans = translate(cmavo_table[x->data.cmavo.code].cmavo); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } } /*}}}*/ static void translate_indicator (TreeNode *x, char *loj, char *eng)/*{{{*/ { char *trans; int negated; char buffer[256]; XCaiIndicator *xci; if (prop_neg_indicator(x, NO)) { negated = 1; } else { negated = 0; } xci = prop_cai_indicator(x, NO); if (xci) { switch (xci->code) { case CC_CAI: strcpy(buffer, translate("cai")); break; case CC_SAI: strcpy(buffer, translate("sai")); break; case CC_RUhE: strcpy(buffer, translate("ru'e")); break; case CC_CUhI: strcpy(buffer, translate("cu'i")); break; case CC_RUhENAI: strcpy(buffer, translate("ru'enai")); break; case CC_SAINAI: strcpy(buffer, translate("sainai")); break; case CC_CAINAI: strcpy(buffer, translate("cainai")); break; case CC_PEI: strcpy(buffer, translate("pei")); break; case CC_PEINAI: strcpy(buffer, translate("peinai")); break; } strcat(buffer, " "); } else { buffer[0] = 0; } strcpy(loj, cmavo_table[x->data.cmavo.code].cmavo); if (negated) { strcat(loj, "nai"); } trans = translate(loj); if (trans) { strcat(buffer, trans); strcpy(eng, "{"); strcat(eng, buffer); strcat(eng, "..}"); } else { eng[0] = 0; } if (xci) { switch (xci->code) { case CC_CAI: strcat(loj, " cai"); break; case CC_SAI: strcat(loj, " sai"); break; case CC_RUhE: strcat(loj, " ru'e"); break; case CC_CUhI: strcat(loj, " cu'i"); break; case CC_RUhENAI: strcat(loj, " ru'enai"); break; case CC_SAINAI: strcat(loj, " sainai"); break; case CC_CAINAI: strcat(loj, " cainai"); break; case CC_PEI: strcat(loj, " pei"); break; case CC_PEINAI: strcat(loj, " peinai"); break; } } } /*}}}*/ static char * translate_tense_in_context(char *text, enum tense_contexts ctx)/*{{{*/ { char buffer[128]; char *trans; strcpy(buffer, text); /* Letting X be the cmavo to be looked up are, the cases addressed are : TERM : X le Y NOUN : le X Y SELBRI : le Z cu X Y LINK : i X bo Y CONNECT : Y gi'e X bo Z JAI : le jai X Y */ switch (ctx) { case TSC_OTHER: break; case TSC_TERM: strcat(buffer, "@TERM"); break; case TSC_NOUN: strcat(buffer, "@NOUN"); break; case TSC_SELBRI: strcat(buffer, "@SELBRI"); break; case TSC_LINK: strcat(buffer, "@LINK"); break; case TSC_CONNECT: strcat(buffer, "@CONNECT"); break; case TSC_JAITAG: strcat(buffer, "@JAI"); break; } trans = translate(buffer); if (trans) { return trans; } else { trans = translate(text); return trans; /* tough if null */ } } /*}}}*/ static void translate_tense (TreeNode *x, char *eng)/*{{{*/ { XTenseCtx *ctx; char buffer[128], *trans; eng[0] = 0; ctx = prop_tense_ctx(x, NO); if (ctx) { strcpy(buffer, cmavo_table[x->data.cmavo.code].cmavo); trans = translate_tense_in_context(buffer, ctx->ctx); if (trans) { strcpy(eng, trans); } else { fprintf(stderr, "No advanced translation found for %s\n", buffer); translate_other_cmavo(x, eng); } } else { fprintf(stderr, "No context found for tense cmavo at line %d column %d\n", x->start_line, x->start_column); translate_other_cmavo(x, eng); } } /*}}}*/ static void translate_time_offset (TreeNode *x, char *loj, char *eng)/*{{{*/ { XTenseCtx *ctx; char *trans; TreeNode *pu, *nai, *zi; pu = find_nth_cmavo_child(x, 1, PU); nai = find_nth_cmavo_child(x, 1, NAI); zi = find_nth_cmavo_child(x, 1, ZI); assert(pu); eng[0] = 0; ctx = prop_tense_ctx(x, NO); /* Try for the whole thing */ strcpy(loj, cmavo_table[pu->data.cmavo.code].cmavo); if (nai) { strcat(loj, cmavo_table[nai->data.cmavo.code].cmavo); } if (zi) { strcat(loj, cmavo_table[zi->data.cmavo.code].cmavo); } if (ctx) { trans = translate_tense_in_context(loj, ctx->ctx); if (trans) { strcpy(eng, trans); } else { char engbuf[256]; engbuf[0] = 0; trans = translate(cmavo_table[pu->data.cmavo.code].cmavo); strcat(engbuf, trans ? trans : "?"); if (nai) { trans = translate(cmavo_table[nai->data.cmavo.code].cmavo); strcat(engbuf, " "); strcat(engbuf, trans ? trans : "?"); } if (zi) { trans = translate(cmavo_table[zi->data.cmavo.code].cmavo); strcat(engbuf, " "); strcat(engbuf, trans ? trans : "?"); } strcpy(eng, engbuf); } } else { fprintf(stderr, "No context found for tense cmavo at line %d column %d\n", x->start_line, x->start_column); trans = translate(loj); } } /*}}}*/ static void translate_jai (TreeNode *x, char *eng)/*{{{*/ { XGlosstype *xgt; char buffer[128], *trans; strcpy(buffer, cmavo_table[x->data.cmavo.code].cmavo); eng[0] = 0; xgt = prop_glosstype(x, NO); if (xgt) { if (xgt->in_selbri) { if (xgt->is_tertau) { strcat(buffer, "_v"); } else { strcat(buffer, "_a"); } } else { if (xgt->is_tertau) { strcat(buffer, "_n"); } else { strcat(buffer, "_a"); } } } else { strcat(buffer, "_a"); } trans = translate(buffer); if (trans) { strcpy(eng, trans); } else { fprintf(stderr, "No advanced translation found for %s\n", buffer); translate_other_cmavo(x, eng); } } /*}}}*/ static char * translate_convertible(char *loj, TreeNode *basis)/*{{{*/ { char buffer[1024]; char *trans; XConversion *conversion; XGlosstype *gt; int conv; conversion = prop_conversion(basis, NO); if (conversion) { conv = conversion->conv; } else { conv = 1; } gt = prop_glosstype(basis, NO); if (gt) { if (gt->in_selbri) { if (gt->is_tertau) { trans = adv_translate(loj, conv, TCX_VERB); } else { trans = adv_translate(loj, conv, TCX_QUAL); } } else { /* In a sumti */ if (gt->is_tertau) { trans = adv_translate(loj, conv, TCX_NOUN); } else { trans = adv_translate(loj, conv, TCX_QUAL); } } if (trans) { return trans; } else { return NULL; } } else { sprintf(buffer, "%s%1d", loj, conv); trans = translate(buffer); if (trans) { return trans; } else { trans = translate(loj); if (trans) { if (conversion) { /* If we had to resort to a bare translation and there was a SE prefix, something is wrong. */ strcat(trans, " (CONV?)"); } return trans; } else { trans = translate_unknown(loj, conv, TCX_NOUN); if (trans) { return trans; } else { return NULL; } } } } } /*}}}*/ static void translate_brivla (TreeNode *x, char *eng)/*{{{*/ { char *trans; trans = translate_convertible(x->data.brivla.word, x); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } } /*}}}*/ static void translate_abstraction (TreeNode *x, char *eng)/*{{{*/ { char *trans; int code; char *cmavo; code = x->data.cmavo.code; cmavo = cmavo_table[code].cmavo; trans = translate_convertible(cmavo, x); if (trans) { strcpy(eng, trans); } else { eng[0] = 0; } } /*}}}*/ static void attempt_translation(char *loj, char *eng)/*{{{*/ { char *trans; trans = translate(loj); if (trans) { strcpy(eng, trans); } else { strcpy(eng, "?"); } } /*}}}*/ static void get_lojban_word_and_translation (TreeNode *x, char *loj, char *eng)/*{{{*/ { switch (x->type) { case N_CMAVO: if (prop_elidable(x, NO)) { strcpy(loj, make_uppercase(cmavo_table[x->data.cmavo.code].cmavo)); } else { strcpy(loj, cmavo_table[x->data.cmavo.code].cmavo); } eng[0] = 0; switch (x->data.cmavo.selmao) { case BAI: translate_bai(x, eng); break; case SE: translate_se(x, eng); break; case GOI: translate_goi(x, eng); break; case KOhA: translate_koha(x, eng); break; case NU: translate_abstraction(x, eng); break; case PU: case ZAhO: case VA: case FAhA: translate_tense(x, eng); break; case UI: case CAI: translate_indicator(x, loj, eng); break; case JAI: translate_jai(x, eng); break; default: translate_other_cmavo(x, eng); } break; case N_ZOI: sprintf(loj, "%s %s %s %s", x->data.zoi.form, x->data.zoi.term, x->data.zoi.text, x->data.zoi.term); attempt_translation(x->data.zoi.text, eng); break; case N_ZO: { char buffer[1024]; sprintf(loj, "zo %s", x->data.zo.text); attempt_translation(x->data.zo.text, buffer); sprintf(eng, "\"%s\"", buffer); } break; case N_ZEI: { /* For the translation, try 2 modes : glue together all the non-zei words with + signs and look that up. If the lookup is successful, good. If it fails, translate it a word at a time with zei translated as 'type-of' i.e. treat it pretty much like a tanru */ char *trans; int i, N = x->data.zei.nchildren; strcpy(loj, x->data.zei.sep_with_zei); trans = translate_convertible(x->data.zei.sep_with_plus, x); if (trans && trans[0] != '?') { strcpy(eng, trans); } else { /* A word at a time */ eng[0] = 0; for (i=0; i 0) strcat(eng, " type-of "); temp = build_string_from_node(x->data.zei.children[i]); trans = translate(temp); Free(temp); if (trans) strcat(eng, trans); else strcat(eng, "?"); } } } break; case N_LOhU: sprintf(loj, "lo'u %s le'u", x->data.lohu.text); attempt_translation(x->data.lohu.text, eng); break; case N_BU: sprintf(loj, "%s.bu", x->data.bu.word); attempt_translation(loj, eng); break; case N_BRIVLA: strcpy(loj, x->data.brivla.word); translate_brivla(x, eng); break; case N_CMENE: strcpy(loj, x->data.cmene.word); strcpy(eng, "[NAME]"); break; default: break; } } /*}}}*/ static void output_term(TreeNode *x, WhatToShow what)/*{{{*/ { XTermTags *xtt; char *trans; char tp[16]; int n, i; struct nonterm *y; y = &x->data.nonterm; if (what == SHOW_LOJBAN || what == SHOW_LOJBAN_AND_INDICATORS || what == SHOW_BOTH) { xtt = prop_term_tags(x, NO); if (xtt) { XTermTag *tag; (drv->start_tags)(); do { tag = &(xtt->tag); switch (tag->type) { case TTT_BRIVLA:/*{{{*/ trans = adv_translate(tag->brivla.x->data.brivla.word, tag->pos, TCX_TAG); if (!trans) trans = "?"; sprintf(tp, "%d", tag->pos); (drv->start_tag)(); (drv->write_tag_text)(tag->brivla.x->data.brivla.word, tp, trans, YES); break;/*}}}*/ case TTT_JAITAG:/*{{{*/ { char transbuf[1024]; (drv->start_tag)(); (drv->write_partial_tag_text)("jai+1: ("); output_internal(tag->jaitag.tag, SHOW_TAG_TRANS); sprintf(transbuf, "#%d)", tag->jaitag.inner_tu2->data.nonterm.number); (drv->write_partial_tag_text) (transbuf); } break;/*}}}*/ case TTT_JAI:/*{{{*/ trans = adv_translate(tag->brivla.x->data.brivla.word, tag->pos, TCX_TAG); if (!trans) trans = "?"; sprintf(tp, "%d", tag->pos); (drv->start_tag)(); (drv->write_tag_text)(tag->brivla.x->data.brivla.word, tp, trans, YES); break;/*}}}*/ case TTT_ABSTRACTION:/*{{{*/ { int code; char *cmavo; code = tag->abstraction.nu->data.cmavo.code; cmavo = cmavo_table[code].cmavo; trans = adv_translate(cmavo, tag->pos, TCX_TAG); if (!trans) trans = "?"; sprintf(tp, "%d", tag->pos); (drv->start_tag)(); (drv->write_tag_text)(cmavo, tp, trans, YES); } break; /*}}}*/ case TTT_ME:/*{{{*/ { char *trans, transbuf[1024]; (drv->start_tag)(); trans = adv_translate("me", tag->pos, TCX_TAG); sprintf(transbuf, trans, tag->me.sumti->data.nonterm.number); sprintf(tp, "%d..", tag->pos); (drv->write_tag_text)("me", tp, transbuf, YES); } break;/*}}}*/ case TTT_NUMBERMOI:/*{{{*/ { char *trans, lojbuf[128], transbuf[1024]; int code; int norl_code; char *cmavo; code = tag->numbermoi.moi->data.cmavo.code; cmavo = cmavo_table[code].cmavo; norl_code = tag->numbermoi.number_or_lerfu->data.nonterm.number; (drv->start_tag)(); trans = adv_translate(cmavo, tag->pos, TCX_TAG); if (trans) { sprintf(transbuf, trans, norl_code); } else { transbuf[0] = 0; } sprintf(lojbuf, "#%d-%s%d", norl_code, cmavo, tag->pos); (drv->write_tag_text)(lojbuf, "", transbuf, YES); } break; /*}}}*/ case TTT_GOhA:/*{{{*/ { int code; char *cmavo; char lojbuf[32]; code = tag->goha.goha->data.cmavo.code; cmavo = cmavo_table[code].cmavo; (drv->start_tag)(); sprintf(lojbuf, "%s%d", cmavo, tag->pos); (drv->write_tag_text)(lojbuf, "", "", YES); } break; /*}}}*/ case TTT_NUhA:/*{{{*/ { TreeNode *mex_operator = tag->nuha.mex_operator; int number = mex_operator->data.nonterm.number; char lojbuf[64]; sprintf(lojbuf, "#%d-%d", number, tag->pos); (drv->start_tag)(); (drv->write_tag_text)(lojbuf, "", "", YES); } break; /*}}}*/ case TTT_ZEI:/*{{{*/ { int number; char lojbuf[32]; number = tag->zei.zei->data.zei.number; sprintf(lojbuf, "#%d-%d", number, tag->pos); trans = adv_translate(tag->zei.zei->data.zei.sep_with_plus, tag->pos, TCX_TAG); if (!trans) trans = "?"; (drv->start_tag)(); (drv->write_tag_text)(lojbuf, "", trans, YES); } break; /*}}}*/ default: break; } xtt = xtt->next; } while (xtt); (drv->end_tags)(); } } n = y->nchildren; for (i=0; ichildren[i], what); } } /*}}}*/ static void output_simple_time_offset(TreeNode *x, WhatToShow what)/*{{{*/ { char loj[1024], eng[1024]; int i, n; loj[0] = 0; translate_time_offset(x, loj, eng); switch (what) { case SHOW_LOJBAN: case SHOW_LOJBAN_AND_INDICATORS: case SHOW_BOTH: n = x->data.nonterm.nchildren; for (i=0; idata.nonterm.children[i], SHOW_LOJBAN_AND_INDICATORS); } break; default: break; } switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: /* Translation */ if (eng[0]) { (drv->translation)(eng); } (drv->set_eols)(x->eols); break; case SHOW_TAG_TRANS: if (eng[0]) { (drv->write_tag_text)("", "", eng, NO); } break; default: break; } } /*}}}*/ static void output_sumti_tail(TreeNode *x, WhatToShow what)/*{{{*/ { int n, i; struct nonterm *y; TreeNode *c1; y = &x->data.nonterm; c1 = y->children[0]; n = y->nchildren; if (c1->data.nonterm.type == SUMTI_6) { switch (what) { case SHOW_LOJBAN: case SHOW_LOJBAN_AND_INDICATORS: case SHOW_BOTH: output_internal(c1, SHOW_LOJBAN); (drv->translation)(" "); /* Force block out in blocked output drivers */ break; default: break; } for (i=1; ichildren[i], what); } switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: (drv->translation)("[of]"); output_internal(c1, SHOW_ENGLISH); break; default: break; } } else { for (i=0; ichildren[i], what); } } } /*}}}*/ static void output_fore_or_afterthought(TreeNode *x, WhatToShow what)/*{{{*/ { XConnective *xcon; struct nonterm *y; int n, i; TreeNode *c; char buffer[64]; char *trans; xcon = prop_connective(x, NO); y = &x->data.nonterm; n = y->nchildren; if ((what == SHOW_LOJBAN) || (what == SHOW_LOJBAN_AND_INDICATORS) || (what == SHOW_BOTH)) { for (i=0; ichildren[i]; output_internal(c, SHOW_LOJBAN_AND_INDICATORS); } } /* Now output meaning */ if ((what == SHOW_ENGLISH) || (what == SHOW_TAG_TRANS) || (what == SHOW_BOTH)) { assert(xcon); switch (xcon->pos) { case CNP_AFTER: case CNP_GE: case CNP_GI: strcpy(buffer, xcon->pattern); switch (xcon->pos) { case CNP_AFTER: strcat(buffer, "@AFTER"); break; case CNP_GE: strcat(buffer, "@GE"); break; case CNP_GI: strcat(buffer, "@GI"); break; default: abort(); } trans = translate(buffer); if (trans) { if (what == SHOW_TAG_TRANS) { (drv->write_tag_text)("", "", trans, NO); } else { (drv->translation)(trans); } } break; case CNP_GE_STAG: /* This is what I think negations on this construct mean ... I think it translates as scalar negations of the two phrases. Perhaps there should be scalar negation of the connective? Except that could be within the stag itself, so I think my interpretation is OK. */ if (xcon->neg1) { if (what == SHOW_TAG_TRANS) { (drv->write_tag_text)("", "", "something other than", NO); } else { (drv->translation)("something other than"); } } break; case CNP_GE_JOIK: break; /* Don't put anything here */ case CNP_GI_STAG: /* Output the stag as though it occurred at the position of the gik in the middle of the sentence. Doesn't do anything yet about negations occurring on the connective - the reference grammar isn't even clear what these mean. */ if (what == SHOW_TAG_TRANS) { output_internal(xcon->js, SHOW_TAG_TRANS); } else { output_internal(xcon->js, SHOW_ENGLISH); } if (xcon->neg2) { if (what == SHOW_TAG_TRANS) { (drv->write_tag_text)("", "", "other than", NO); } else { (drv->translation)("other than"); } } break; case CNP_GI_JOIK: /* Output the joik as though it occurred at the position of the gik in the middle of the sentence. */ if (xcon->neg2) { if (what == SHOW_TAG_TRANS) { (drv->write_tag_text)("", "", "other than", NO); } else { (drv->translation)("other than"); } } if (what == SHOW_TAG_TRANS) { output_internal(xcon->js, SHOW_TAG_TRANS); } else { output_internal(xcon->js, SHOW_ENGLISH); } break; } } } /*}}}*/ static void output_clustered(TreeNode *x, WhatToShow what)/*{{{*/ { char *cluster, *trans; char localtrans[256]; char lojbuf[1024], lojbuf2[1024]; int i, n; TreeNode *c; struct nonterm *nt; XTenseCtx *ctx; ctx = prop_tense_ctx(x, NO); cluster = get_cmavo_text_inside_node(x); strcpy(lojbuf, cluster); strcpy(lojbuf2, cluster); /* May eventually want context dependence here since many of the cases are tag/tense sorts of thing */ /* Letting X be the cmavo to be looked up are, the cases addressed are : TERM : X le Y NOUN : le X Y SELBRI : le Z cu X Y LINK : i X bo Y CONNECT : Y gi'e X bo Z JAI : le jai X Y */ if (ctx) { switch (ctx->ctx) { case TSC_OTHER: break; case TSC_TERM: strcat(lojbuf, "@TERM"); break; case TSC_NOUN: strcat(lojbuf, "@NOUN"); break; case TSC_SELBRI: strcat(lojbuf, "@SELBRI"); break; case TSC_LINK: strcat(lojbuf, "@LINK"); break; case TSC_CONNECT: strcat(lojbuf, "@CONNECT"); break; case TSC_JAITAG: strcat(lojbuf, "@JAI"); break; } } trans = translate(lojbuf); if (!trans) { /* If no form with the @SELBRI etc tacked on, try to translate just the plain cluster without the contextual information added */ trans = translate(lojbuf2); } if (trans) { strcpy(localtrans, trans); if ((what == SHOW_LOJBAN) || (what == SHOW_LOJBAN_AND_INDICATORS) || (what == SHOW_BOTH)) { nt = &x->data.nonterm; n = nt->nchildren; for (i=0; ichildren[i]; output_internal(c, SHOW_LOJBAN_AND_INDICATORS); } } if ((what == SHOW_ENGLISH) || (what == SHOW_BOTH)) { (drv->translation)(localtrans); } } else { nt = &x->data.nonterm; n = nt->nchildren; for (i=0; ichildren[i]; output_internal(c, what); } } } /*}}}*/ static void output_internal(TreeNode *x, WhatToShow what)/*{{{*/ { char loj[1024], eng[1024]; int i, n; if (x->type == N_NONTERM) {/*{{{*/ struct nonterm *y; y = &x->data.nonterm; if (what == SHOW_BOTH || what == SHOW_LOJBAN || what == SHOW_LOJBAN_AND_INDICATORS) { (drv->open_bracket)(y->brackets, y->number); } if (y->type == SELBRI_3 &&/*{{{*/ y->nchildren == 2) { /* Special handling */ output_internal(y->children[0], what); switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: (drv->translation)("[type-of]"); break; default: break; } output_internal(y->children[1], what); /*}}}*/ } else if (y->type == TERM) {/*{{{*/ output_term(x, what); /*}}}*/ } else if (y->type == NO_CU_SENTENCE) {/*{{{*/ /* Special handling */ if (y->nchildren == 2) { /* not in 'insert elidables' mode */ output_internal(y->children[0], what); switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: (drv->translation)("[is, does]"); break; default: break; } output_internal(y->children[1], what); } else { int n = y->nchildren, i; for (i=0; ichildren[i], what); } } /*}}}*/ } else if (y->type == OBSERVATIVE_SENTENCE) {/*{{{*/ /* Special handling */ #if 0 /* This doesn't work too well in various cases, e.g. abstractors without an x1 before the selbri, and particular in poi/noi clauses. Leave out until this can be looked into. */ (drv->translation)("(there is)"); #endif output_internal(y->children[0], what); /*}}}*/ } else if (y->type == TIME_OFFSET) {/*{{{*/ output_simple_time_offset(x, what); /*}}}*/ } else if ((y->type == SPACE_INT_PROP) ||/*{{{*/ (y->type == INTERVAL_PROPERTY) || (y->type == NUMBER_MOI_TU2)) { output_clustered(x, what); /*}}}*/ } else if (y->type == SUMTI_TAIL) {/*{{{*/ output_sumti_tail(x, what); /*}}}*/ } else if (((y->type == SUMTI_5A) && (y->nchildren ==2)) ||/*{{{*/ ((y->type == SUMTI_TAIL_1) && (y->children[0]->data.nonterm.type == QUANTIFIER) && (y->children[1]->data.nonterm.type == SUMTI))) { int i, n; output_internal(y->children[0], what); if (what == SHOW_ENGLISH || what == SHOW_BOTH) { (drv->translation)("(of)"); } n = y->nchildren; for (i=1; ichildren[i], what); } /*}}}*/ } else if ((y->type == JEK) ||/*{{{*/ (y->type == JEK_OPT_KE) || (y->type == JEK_OPT_KEBO) || (y->type == EK) || (y->type == GIHEK) || (y->type == GEK) || (y->type == GIK) || (y->type == GUHEK)) { output_fore_or_afterthought(x, what); /*}}}*/ } else {/*{{{*/ n = y->nchildren; for (i=0; ichildren[i], what); } /*}}}*/ } if (what == SHOW_BOTH || what == SHOW_LOJBAN || what == SHOW_LOJBAN_AND_INDICATORS) { (drv->close_bracket)(y->brackets, y->number); } /*}}}*/ } else if (x->type == N_ZEI) {/*{{{*/ if (what == SHOW_BOTH || what == SHOW_LOJBAN || what == SHOW_LOJBAN_AND_INDICATORS) { (drv->open_bracket)(x->data.zei.brackets, x->data.zei.number); } /* FIXME : Need to do lojban word and translation stuff here. */ get_lojban_word_and_translation(x, loj, eng); switch (what) { case SHOW_LOJBAN: case SHOW_LOJBAN_AND_INDICATORS: case SHOW_BOTH: (drv->lojban_text)(loj); break; default: break; } /* Translation */ switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: if (eng[0]) { (drv->translation)(eng); } (drv->set_eols)(x->eols); break; case SHOW_TAG_TRANS: if (eng[0]) { (drv->write_tag_text)("", "", eng, NO); } (drv->set_eols)(x->eols); break; default: break; } if (what == SHOW_BOTH || what == SHOW_LOJBAN || what == SHOW_LOJBAN_AND_INDICATORS) { (drv->close_bracket)(x->data.zei.brackets, x->data.zei.number); } /*}}}*/ } else {/*{{{*/ /* Terminal token */ char lojbuf[1024]; lojbuf[0] = 0; get_lojban_word_and_translation(x, loj, eng); if (strchr("aeiou", loj[0])) { strcat(lojbuf, "."); } strcat(lojbuf, loj); if (x->type == N_CMENE) { strcat(lojbuf, "."); } switch (what) { case SHOW_LOJBAN: case SHOW_LOJBAN_AND_INDICATORS: case SHOW_BOTH: (drv->lojban_text)(lojbuf); break; default: break; } /* Translation */ switch (what) { case SHOW_ENGLISH: case SHOW_BOTH: if (eng[0]) { (drv->translation)(eng); } (drv->set_eols)(x->eols); break; case SHOW_LOJBAN_AND_INDICATORS: if ((x->type == N_CMAVO) && ((x->data.cmavo.selmao == UI) || (x->data.cmavo.selmao == BAhE) || (x->data.cmavo.selmao == Y) || (x->data.cmavo.selmao == DAhO) || (x->data.cmavo.selmao == FUhO))) { if (eng[0]) { (drv->translation)(eng); } (drv->set_eols)(x->eols); } break; case SHOW_TAG_TRANS: if (eng[0]) { (drv->write_tag_text)("", "", eng, NO); } (drv->set_eols)(x->eols); break; default: break; } } /*}}}*/ } /*}}}*/ void do_output(TreeNode *top, DriverVector *driver)/*{{{*/ { drv = driver; drv->initialise(); drv->prologue(); output_internal(top, SHOW_BOTH); drv->epilogue(); } /*}}}*/ jbofihe-0.38/output.h100644 765 764 3246 7350750740 13627 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/output.h,v 1.2 2001/05/28 21:30:15 richard Exp $ Header file shared between generic output code and the backend drivers. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #ifndef OUTPUT_H #define OUTPUT_H /*+ To stop multiple inclusions. +*/ #include "nodes.h" typedef struct { void (*initialise)(void); void (*prologue)(void); void (*epilogue)(void); void (*open_bracket)(BracketType type, int subscript); void (*close_bracket)(BracketType type, int subscript); void (*set_eols)(int); void (*lojban_text)(char *); void (*translation)(char *); void (*start_tags)(void); void (*end_tags)(void); void (*start_tag)(void); void (*write_tag_text)(char *, char *, char *, int); void (*write_partial_tag_text)(char *); } DriverVector; #endif /* OUTPUT_H */ jbofihe-0.38/output2elide.pl100644 765 764 5751 7350750740 15103 0ustar richardruser#!/usr/bin/env perl # Read the .output file from bison, and construct a table encoding the # rule/state information for use by the traceback feature. # $Header: /cvs/src/jbofihe/output2elide.pl,v 1.2 2001/02/02 22:21:49 richard Exp $ # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # while (<>) { last if (/^Grammar/); } $losubscript = $hisubscript = undef; while (<>) { # Read rules if (/^rule\s+([0-9]+)\s+subscript/) { $losubscript = $1 unless (defined $losubscript); $hisubscript = $1; } if (/^Terminals, with rules/) { $_ = ; last; } } %codes = (); # tokname -> bison code $locode = $hicode = undef; while (<>) { chomp; last if (/^\s*$/); next if (/^\s/); next if (/^\$/); m{^([^ \t]+)\s+\(([-0-9]+)\)} || die "Unmatched line [$_];"; $codes{$1} = $2; if (!(defined $locode) || ($locode > $2)) { $locode = $2; } if (!(defined $hicode) || ($hicode < $2)) { $hicode = $2; } } $state = undef; @toks = (); # state_no -> array of tokens that can be shifted while (<>) { chomp; if (/^state ([0-9]+)/) { $state = $1; next; } if (/^\s+([^ \t]+)\s+shift, and go to state ([0-9]+)/) { $code = $codes{$1}; if (!defined $code) { print STDERR "No code for $1 in state $state\n"; } else { push (@{$toks[$state]}, $codes{$1}); } } } # Write out table for each state $nentries = $hicode - $locode + 1; $blocks = 1 + ($nentries>>5); $blocks1 = $blocks - 1; print "#define CODE_OFFSET $locode\n"; print "#define BLOCKS_PER_STATE $blocks\n"; print "static unsigned long elitab[] = {\n"; $n = 0; for $s (0 .. $state) { @bits = (); for $t (@{$toks[$s]}) { $tt = $t - $locode; $b = $tt >> 5; $m = (1 << ($tt & 31)); if (!defined $bits[$b]) { $bits[$b] = $m; } else { $bits[$b] |= $m; } } for $b (0 .. $blocks1) { printf "0x%08lx", (defined $bits[$b]) ? $bits[$b] : 0; if ($b < $blocks1) { print ", "; } } if ($s < $state) { print ", "; } else { print " "; } print "/* state $s */\n"; } print "};\n\n"; # Write the highest and lowest rules defining subscripts print "#define LO_SUBSCRIPT $losubscript\n"; print "#define HI_SUBSCRIPT $hisubscript\n"; jbofihe-0.38/output2table.pl100644 765 764 12640 7350750740 15123 0ustar richardruser#!/usr/bin/env perl # Read the .output file from bison, and construct a table encoding the # rule/state information for use by the traceback feature. # $Header: /cvs/src/jbofihe/output2table.pl,v 1.1 2000/12/28 22:17:36 richard Exp $ # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # $prefix = shift || die "No prefix specified"; while (<>) { last if (/^Grammar/); } @lhs = (); @rhs = (); @rhsperrule = (); %codes = (); @decodes = (); $hicode = 0; while (<>) { chomp; last if (/^\s*$/); m{^rule ([0-9]+) +([a-zA-Z0-9_]+) \-\>[ \t](.*)$} || die "Unmatched rule [$_];"; $number = $1; $lhs = $2; $rhs = $3; if ($rhs =~ m{/\* empty \*/}) { @r = (); } else { @r = split(/ /, $rhs); } $lhs[$number] = $lhs; $rhs[$number] = [ @r ]; $rhsperrule[$number] = 1+$#r; if (!defined $codes{$lhs}) { $codes{$lhs} = $hicode++; } } while (<>) { if (/^Terminals/) { $_ = ; last; } } while (<>) { chomp; last if (/^\s*$/); next if (/^\s/); m{^([^ \t]+)} || die "Unmatched line [$_];"; $codes{$1} = $hicode++; } for $c (keys %codes) { $decodes[$codes{$c}] = $c; } $state = 0; @rules = (); # state -> array of rule numbers allowing shift @focus = (); # state -> array of posn of '.' in rules allowing shift @shift_toks = (); # state -> array of token names which can be shifted in that state @state_toks = (); # state -> number of tokens which can shift in that state @rulesperstate = (); # state -> number of rules with context in that state while (<>) { chomp; if (/^state ([0-9]+)/) { $state = $1; $rules[$state] = [ ]; $focus[$state] = [ ]; $shift_toks[$state] = [ ]; $rulesperstate[$state] = 0; $state_toks[$state] = 0; next; } if (/^[ \t]+([^ \t]+)[ \t]+\-\>[ \t]+(.+)[ \t]+\(rule[ \t]+([0-9]+)\)/) { $lhs = $1; $rhs = $2; $ruleno = $3; @r = split(/ /, $rhs); for ($i = 0; ; $i++) { last if ($r[$i] eq '.'); } push (@{$focus[$state]}, $i); push (@{$rules[$state]}, $ruleno); ++$rulesperstate[$state]; } if (/^\s+([^ \t]+)\s+shift, and go to state ([0-9]+)/) { push (@{$shift_toks[$state]}, $1); ++$state_toks[$state]; } } # Write token/nonterm table out print "static char *".$prefix."_toknames[] = {\n"; for $c (0 .. $#decodes) { print "\"".$decodes[$c]."\",\n"; } print "};\n"; # Write rule index table out $n=0; $t = 0; print "static unsigned short ".$prefix."_ruleindex[] = {\n"; for ($s=0;$s<=$#lhs;$s++) { print ", " unless ($n==0); printf "%d", $t; $n++; print "\n" if ($n%10 == 0); $t += $rhsperrule[$s]; } print "};\n"; # Write rule lhs table out $n=0; print "static unsigned short ".$prefix."_rulelhs[] = {\n"; for ($s=0;$s<=$#lhs;$s++) { print ", " unless ($n==0); printf "%d", $codes{$lhs[$s]}; $n++; print "\n" if ($n%10 == 0); } print "};\n"; # Write rule rhs table out $n=0; print "static unsigned short ".$prefix."_rulerhs[] = {\n"; for ($s=0;$s<=$#lhs;$s++) { for ($i=0;$i<=$#{$rhs[$s]};$i++) { print ", " unless ($n==0); printf "%d", $codes{$rhs[$s][$i]}; $n++; print "\n" if ($n%10 == 0); } } print "};\n"; # Write state index table out $n=0; $t = 0; print "static unsigned short ".$prefix."_stateindex[] = {\n"; for ($s=0;$s<=$state+1;$s++) { print ", " unless ($n==0); printf "%d", $t; $n++; print "\n" if ($n%10 == 0); $t += $rulesperstate[$s]; } print "};\n"; # Write focus table out $n=0; print "static unsigned char ".$prefix."_focus[] = {\n"; for ($s=0;$s<=$state;$s++) { for ($i=0;$i<=$#{$focus[$s]};$i++) { print ", " unless ($n==0); printf "%d", $focus[$s][$i]; $n++; print "\n" if ($n%10 == 0); } } print "};\n"; # Write rule_of_state table out $n=0; print "static unsigned short ".$prefix."_shiftrule[] = {\n"; for ($s=0;$s<=$state;$s++) { for ($i=0;$i<=$#{$rules[$s]};$i++) { print ", " unless ($n==0); printf "%d", $rules[$s][$i]; $n++; print "\n" if ($n%10 == 0); } } print "};\n"; # Write shift_toks table out $t = 0; $n = 0; print "static unsigned short ".$prefix."_shift_in_state_index[] = {\n"; for ($s=0;$s<=$state+1;$s++) { print ", " unless ($n==0); printf "%d", $t; $n++; print "\n" if ($n%10 == 0); $t += $state_toks[$s]; } print "};\n"; # Write table of tokens which can shift in each state $n=0; print "static unsigned short ".$prefix."_shift_in_state[] = {\n"; for ($s=0;$s<=$state;$s++) { for ($i=0;$i<=$#{$shift_toks[$s]};$i++) { print ", " unless ($n==0); printf "%d", $codes{$shift_toks[$s][$i]}; $n++; print "\n" if ($n%10 == 0); } } print "};\n"; jbofihe-0.38/patterns100644 765 764 6476 7350750740 13711 0ustar richardruser# $Id: patterns,v 1.5 2001/05/28 21:40:42 richard Exp $ # # Pattern matching dictionary # Precedences : *2+gasnu1:I;bring* about %1v *2+gasnu2:@1 *2+gasnu3:@2 *2+gasnu4:@3 *2+gasnu5:@4 *2+gasnu6:@5 *2+rinka1:I;cause* %1v *2+rinka2:@1 *2+rinka3:@2 *2+rinka4:@3 *2+rinka5:@4 *2+rinka6:@5 *2+zmadu1:R;more %1q *2+zmadu2:R;less %1q *2+zmadu2t:than *2+zmadu3:@2 *2+zmadu4:@3 *2+zmadu5:@4 *2+zmadu6:@5 *2+mleca1:R;less %1q *2+mleca2:R;more %1q *2+mleca2t:than *2+mleca3:@2 *2+mleca4:@3 *2+mleca5:@4 *2+mleca6:@5 *2+traji1:R;most %1q *2+traji2:S;set with superlative *2+traji2t:amongst *2+traji3:@2 *2+traji4:@3 *2+traji5:@4 *2+traji6:@5 *2+zenba1:I;increase* in %1v *2+zenba2:@2 *2+zenba3:@3 *2+zenba4:@4 *2+zenba5:@5 *2+jdika1:I;decrease* in %1v *2+jdika2:@2 *2+jdika3:@3 *2+jdika4:@4 *2+jdika5:@5 *2+ckaji1:P;%1q *2+ckaji2:@2 *2+ckaji2:@3 *2+ckaji2:@4 *2+ckaji2:@5 *2+simxu1:R;respectively %1v *2+simxu2:R;respectively %1v *2+simxu3:@2 *2+simxu4:@3 *2+simxu5:@4 *2+simxu6:@5 *1cmalu+1:D;small %1n *1cmalu+2:@2 *1cmalu+3:@3 *1cmalu+4:@4 *1cmalu+5:@5 *1barda+1:D;big %1n *1barda+2:@2 *1barda+3:@3 *1barda+4:@4 *1barda+5:@5 *1to'e+1:R;opposite of %1q *1to'e+2:@2 *1to'e+3:@3 *1to'e+4:@4 *1to'e+5:@5 *1na'e+1:R;other than %1q *1na'e+2:@2 *1na'e+3:@3 *1na'e+4:@4 *1na'e+5:@5 *1nu'o+1:R;potentially %1v *1nu'o+2:R;potentially %2v *1nu'o+3:R;potentially %3v *1nu'o+4:R;potentially %4v *1nu'o+5:R;potentially %5v *1ca'a+1:R;actually %1v *1ca'a+2:R;actually %2v *1ca'a+3:R;actually %3v *1ca'a+4:R;actually %4v *1ca'a+5:R;actually %5v *2+stuzi1:D;place* for %1v *2+stuzi2:@2 *2+stuzi3:@3 *2+stuzi4:@4 *2+stuzi5:@5 *2+zdani1:D;home* for %1n *2+zdani2:@2 *2+zdani3:@3 *2+zdani4:@4 *2+zdani5:@5 *2+carmi1:P;intensely %1q *2+carmi2:@2 *2+carmi3:@3 *2+carmi4:@4 *2+carmi5:@5 *2+milxe1:P;mildly %1q *2+milxe2:@2 *2+milxe3:@3 *2+milxe4:@4 *2+milxe5:@5 # jai+ something just raises a sumti in X1, # i.e. the translation is basically the same. *3jai+1:@1 *3jai+2:@2 *3jai+3:@3 *3jai+4:@4 *3jai+5:@5 *3jai+6:@6 # Abstractions have high priority and bind first. *4nu+1:D;event* of %1v *4nu+2:@1 *4nu+3:@2 *4nu+4:@3 *4nu+5:@4 *4nu+6:@5 *4mu'e+1:D;achievement* of %1v *4mu'e+2:@1 *4mu'e+3:@2 *4mu'e+4:@3 *4mu'e+5:@4 *4mu'e+6:@5 *4pu'u+1:D;process* of %1v *4pu'u+2:@1 *4pu'u+3:@2 *4pu'u+4:@3 *4pu'u+5:@4 *4pu'u+6:@5 *4za'i+1:D;state* of %1v *4za'i+2:@1 *4za'i+3:@2 *4za'i+4:@3 *4za'i+5:@4 *4za'i+6:@5 *4zu'o+1:D;activity* of %1v *4zu'o+2:@1 *4zu'o+3:@2 *4zu'o+4:@3 *4zu'o+5:@4 *4zu'o+6:@5 *4ka+1:D;quality* of %1v *4ka+2:@1 *4ka+3:@2 *4ka+4:@3 *4ka+5:@4 *4ka+6:@5 *4ni+1:S;amount of %1v *4ni+2:@1 *4ni+3:@2 *4ni+4:@3 *4ni+5:@4 *4ni+6:@5 *4jei+1:S;truth of %1v *4jei+2:@1 *4jei+3:@2 *4jei+4:@3 *4jei+5:@4 *4jei+6:@5 *4li'i+1:D;experience* of %1v *4li'i+2:@1 *4li'i+3:@2 *4li'i+4:@3 *4li'i+5:@4 *4li'i+6:@5 *4si'o+1:D;concept* of %1v *4si'o+2:@1 *4si'o+3:@2 *4si'o+4:@3 *4si'o+5:@4 *4si'o+6:@5 # zil+X is used to delete a place, the next component must be # read to determine which one. *4zi'o+1:- *4zi'o+2:- *4zi'o+3:- *4zi'o+4:- *4zi'o+5:- *4zi'o+pa+1:@2 *4zi'o+pa+2:@3 *4zi'o+pa+3:@4 *4zi'o+pa+4:@5 *4zi'o+pa+5:@6 *4zi'o+re+1:@1 *4zi'o+re+2:@3 *4zi'o+re+3:@4 *4zi'o+re+4:@5 *4zi'o+re+5:@6 *4zi'o+ci+1:@1 *4zi'o+ci+2:@2 *4zi'o+ci+3:@4 *4zi'o+ci+4:@5 *4zi'o+ci+5:@6 *4zi'o+vo+1:@1 *4zi'o+vo+2:@2 *4zi'o+vo+3:@3 *4zi'o+vo+4:@5 *4zi'o+vo+5:@6 *4zi'o+mu+1:@1 *4zi'o+mu+2:@2 *4zi'o+mu+3:@3 *4zi'o+mu+4:@4 *4zi'o+mu+5:@6 jbofihe-0.38/places.pl100644 765 764 2301 7350750741 13712 0ustar richardruser# # Script to make the gismu places table # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # $_=<>; while(<>) { $gis = substr($_,0,6); $gis =~ s/([^ ])[ ]*$/$1/; $gloss = substr($_, 61, 157-61); if (length($gis) == 5) { if ($gloss =~ / x5 /) { $high = 5; } elsif ($gloss =~ / x4 /) { $high = 4; } elsif ($gloss =~ / x3 /) { $high = 3; } elsif ($gloss =~ / x2 /) { $high = 2; } elsif ($gloss =~ / x1 /) { $high = 1; } print "#\n# ".$gloss."\n"; for ($i=1; $i<=$high; $i++) { print "#".$gis.$i.":DSAP;\n"; } } } jbofihe-0.38/properties.c100644 765 764 15311 7350750741 14473 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/properties.c,v 1.3 2000/12/04 23:47:51 richard Exp $ Manipulate property lists on tree nodes. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include "nodes.h" #include "functions.h" /*++++++++++++++++++++++++++++++ Internal function to search for a particular extension record within a particular tree node. ++++++++++++++++++++++++++++++*/ static Extension * lookup_extension(TreeNode *x, ExtensionType type) { Extension *y; y = x->ext; while (y && y->type != type) { y = y->next; } return y; } /*++++++++++++++++++++++++++++++ Lookup an existing extension record, or create a new one if not found. ++++++++++++++++++++++++++++++*/ static Extension * obtain_extension(TreeNode *x, ExtensionType type) { Extension *y; y = lookup_extension(x, type); if (!y) { y = new(Extension); y->type = type; y->next = x->ext; x->ext = y; } return y; } /* ================================================== */ /*++++++++++++++++++++++++++++++ Get the conversion extension for a treenode ++++++++++++++++++++++++++++++*/ static ExtensionData * fetch_conversion(TreeNode *x, int create, ExtensionType type) { Extension *y; y = create ? obtain_extension(x, type) : lookup_extension (x, type); if (y) { return &(y->data); } else { return NULL; } } /*++++++++++++++++++++++++++++++ Get the conversion extension for a treenode ++++++++++++++++++++++++++++++*/ XConversion * prop_conversion(TreeNode *x, int create) { return (XConversion *) fetch_conversion(x, create, EX_CONV); } /*++++++++++++++++++++++++++++++ Get the bai_conversion extension for a treenode ++++++++++++++++++++++++++++++*/ XBaiConversion * prop_bai_conversion(TreeNode *x, int create) { return (XBaiConversion *) fetch_conversion(x, create, EX_BAICONV); } /*++++++++++++++++++++++++++++++ Get the dont_gloss extension for a treenode ++++++++++++++++++++++++++++++*/ XDontGloss * prop_dont_gloss(TreeNode *x, int create) { return (XDontGloss *) fetch_conversion(x, create, EX_DONTGLOSS); } /*++++++++++++++++++++++++++++++ Get the term_vectors extension for a treenode ++++++++++++++++++++++++++++++*/ XTermVectors * prop_term_vectors(TreeNode *x, int create) { return (XTermVectors *) fetch_conversion(x, create, EX_TERMVECTORS); } /*++++++++++++++++++++++++++++++ Get the term_vector extension for a treenode ++++++++++++++++++++++++++++++*/ XTermVector * prop_term_vector(TreeNode *x, int create) { return (XTermVector *) fetch_conversion(x, create, EX_TERMVECTOR); } /*++++++++++++++++++++++++++++++ Get the term_tags extension for a treenode ++++++++++++++++++++++++++++++*/ XTermTags * prop_term_tags(TreeNode *x, int create) { return (XTermTags *) fetch_conversion(x, create, EX_TERMTAGS); } /*++++++++++++++++++++++++++++++ Get the glosstype extension for a treenode. We have to do some initialisation here. ++++++++++++++++++++++++++++++*/ XGlosstype * prop_glosstype(TreeNode *x, int create) { XGlosstype *result; result = (XGlosstype *) fetch_conversion(x, NO, EX_GLOSSTYPE); if (!result && create) { result = (XGlosstype *) fetch_conversion(x, YES, EX_GLOSSTYPE); result->is_tertau = 0; } return result; } /*++++++++++++++++++++++++++++++ Get the done_tu1 extension for a treenode ++++++++++++++++++++++++++++++*/ XDoneTU1 * prop_done_tu1(TreeNode *x, int create) { return (XDoneTU1 *) fetch_conversion(x, create, EX_DONETU1); } /*++++++++++++++++++++++++++++++ Get the done_s3 extension for a treenode ++++++++++++++++++++++++++++++*/ XDoneS3 * prop_done_s3(TreeNode *x, int create) { return (XDoneS3 *) fetch_conversion(x, create, EX_DONES3); } /*++++++++++++++++++++++++++++++ Get the tense_ctx extension for a treenode ++++++++++++++++++++++++++++++*/ XTenseCtx * prop_tense_ctx(TreeNode *x, int create) { return (XTenseCtx *) fetch_conversion(x, create, EX_TENSECTX); } /*++++++++++++++++++++++++++++++ Get the neg_indicator extension for a treenode ++++++++++++++++++++++++++++++*/ XNegIndicator * prop_neg_indicator(TreeNode *x, int create) { return (XNegIndicator *) fetch_conversion(x, create, EX_NEGINDICATOR); } /*++++++++++++++++++++++++++++++ Get the cai_indicator extension for a treenode ++++++++++++++++++++++++++++++*/ XCaiIndicator * prop_cai_indicator(TreeNode *x, int create) { return (XCaiIndicator *) fetch_conversion(x, create, EX_CAIINDICATOR); } /*++++++++++++++++++++++++++++++ Get the tense_ctx extension for a treenode ++++++++++++++++++++++++++++++*/ XConnective * prop_connective(TreeNode *x, int create) { return (XConnective *) fetch_conversion(x, create, EX_CONNECTIVE); } /*++++++++++++++++++++++++++++++ Get the antecedent extension for a treenode ++++++++++++++++++++++++++++++*/ XAntecedent * prop_antecedent(TreeNode *x, int create) { return (XAntecedent *) fetch_conversion(x, create, EX_ANTECEDENT); } /*++++++++++++++++++++++++++++++ Get the require_brac extension for a treenode ++++++++++++++++++++++++++++++*/ XRequireBrac * prop_require_brac(TreeNode *x, int create) { return (XRequireBrac *) fetch_conversion(x, create, EX_REQUIREBRAC); } /*++++++++++++++++++++++++++++++ Get the rel_clause_link extension for a treenode ++++++++++++++++++++++++++++++*/ XRelClauseLink * prop_rel_clause_link(TreeNode *x, int create) { return (XRelClauseLink *) fetch_conversion(x, create, EX_RELCLAUSELINK); } /*++++++++++++++++++++++++++++++ Get the contains_keha extension for a treenode ++++++++++++++++++++++++++++++*/ XContainsKeha * prop_contains_keha(TreeNode *x, int create) { return (XContainsKeha *) fetch_conversion(x, create, EX_CONTAINSKEHA); } /*++++++++++++++++++++++++++++++ Get the elidable extension for a treenode ++++++++++++++++++++++++++++++*/ XElidable * prop_elidable(TreeNode *x, int create) { return (XElidable *) fetch_conversion(x, create, EX_ELIDABLE); } jbofihe-0.38/reduced_cmavo100644 765 764 105244 7350750742 14704 0ustar richardruser.a A sumti or .a'a UI1 attentive .a'acu'i UI*1 inattentive .a'anai UI*1 avoiding .a'e UI1 alertness .a'enai UI*1 exhaustion .a'i UI1 effort .a'icu'i UI*1 no special effort .a'inai UI*1 repose .a'o UI1 hope .a'onai UI*1 despair .a'u UI1 interest .a'ucu'i UI*1 disinterest .a'unai UI*1 repulsion .abu BY* a .ai UI1 intent .aicu'i UI*1 indecision .ainai UI*1 refusal .au UI1 desire .aucu'i UI*1 indifference .aunai UI*1 reluctance ba PU after ba'a UI2 I anticipate ba'acu'i UI*2 I experience ba'anai UI*2 I remember ba'e BAhE emphasize next ba'i BAI replaced by ba'o ZAhO perfective ba'u UI3 exaggeration ba'ucu'i UI*3 accuracy ba'unai UI*3 understatement baba PU* will be going to baca'a PU* will actually baca'o ZAhO* will be then bai BAI compelled by bapu PU* will have been bau BAI in language be BE link sumti be'a FAhA1 north of be'e COI request to send be'i BAI sent by be'o BEhO end linked sumti be'u UI5 lack be'ucu'i UI*5 presence be'unai UI*5 satiation bei BEI link more sumti bi PA1 8 bi'i BIhI unordered interval bi'o BIhI ordered interval bi'u UI3a new information bi'unai UI*3 old information biki'o PA* 8,000 bimei MOI* is a octet bimoi MOI* is eighth among bino PA* 80 binono PA* 800 binonovo PA* 8004 bo BO short scope link boi BOI end number or lerfu bu BU word to lerfu bu'a GOhA some selbri 1 bu'e GOhA some selbri 2 bu'i GOhA some selbri 3 bu'o UI7 start emotion bu'ocu'i UI*7 continue emotion bu'onai UI*7 end emotion bu'u FAhA3 coincident with by BY2 b ca PU during ca ma PU* when? ca'a CAhA actually is ca'e UI2 I define ca'i BAI by authority of ca'o ZAhO continuative ca'u FAhA2 in front of caba'o ZAhO* has been caca'a PU* currently is caca'o ZAhO* is now cai CAI intense emotion cajeba PU* during and after capu'o ZAhO* is going to cau BAI lacked by ce JOI in a set with ce'a LAU font shift ce'i PA3 percent ce'o JOI in a sequence with cei CEI pro-bridi assign ci PA1 3 ci'e BAI in system ci'i PA5 infinity ci'iroi ROI* infinite times ci'o BAI emotionally felt by ci'u BAI on the scale ciki'o PA* 3,000 cimei MOI* is a trio cimoi MOI* is third among cino PA* 30 cinono PA* 300 ciroi ROI* thrice co CO tanru inversion co'a ZAhO initiative co'e GOhA unspecif bridi co'i ZAhO achievative co'o COI partings co'u ZAhO cessative coi COI greetings coico'o COI* greetings in passing cu CU selbri separator cu'a VUhU3 absolute value cu'e CUhE modal ? cu'i CAI neutral emotion cu'o MOI probability selbri cu'u BAI as said by cu'u ko'a BAI* as said by it-1 cy BY2 c da KOhA1 something 1 da'a PA4 all except da'amoi MOI* is penultimate among da'aremoi MOI* is antepenultimate da'e KOhA2 eventual utterance da'i UI3 supposing da'inai UI*3 in fact da'o DAhO cancel pro-assigns da'u KOhA2 earlier utterance dai UI5 empathy dau PA2 hex digit A de KOhA1 something 2 de'a ZAhO pausative de'e KOhA2 soon utterance de'i BAI dated de'o VUhU3 logarithm de'u KOhA2 recent utterance dei KOhA2 this utterance denpa bu BY* pause symbol di KOhA1 something 3 di'a ZAhO resumptitive di'e KOhA2 next utterance di'i TAhE regularly di'inai TAhE* irregularly di'o BAI at the locus of di'u KOhA2 last utterance do KOhA3 you do'a UI3 generously do'anai UI*3 parsimoniously do'e BAI unspecif modal do'i KOhA2 unspecif utterance do'o KOhA3 you and others do'u DOhU end vocative doi DOI vocative marker doido'u DOI* O You! du GOhA same identity as du'a FAhA1 east of du'e PA4 too many du'emei MOI* is too many du'eroi ROI* too many times du'i BAI as much as du'o BAI according to du'u NU bridi abstract dy BY2 d .e A sumti and .e'a UI1 permission .e'anai UI*1 prohibition .e'e UI1 competence .e'enai UI*1 incompetence .e'i UI1 constraint .e'icu'i UI*1 independence .e'inai UI*1 challenge .e'o UI1 request .e'onai UI*1 negative request .e'u UI1 suggestion .e'ucu'i UI*1 abandon suggestion .e'unai UI*1 warning .ebu BY* e .ei UI1 obligation .einai UI*1 freedom .enai A* sumti but not fa FA 1st sumti place fa'a FAhA4 towards point fa'e BAI reverse of fa'i VUhU2 reciprocal of fa'o FAhO end of text fa'u JOI and respectively fai FA extra sumti place fau BAI in the event of fe FA 2nd sumti place fe'a VUhU3 nth root of fe'e FEhE space aspects fe'eba'o ZAhO* beyond fe'eca'o ZAhO* throughout fe'eco'a ZAhO* on this edge of fe'eco'i ZAhO* at the point of fe'emo'u ZAhO* at the far end of fe'enoroi ROI* nowhere fe'epu'o ZAhO* up to the edge of fe'eroroi ROI* everywhere fe'eza'o ZAhO* continuing too far fe'i VUhU1 divided by fe'o COI over and out fe'u FEhU end modal selbri fei PA2 hex digit B fi FA 3rd sumti place fi'a FA sumti place ? fi'e BAI created by fi'i COI hospitality fi'inai COI* inhospitality fi'o FIhO selbri to modal fi'u PA3 fraction slash fo FA 4th sumti place fo'a KOhA4 it-6 fo'e KOhA4 it-7 fo'i KOhA4 it-8 fo'o KOhA4 it-9 fo'u KOhA4 it-10 foi FOI end composite lerfu fu FA 5th sumti place fu'a FUhA reverse Polish fu'e FUhE indicator scope fu'i UI5 easy fu'inai UI*5 difficult fu'o FUhO end indicator scope fu'u VUhU0 unspecif operator fy BY2 f ga GA fore or ga'a BAI to observer ga'e BY1 upper-case shift ga'i UI5 hauteur ga'icu'i UI*5 equal rank ga'inai UI*5 meekness ga'o GAhO inclusive interval ga'u FAhA2 above gai PA2 hex digit C ganai GA* fore only if gau BAI with active agent ge GA fore and ge'a VUhU0 null operator ge'e UI6 unspecif emotion ge'i GA fore conn ? ge'o BY1 Greek shift ge'u GEhU end relative phrase gei VUhU2 exponential notation gi GI connective medial gi'a GIhA bridi or gi'e GIhA bridi and gi'enai GIhA* bridi but not gi'i GIhA bridi conn ? gi'o GIhA bridi iff gi'onai GIhA* bridi xor gi'u GIhA bridi whether go GA fore iff go'a GOhA recent bridi go'e GOhA penultimate bridi go'i GOhA last bridi go'ira'o GOhA* true for me too go'o GOhA future bridi go'u GOhA earlier bridi goi GOI pro-sumti assign gonai GA* fore xor gu GA fore whether gu'a GUhA fore tanru or gu'anai GUhA* fore tanru only if gu'e GUhA fore tanru and gu'i GUhA fore tanru conn ? gu'o GUhA fore tanru iff gu'onai GUhA* fore tanru xor gu'u GUhA fore tanru whether gy BY2 g .i I sentence link .i'a UI1 acceptance .i'anai UI*1 blame .i'e UI1 approval .i'ecu'i UI*1 non-approval .i'enai UI*1 disapproval .i'i UI1 togetherness .i'inai UI*1 privacy .i'o UI1 appreciation .i'onai UI*1 envy .i'u UI1 familiarity .i'unai UI*1 mystery .ia UI1 belief .iacu'i UI*1 skepticism .ianai UI*1 disbelief .ibu BY* i .ie UI1 agreement .ienai UI*1 disagreement .ii UI1 fear .iinai UI*1 security .ija JA* sentence or .ijanai JA* sentence if .ije JA* sentence and .ije'i JA* sentence conn ? .ijenai JA* sentence but not .ijo JA* sentence iff .ijonai JA* sentence xor .iju JA* sentence whether .inaja JA* sentence only if .io UI1 respect .ionai UI*1 disrespect .iu UI1 love .iucu'i UI*1 no love lost .iunai UI*1 hatred ja JA tanru or ja'a NA bridi affirmer ja'e BAI therefore result ja'enai BAI* nevertheless result ja'i BAI by rule ja'o UI2 I conclude jai JAI modal conversion jaica SE* time conversion jaigau SE* agent conversion jaivi SE* location conversion jau PA2 hex digit D je JA tanru and je'a NAhE scalar affirmer je'e COI roger je'enai COI* negative acknowledge je'i JA tanru conn ? je'o BY1 Hebrew shift je'u UI3 truth je'unai UI*3 falsity jei NU truth abstract jenai JA* tanru but not ji A sumti conn ? ji'a UI3b in addition ji'e BAI up to limit ji'i PA4 approximately ji'ima'u PA* rounded up ji'ini'u PA* rounded down ji'o BAI under direction of ji'u BAI based on jo JA tanru iff jo'a UI3a metalinguistic yes jo'e JOI union jo'i JOhI array jo'o BY1 Arabic shift jo'u JOI in common with joi JOI in a mass with joibu BY* & jonai JA* tanru xor ju JA tanru whether ju'a UI2 I state ju'i COI attention ju'icu'i COI* at ease ju'inai COI* ignore me ju'o UI5 certainty ju'ocai UI*5 quite certain ju'ocu'i UI*5 uncertainty ju'onai UI*5 impossibility ju'opei UI*6 how certain? ju'u VUhU2 number base jy BY2 j ka NU property abstract ka'a BAI gone to by ka'e CAhA innately capable of ka'i BAI represented by ka'o PA5 imaginary i ka'u UI2 I know culturally kai BAI characterizing kau UI3a indirect question ke KE start grouping ke'a KOhA7 relativized it ke'e KEhE end grouping ke'i GAhO exclusive interval ke'o COI please repeat ke'u UI3 repeating ke'unai UI*3 continuing kei KEI end abstraction ki KI tense default ki'a UI6 textual confusion ki'anai UI*6 understanding ki'e COI thanks ki'enai COI* no thanks to you ki'i BAI as a relation of ki'o PA3 number comma ki'u BAI because of reason ki'u ma BAI* with what reason? ki'unai BAI* despite reason ko KOhA3 imperative ko'a KOhA4 it-1 ko'e KOhA4 it-2 ko'i KOhA4 it-3 ko'o KOhA4 it-4 ko'u KOhA4 it-5 koi BAI bounded by ku KU end sumti ku'a JOI intersection ku'e KUhE end mex forethought ku'i UI3b however ku'o KUhO end relative clause ku'u BAI in culture ky BY2 k la LA that named la'a UI3 probability la'anai UI*3 improbability la'e LAhE the referent of la'edi'u KOhA* last utterance it la'i LA the set of named la'o ZOI the non-Lojban named la'u BAI quantifying la'u ma BAI* in what quantity? lai LA the mass of named lau LAU punctuation mark le LE the described le go'i KOhA* the x1 of last bridi le jaica LE* the time of le jaigau LE* the agent in le jaivi LE* the location of le sego'i KOhA* the x2 of last bridi le tego'i KOhA* the x3 of last bridi le vego'i KOhA* the x4 of last bridi le xego'i KOhA* the x5 of last bridi le'a BAI in category le'e LE the stereotypical le'i LE the set described le'o UI5 aggressive le'ocu'i UI*5 passive le'onai UI*5 defensive le'u LEhU end error quote ledo LE* your described as lei LE the mass described leko'a LE* it-1's described as lemi LE* my described as leta LE* that one's leti LE* this one's letu LE* the yonder one's leva LE* that there levi LE* this here levu LE* that yonder li LI the number li'a UI3 clearly li'anai UI*3 obscurely li'e BAI preceded by li'i NU experience abstract li'o UI3a omitted text li'u LIhU end quote lo LE the really is lo'a BY1 Lojban shift lo'e LE the typical lo'i LE the set really is lo'o LOhO end mex sumti lo'u LOhU error quote loi LE the mass really is lu LU quote lu'a LAhE the individuals of lu'e LAhE the symbol for lu'i LAhE the set composed of lu'o LAhE the mass composed of lu'u LUhU end sumti qualifiers ly BY2 l ma KOhA7 sumti ? ma'a KOhA3 we with you ma'e BAI material object ma'i BAI in reference frame ma'o MAhO operand to operator ma'u PA3 positive number mai MAI sentence ordinal mau BAI exceeded by me ME sumti to selbri me'a BAI undercut by me'e BAI with name me'e ma BAI* with what name? me'i PA3 less than me'o LI the mex me'u MEhU end sumti to selbri mei MOI cardinal selbri mi KOhA3 me mi'a KOhA3 we, not you mi'e COI self-introduction mi'enai COI* no, I am not mi'i BIhI center-range mi'o KOhA3 me and you mi'u UI3b ditto mo GOhA bridi ? mo'a PA4 too few mo'aroi ROI* too few times mo'e MOhE sumti to operand mo'i MOhI space motion mo'ibe'a FAhA* northwardly mo'ibu'u FAhA* moving to coincide mo'ica'u FAhA* forward mo'idu'a FAhA* eastwardly mo'ifa'a FAhA* arriving at mo'iga'u FAhA* upwardly mo'ine'a FAhA* approximating mo'ine'i FAhA* into mo'ine'u FAhA* southwardly mo'ini'a FAhA* downwardly mo'ipa'o FAhA* passing through mo'ire'o FAhA* along mo'iri'u FAhA* rightwardly mo'iru'u FAhA* orbiting mo'ite'e FAhA* moving the border mo'iti'a FAhA* rearwardsly mo'ito'o FAhA* moving away from mo'ivu'a FAhA* westwardly mo'ize'o FAhA* outwardsly mo'izo'a FAhA* passing by mo'izo'i FAhA* approaching mo'izu'a FAhA* leftwardsly mo'o MAI section ordinal mo'u ZAhO completive moi MOI ordinal selbri mu PA1 5 mu'a UI3 for example mu'acu'i UI*3 omitting examples mu'anai UI*3 concluding examples mu'e NU1 point-event abstract mu'i BAI because of motive mu'i ma BAI* with what motive? mu'inai BAI* despite motive mu'o COI over mu'onai COI* more to come mu'u BAI exemplified by muki'o PA* 5,000 mumei MOI* is a quintet mumoi MOI* is fifth among muno PA* 50 munono PA* 500 my BY2 m na NA bridi negator na'a BY1 cancel shifts na'e NAhE scalar contrary na'efa'a FAhA* not towards point na'epu'i CAhA* has never na'i UI3a metalinguistic not na'o TAhE typically na'onai TAhE* atypically na'u NAhU selbri to operator na.a A* sumti only if nagi'a GIhA* bridi only if nago'i GOhA* deny last bridi nai NAI negate last word naja JA* tanru only if nau CUhE reference point ne GOI incidental phrase ne'a FAhA3 next to ne'i FAhA3 within ne'o VUhU3 factorial ne'u FAhA1 south of nei GOhA current bridi ni NU amount abstract ni'a FAhA2 below ni'e NIhE selbri to operand ni'i BAI because of logic ni'i ma BAI* by what logic? ni'inai BAI* despite logic ni'o NIhO new topic ni'u PA3 negative number no PA1 0 no'a GOhA next outer bridi no'e NAhE scalar midpoint not no'i NIhO old topic no'o PA5 typical value no'u GOI incidental identity noda KOhA* nothing at all noi NOI incidental clause nomo'o MAI* section 0 noroi ROI* never nu NU event abstract nu'a NUhA operator to selbri nu'e COI promise nu'ecu'i COI* release from promise nu'enai COI* non-promise nu'i NUhI start termset nu'o CAhA can but has not nu'u NUhU end termset ny BY2 n .o A sumti iff .o'a UI1 pride .o'acu'i UI*1 modesty .o'anai UI*1 shame .o'e UI1 closeness .o'enai UI*1 distance .o'i UI1 caution .o'inai UI*1 rashness .o'o UI1 patience .o'ocu'i UI*1 mere tolerance .o'onai UI*1 anger .o'u UI1 relaxation .o'ucu'i UI*1 composure .o'unai UI*1 stress .obu BY* o .oi UI1 complaint .oinai UI*1 pleasure .oire'e UI*1 spiritual complaint .oiro'a UI*1 embarrassment .oiro'e UI*1 puzzlement .oiro'i UI*1 anxiety .oiro'o UI*1 physical pain .oiro'u UI*1 sexual complaint .onai A* sumti xor pa PA1 1 pa'a BAI in addition to pa'aku BAI* each respectively pa'e UI3 justice pa'enai UI*3 prejudice pa'i VUhU2 ratio pa'o FAhA3 transfixing pa'u BAI having component pabi PA* 18 paci PA* 13 pai PA5 pi paki'o PA* 1,000 pamai MAI* firstly pamei MOI* is singular pamo'o MAI* section 1 pamoi MOI* is first among pamu PA* 15 pano PA* 10 panomei MOI* is a decade panomoi MOI* is tenth among panono PA* 100 panonomei MOI* is a century papa PA* 11 pare PA* 12 paremei MOI* is a dozen paroi ROI* once paso PA* 19 pau UI3a question follows paunai UI*3 rhetorical question pavo PA* 14 paxa PA* 16 paze PA* 17 pe GOI restrictive phrase pe'a PEhA start figurative pe'i UI2 I opine pe'o PEhO fore mex operator pe'u COI please pei CAI emotion ? pi PA3 decimal point pi'a VUhU4 matrix of rows pi'e PA3 digit separator pi'i VUhU1 times pi'o BAI used by pi'u JOI cross product pidu'e PA* too much of piji'i PA* approximately all of pimo'a PA* too little of pimucu'o MOI* has even odds piresi'e MOI* is a fifth portion piro PA* all of pirosi'e MOI* is the whole of piso'a PA* almost all of piso'i PA* much of piso'iroi ROI* much of the time piso'u PA* a little of piso'uroi ROI* rarely pisu'o PA* at least some of po GOI is specific to po'a POhA end figurative po'e GOI which belongs to po'i BAI in the sequence po'o UI3b uniquely po'u GOI restrictive identity poi NOI restrictive clause pu PU before pu'a BAI pleased by pu'e BAI by process pu'i CAhA can and has pu'o ZAhO anticipative pu'u NU1 process abstract puba PU* was going to puca'a PU* actually was puca'o ZAhO* was then pujeba PU* before and after pujeca PU* before and during pupu PU* had earlier been puza PU* a medium time before puze'a PU* for a period in past puze'i PU* for a moment in past puze'u PU* for an era in past puzi PU* a short time before puzu PU* a long time before py BY2 p ra KOhA5 recent sumti ra'a BAI pertained to by ra'e PA3 repeating decimal ra'i BAI from source ra'o RAhO pro-assign update ra'u UI3 chiefly ra'ucu'i UI*3 equally ra'unai UI*3 incidentally rai BAI with superlative rau PA4 enough raumei MOI* are enough raumoi MOI* is enoughth among re PA1 2 re'a VUhU4 transpose re'e UI4 spiritual re'enai UI*4 sacrilege re'i COI ready to receive re'inai COI* not ready to receive re'o FAhA3 adjacent to rei PA2 hex digit E reki'o PA* 2,000 remai MAI* secondly remei MOI* is a pair remoi MOI* is second among reno PA* 20 renomei MOI* is a score renono PA* 200 reroi ROI* twice ri KOhA5 last sumti ri'a BAI because of cause ri'a ma BAI* with what cause? ri'anai BAI* despite cause ri'e UI5 release of emotion ri'enai UI*5 restraint of emotion ri'i BAI experienced by ri'o VUhU4 integral ri'u FAhA2 on the right of ro PA4 each ro'a UI4 social ro'anai UI*4 antisocial ro'e UI4 mental ro'enai UI*4 mindless ro'i UI4 emotional ro'inai UI*4 denying emotion ro'o UI4 physical ro'onai UI*4 denying physical ro'u UI4 sexual ro'unai UI*4 sexual abstinence roda KOhA* everything roi ROI quantified tense romai MAI* lastly romoi MOI* is last among roroi ROI* always ru KOhA5 earlier sumti ru'a UI2 I postulate ru'e CAI weak emotion ru'i TAhE continuously ru'inai TAhE* occasionally ru'o BY1 Cyrillic shift ru'u FAhA2 surrounding ry BY2 r sa SA erase utterance sa'a UI3a editorial insertion sa'e UI3 precisely speaking sa'enai UI*3 loosely speaking sa'i VUhU4 matrix of columns sa'o VUhU4 derivative sa'u UI3 simply speaking sa'unai UI*3 elaborating sai CAI strong emotion sau BAI requiring se SE 2nd conversion se'a UI5 self-sufficiency se'anai UI*5 dependency se'e BY1 character code se'i UI5 self-oriented se'inai UI*5 other-oriented se'o UI2 I know internally se'u SEhU end discursive seba'i BAI* instead of sebai BAI* compelling sebau BAI* in language of sebe'i BAI* transmitting seca'i BAI* with authority over secau BAI* without seci'e BAI* with system function seci'o BAI* emoting seci'u BAI* on scale measuring secu'u BAI* expressing sede'i BAI* on the same date as sedi'o BAI* at specific locus sedu'i BAI* equal to sedu'o BAI* knowing facts sedu'u NU* sentence abstract sefa'e BAI* in reversal of sefi'e BAI* creating work sega'a BAI* observing segau BAI* as agent in doing sei SEI discursive bridi seja'e BAI* results because seja'enai BAI* results despite seja'i BAI* by rule prescribing seji'e BAI* as a limit of seji'o BAI* controlling aspects seji'u BAI* supporting seka'a BAI* with destination seka'i BAI* on behalf of sekai BAI* with property sekai ma BAI* which kind? seki'i BAI* related to seki'u BAI* reason therefore seki'unai BAI* reason nevertheless sekoi BAI* as boundary of seku'u BAI* in culture of sela'u BAI* in quantity sele'a BAI* as a category of seli'e BAI* preceding sema'e BAI* made of material sema'i BAI* as a standard for semau BAI* more than semaunai BAI* not more than seme'a BAI* less than seme'anai BAI* not less than seme'e BAI* as a name for semu'i BAI* motive therefore semu'inai BAI* motive nevertheless semu'u BAI* example of property seni'i BAI* entails therefore seni'inai BAI* entails nevertheless sepa'a BAI* similar to sepa'u BAI* as a part of sepi'o BAI* using tool sepo'i BAI* sequenced by rules sepu'a BAI* in order to please sepu'e BAI* processing from sera'a BAI* concerning sera'i BAI* as an origin of serai BAI* superlative in seri'a BAI* causal therefore seri'anai BAI* causal nevertheless seri'i BAI* experiencing sesau BAI* necessary for sesi'u BAI* assisting seta'i BAI* as a method for setai BAI* as a form of seti'i BAI* suggesting seti'u BAI* at the same time as setu'i BAI* as a location of seva'o BAI* as conditions for seva'u BAI* with beneficiary sezau BAI* approving sezu'e BAI* goalfully acting at si SI erase word si'a UI3b similarly si'e MOI portion selbri si'i VUhU4 sigma summation si'o NU concept abstract si'u BAI aided by slaka bu BY* close-comma so PA1 9 so'a PA4 almost all so'e PA4 most so'eroi ROI* usually so'i PA4 many so'imei MOI* is a bunch so'iroi ROI* many times so'o PA4 several so'u PA4 few so'uroi ROI* a few times soi SOI reciprocal sumti soki'o PA* 9,000 somoi MOI* is ninth among sono PA* 90 sonono PA* 900 sosoce'i PA* 99 percent sozepimu PA* 97.5 su SU erase discourse su'a UI2 I generalize su'anai UI*2 I particularize su'e PA4 at most su'i VUhU1 plus su'o PA4 at least su'oremei MOI* is plural su'oremoi MOI* is at least second su'u NU unspecif abstract sy BY2 s ta KOhA6 that there ta'a COI interruption ta'e TAhE habitually ta'enai TAhE* non-habitually ta'i BAI by method ta'i ma BAI* by what method? ta'o UI3 by the way ta'onai UI*3 return to main point ta'u UI3a making a tanru ta'unai UI*3a expanding the tanru tai BAI in form tau LAU shift next lerfu te SE 3rd conversion te'a VUhU2 to the power te'e FAhA3 bordering te'o PA5 exponential e te'u TEhU end mex converters tebau BAI* expressing tebe'i BAI* sent to teca'i BAI* basis for authority teci'e BAI* of system components teci'o BAI* emoting about tecu'u BAI* as told to tede'i BAI* on date at location tedi'o BAI* at locus within range tedu'i BAI* equal in property tedu'o BAI* knowing about tefi'e BAI* created for purpose tega'a BAI* observed by means tei TEI composite lerfu teja'i BAI* by rule within teji'e BAI* limited in property teji'o BAI* controlling event teka'a BAI* with origin teka'i BAI* representing in teki'i BAI* with relation tekoi BAI* bordering tela'u BAI* measured on scale tele'a BAI* defined by quality teli'e BAI* ordered in sequence tema'e BAI* in material form tema'i BAI* rules of standard temau BAI* more in property teme'a BAI* less in property teme'e BAI* as a name used by temu'i BAI* motive of person temu'u BAI* example out oof set teni'i BAI* under logic system tepa'a BAI* contrasting property tepi'o BAI* usage for purpose tepo'i BAI* ordering items tepu'a BAI* pleasing conditions tepu'e BAI* processing into terai BAI* at extreme teri'a BAI* causal conditions tesau BAI* necessarily under tesi'u BAI* assisting in teta'i BAI* method conditions tetai BAI* sharing ideal form teti'i BAI* suggested to teti'u BAI* time on day teva'u BAI* goodness standard tezu'e BAI* with goal ti KOhA6 this here ti'a FAhA2 behind ti'e UI2 I hear ti'i BAI suggested by ti'o SEI mex precedence ti'u BAI associated with time to TO start parenthesis to'a BY1 lower-case shift to'e NAhE polar opposite to'i TO editorial unquote to'o FAhA4 away from point to'u UI3 in brief to'unai UI*3 in detail toi TOI end parenthesis tu KOhA6 that yonder tu'a LAhE the bridi implied by tu'e TUhE start text scope tu'i BAI associated with site tu'o PA5 null operand tu'u TUhU end text scope ty BY2 t .u A sumti whether .u'a UI1 gain .u'anai UI*1 loss .u'e UI1 wonder .u'enai UI*1 commonplace .u'i UI1 amusement .u'inai UI*1 weariness .u'o UI1 courage .u'ocu'i UI*1 timidity .u'onai UI*1 cowardice .u'u UI1 repentance .u'ucu'i UI*1 lack of regret .u'unai UI*1 innocence .ua UI1 discovery .uanai UI*1 confusion .ubu BY* u .ue UI1 surprise .uecu'i UI*1 not very surprised .uenai UI*1 expectation .uepei UI*1 surprised? .ui UI1 happiness .uibu BY* happy face .uinai UI*1 unhappiness .uo UI1 completion .uonai UI*1 incompleteness .uu UI1 pity .uunai UI*1 cruelty va VA there at va'a VUhU3 additive inverse va'i UI3 in other words va'inai UI*3 in the same words va'o BAI under conditions va'u BAI benefiting from vai PA2 hex digit F vau VAU end simple bridi ve SE 4th conversion ve'a VEhA small space interval ve'e VEhA whole space interval ve'i VEhA tiny space interval ve'o VEhO right bracket ve'u VEhA big space interval vebe'i BAI* transmit origin veci'e BAI* with synergy in vecu'u BAI* expressed in medium vede'i BAI* on date by calendar vedu'o BAI* under epistemology vefi'e BAI* created from vega'a BAI* observed under vei VEI left bracket veka'a BAI* via route vemau BAI* more by amount veme'a BAI* less by amount vepa'a BAI* similar by standard vepu'e BAI* passing thru stages verai BAI* superlative among vetai BAI* similar in property veti'u BAI* time at location vi VA here at vi ma VA* where? vi'a VIhA 2-space interval vi'e VIhA 4-space interval vi'i VIhA 1-space interval vi'o COI wilco vi'u VIhA 3-space interval vo PA1 4 vo'a KOhA4 x1 it vo'e KOhA4 x2 it vo'i KOhA4 x3 it vo'o KOhA4 x4 it vo'u KOhA4 x5 it voi NOI descriptive clause voki'o PA* 4,000 vomoi MOI* is fourth among vono PA* 40 vonono PA* 400 vu VA yonder at vu'a FAhA1 west of vu'e UI5 virtue vu'enai UI*5 sin vu'i LAhE the sequence of vu'o VUhO long scope relative vu'u VUhU1 minus vy BY2 v xa PA1 6 xaki'o PA* 6,000 xamoi MOI* is sixth among xano PA* 60 xanono PA* 600 xavoki'o PA* 64,000 xe SE 5th conversion xebe'i BAI* transmitted via xeka'a BAI* by transport mode xi XI subscript xo PA5 number ? xu UI6 true-false ? xy BY2 x .y Y hesitation .y'y BY2 ' .ybu BY* y za ZI medium time za'a UI2 I observe za'e BAhE nonce-word next za'i NU1 state abstract za'o ZAhO superfective za'u PA3 greater than zai LAU select alphabet zau BAI approved by ze PA1 7 ze'a ZEhA medium time interval ze'aba ZEhA* for a while after ze'aca ZEhA* for a while during ze'apu ZEhA* for a while before ze'e ZEhA whole time interval ze'i ZEhA short time interval ze'o FAhA4 outward ze'u ZEhA long time interval zei ZEI lujvo glue zeki'o PA* 7,000 zemoi MOI* is seventh among zeno PA* 70 zenono PA* 700 zi ZI short time zi'e ZIhE rel clause joiner zi'o KOhA7 nonexistent it zo ZO 1-word quote zo'a FAhA4 tangential to zo'e KOhA7 unspecif it zo'i FAhA4 inward zo'o UI5 humorously zo'obu BY* smiley face zo'ocu'i UI*5 dully zo'onai UI*5 seriously zo'u ZOhU end prenex zoi ZOI non-Lojban quote zu ZI long time zu'a FAhA2 on the left of zu'e BAI with actor zu'i KOhA7 typical it zu'o NU1 activity abstract zu'u UI3 on the one hand zu'unai UI*3 on the other hand zy BY2 z jbofihe-0.38/reduced_gismu100644 765 764 110714 7350750742 14721 0ustar richardruserbacru ba'u utter badna banana badri dri sad bajra baj run bakfu baf bundle bakni bak bovine bakri chalk baktu bucket balji bulb balni balcony balre ba'e blade balvi bav future bancu bac beyond bandu bad defend banfi amphibian bangu ban bau language banli bal ba'i great banro ba'o grow banxa bax bank banzu baz suffice bapli bap bai force barda bra big bargu bag arch barja bar barna ba'a mark bartu bar out basna emphasize basti bas replace batci bat bite batke button bavmi barley baxso Malay-Indonesian bebna beb foolish bemro bem be'o North American bende bed be'e crew bengo beg Bengali benji bej be'i transfer bersa bes be'a son berti ber north besna ben brain betfu bef be'u abdomen betri bet tragedy bevri bev bei carry bi biv 8 bi'i biz unordered interval bidju bead bifce bic bee bikla bik whip bilga big obliged bilma bi'a ill bilni bil military bindo bid Indonesian binra insure binxo bix bi'o become birje beer birka bir arm birti bit certain bisli bis ice bitmu bim bi'u wall blabi lab white blaci glass blanu bla blue bliku bli block bloti lot blo lo'i boat bo bor short scope link bolci bol boi ball bongu bog bo'u bone botpi bot bo'i bottle boxfo bof bo'o sheet boxna bon bo'a wave bradi enemy bratu hail brazo raz Brazilian bredi red bre ready bridi bri predicate brife bif bi'e breeze briju bij office brito rit British broda rod predicate var 1 brode bo'e predicate var 2 brodi predicate var 3 brodo predicate var 4 brodu predicate var 5 bruna bun bu'a brother bu bus bu'i word to lerfu bu'a bul some selbri 1 budjo buj bu'o Buddhist bukpu buk bu'u cloth bumru bum fog bunda bud pound bunre bur bu'e brown burcu bru brush burna embarrassed ca'a caz actually is cabna cab now cabra ca'a apparatus cacra hour cadzu dzu walk cafne caf often cakla chocolate calku cak shell canci vanish cando cad idle cange cag farm canja caj exchange canko ca'o window canlu cal ca'u space canpa cna shovel canre can sand canti gut carce cart carmi cam cai intense carna car turn cartu cat chart carvi cav rain casnu snu discuss catke ca'e shove catlu cta look catni ca'i authority catra kill caxno cax shallow ce cec in a set with ce'i cez percent ce'o ce'o in a sequence with cecla cel ce'a launcher cecmu cem ce'u community cedra era cenba cne vary censa ces holy centi cen .01 cerda ced heir cerni cer morning certu cre expert cevni cev cei god cfari cfa initiate cfika fik fi'a fiction cfila cfi flaw cfine wedge cfipu fi'u confusing ci cib 3 ciblu blu blood cicna cyan cidja dja food cidni cid knee cidro dro hydrogen cifnu cif infant cigla cig gland cikna cik awake cikre repair ciksi cki explain cilce cic wild cilmo cim moist cilre cli learn cilta cil thread cimde dimension cimni infinite cinba kiss cindu oak cinfo lion cinje cij wrinkle cinki insect cinla thin cinmo cni emotion cinri ci'i interesting cinse cin sexual cinta paint cinza tongs cipni cpi bird cipra cip test cirko cri lose cirla cheese ciska ci'a write cisma smile ciste ci'e system citka cti eat citno cit ci'o young citri cir history citsi season civla civ louse cizra ciz strange ckabu rubber ckafi kaf coffee ckaji kai quality ckana cka bed ckape cap peril ckasu cas ridicule ckeji kej cke ashamed ckiku kik key ckilu ci'u scale ckini ki'i related ckire kir grateful ckule kul cu'e school ckunu ku'u conifer cladu lau loud clani cla long claxu cau without clika mossy clira lir early clite lit polite cliva liv li'a leave clupa cup loop cmaci mathematics cmalu cma small cmana ma'a mountain cmavo ma'o structure word cmene cme me'e name cmila mi'a laugh cmima mim cmi member cmoni cmo co'i moan cnano na'o norm cnebo neb ne'o neck cnemu nem ne'u reward cnici nic orderly cnino nin ni'o new cnisa nis lead cnita nit ni'a beneath co col tanru inversion co'a co'a initiative co'e com co'e unspecif bridi co'u co'u cessative cokcu cko soak up condi con cno coi deep cortu cor cro pain cpacu cpa get cpana upon cpare par climb cpedu cpe request cpina pungent cradi radio crane cra front creka cek shirt crepu rep harvest cribe rib bear crida rid fairy crino ri'o green cripu rip bridge crisa cis summer critu autumn ctaru tide ctebi teb lip cteki tek ce'i tax ctile petroleum ctino ti'o shadow ctuca ctu teach cukla cuk round cukta cku book culno clu full cumki cum cu'i possible cumla cul humble cunmi millet cunso cun cu'o random cuntu cu'u affair cupra pra produce curmi cru let curnu cur worm curve cuv pure cusku cus sku express cutci cuc shoe cutne cut chest cuxna cux cu'a choose da dav dza something 1 da'a daz all except dacru dac drawer dacti dai object dadjo daj Taoist dakfu dak knife dakli sack damba dab da'a fight damri drum dandu dad hang danfu daf answer danlu dal da'u animal danmo dam smoke danre da'e pressure dansu dance danti dan projectile daplu plu island dapma dap curse dargu dag road darlu dau argue darno dar da'o far darsi audacity darxi dax da'i hit daski pocket dasni das wear daspo spo destroy dasri sri ribbon datka duck datni data decti dec .1 degji deg finger dejni dej owe dekpu gallon dekto dek 10 delno del de'o candela dembi deb bean denci den de'i tooth denmi dem dense denpa dep de'a wait dertu der de'u dirt derxi dre heap desku des shake detri det date dicra dir interrupt dikca dic electric diklo klo local dikni dik regular dilcu quotient dilnu dil cloud dimna dim fate dinju dij di'u building dinko di'o nail dirba dib dear dirce di'e radiate dirgo dig drop dizlo diz dzi low djacu jac jau water djedi dje dei full day djica dji desire djine jin ring djuno jun ju'o know do don doi you donri dor do'i daytime dotco dot do'o German draci drama drani dra correct drata dat other drudi rud dru roof du dub du'o same identity as du'u dum bridi abstract dugri dug logarithm dukse dus du'e excess dukti dut opposite dunda dud du'a give dunja duj freeze dunku duk du'u anguish dunli dun du'i equal dunra dur winter dzena dze elder dzipo zip zi'o Antarctican facki fak fa'i discover fadni fad ordinary fagri fag fire falnu fan sail famti aunt or uncle fancu function fange alien fanmo fam fa'o end fanri factory fanta prevent fanva translate fanza faz annoy fapro fap pro oppose farlu fal fa'u fall farna far fa'a direction farvi fav develop fasnu fau event fatci fac fact fatne fat fa'e reverse fatri fai distribute febvi feb boil femti fem 1E-15 fendi fed divide fengu feg fe'u angry fenki fek crazy fenra fer fe'a crack fenso fen fe'o sew fepni fep fei cent fepri lung ferti fre fertile festi fes waste fetsi fet fe'i female figre fig fig filso fis Palestinian finpe fip fi'e fish finti fin fi'i invent flalu fla law flani flute flecu fle flow fliba fli fail flira fir face fo'a fo'a it-6 fo'e fo'e it-7 fo'i fo'i it-8 foldi flo foi field fonmo fom fo'o foam fonxa fon telephone forca fro fork fraso fas French frati fra react fraxu fax forgive frica fic differ friko fi'o African frili fil easy frinu fraction friti fit offer frumu fru frown fukpi fuk fu'i copy fulta ful flu float funca fun fu'a luck fusra fur rotten fuzme fuz fu'e responsible gacri gai cover gadri gad article galfi gaf ga'i modify galtu gal ga'u high galxe throat ganlo ga'o closed ganra gan broad ganse gas ga'e sense ganti gonad ganxo gax anus ganzu gaz organize gapci gac gas gapru gap above garna gar rail gasnu gau do gasta gat steel genja gej root gento get ge'o Argentinian genxu gex hook gerku ger ge'u dog gerna gen ge'a grammar gidva gid gi'a guide gigdo gig gi'o 1E9 ginka gik camp girzu gir gri group gismu gim gi'u root word glare gla hot gleki gek gei happy gletu let gle copulate glico gic gli English gluta glu glove gocti goc 1E-24 gotro got 1E24 gradu rau unit grake gra gram grana ga'a rod grasu ras grease greku rek frame grusi rus gray grute rut fruit gubni gub public gugde gug gu'e country gundi gud industry gunka gun gu'a work gunma gum jointly gunro gur gu'o roll gunse goose gunta gut attack gurni gru grain guska guk scrape gusni gus gu'i illumine gusta restaurant gutci guc cubit gutra womb guzme guz zme melon ja jav tanru or jabre brake jadni jad ja'i adorn jakne rocket jalge jag ja'e result jalna starch jalra cockroach jamfu jaf jma foot jamna jam war janbe jab bell janco jan shoulder janli jal collide jansu jas diplomat janta jat account jarbu suburb jarco ja'o show jarki jak narrow jaspu jap passport jatna ja'a captain javni jva rule jbama bam bomb jbari jba berry jbena jbe born jbera jer borrow jbini bin bi'i between jdari jar firm jdice jdi decide jdika decrease jdima di'a price jdini din di'i money jduli dul jdu jelly je jev jve tanru and jecta jec je'a polity jeftu jef week jegvo jeg je'o Jehovist jei jez truth abstract jelca jel burn jemna jme gem jenca jen shock jendu jed axle jenmi jem jei army jerna earn jersi je'i chase jerxo jex Algerian jesni jes needle jetce je'e jet jetnu jet je'u true jgalu ja'u claw jganu jga angle jgari jai grasp jgena jge knot jgina gin gene jgira jgi pride jgita git guitar jibni jbi near jibri jib job jicla stir jicmu cmu basis jijnu jij intuit jikca jik socialize jikru liquor jilka jil alkali jilra jealous jimca jic branch jimpe jmi understand jimte jit limit jinci shears jinga jig ji'a win jinku vaccine jinme jim metal jinru jir immerse jinsa jis clean jinto well jinvi jiv ji'i opine jinzi jiz innate jipci chicken jipno jip ji'o tip jirna horn jisra juice jitfa jif false jitro tro control jivbu weave jivna jvi compete jmaji jaj gather jmifa shoal jmina min add jmive miv ji'e live jo jov tanru iff jo'e jom union jo'u jo'u in common with joi jol joi in a mass with jordo jor jo'o Jordanian jorne jon jo'e joined ju juv tanru whether jubme jub jbu table judri address jufra juf ju'a sentence jukni juk spider jukpa jup cook julne ju'e net jundi jud ju'i attentive jungo jug Chinese junla jul clock junri jur serious junta weight jurme jum germ jursa jus severe jutsi jut species juxre jux clumsy jvinu vin ji'u view ka kam property abstract kabri cup kacma camera kadno Canadian kafke cough kagni kag company kajde jde warn kajna shelf kakne ka'e able kakpa dig kalci feces kalri kar open kalsa kas chaotic kalte kat hunt kamju column kamni committee kampu kau common kanba goat kancu kac count kandi kad dim kanji kaj calculate kanla kal eye kanro ka'o healthy kansa kan with kantu ka'u quantum kanxe kax conjunction karbi kab compare karce car karda card kargu costly karli collar karni journal katna ka'a cut kavbu kav capture ke kem start grouping ke'e kep ke'e end grouping kecti kec ke'i pity kei kez end abstraction kelci kel kei play kelvo ke'o kelvin kenra ken cancer kensa kes outer space kerfa kre hair kerlo ker ear ketco ket tco South American kevna kev ke'a cavity kicne kic ki'e cushion kijno kij oxygen kilto ki'o 1000 kinli kil sharp kisto kis Pakistani klaji laj street klaku kak weep klama kla come klani lai quantity klesi kle lei class klina kli clear kliru chlorine kliti kit clay klupe lup lu'e screw kluza luz loose kobli kob ko'i cabbage kojna koj ko'a corner kolme kol ko'e coal komcu kom comb konju kon ko'u cone korbi kor koi edge korcu kro bent korka kok cork kosta kos coat kramu acre krasi kra source krati ka'i represent krefu ref ke'u recur krici kri believe krili crystal krinu rin ki'u reason krixa kix ki'a cry out kruca kuc intersect kruji ruj cream kruvi ruv kru curve ku'a kuz intersection kubli kub cube kucli curious kufra kuf comfort kukte kuk delicious kulnu klu culture kumfa kum ku'a room kumte camel kunra kun mineral kunti kut empty kurfa kur square kurji kuj ku'i take care of kurki bitter kuspe kup ku'e range kusru kus cruel labno wolf lacpu lap cpu pull lacri lac rely ladru lad milk lafti laf lift lakne la'e probable lakse lak wax lalxu la'u lake lamji lam la'i adjacent lanbi protein lanci flag lanka basket lanli lal analyze lanme lan sheep lante can lanxe lax balance lanzu laz family larcu lar art lasna la'a fasten lastu brass latmo la'o Latin latna lotus lazni lazy le'e lem the stereotypical lebna leb le'a take lenjo len le'o lens lenku lek cold lerci lec late lerfu ler le'u letteral li'i liz experience abstract libjo lib Libyan lidne li'e precede lifri lif fri experience lijda jda religion limna lim swim lindi lid lightning linji lij li'i line linsi lin chain linto li'o lightweight lisri lis story liste ste list litce lic liter litki lik liquid litru li'u travel livga liver livla lil fuel lo'e lom the typical logji loj logic lojbo lob jbo Lojbanic loldi lol loi floor lorxu lor lo'u fox lubno lu'o Lebanese lujvo luv jvo affix compound lumci lum lu'i wash lunbe lub bare lunra lur lunar lunsa lus condense mabla mal derogative mabru mab mammal macnu cnu manual makcu ma'u mature makfa maf magic maksi mak magnet malsi mas temple mamta mam mother manci mac wonder manfo uniform manku man dark manri mar reference mansa satisfy manti ant mapku map cap mapni cotton mapti mat fit marbi mra shelter marce ma'e vehicle marde mad morals margu mag mercury marji maj mai material marna hemp marxa max mash masno sno slow masti ma'i month matci mat matli linen matne butter matra motor mavji mav oats maxri xri wheat mebri meb brow megdo meg 1E6 mei mem mei cardinal selbri mekso mek me'o MEX melbi mel mle beautiful meljo mej Malaysian menli men mind mensi mes me'i sister mentu met me'u minute merko mer American merli mre measure mexno mex Mexican mi mib me midju mij middle mifra mif code mikce mic doctor mikri mik 1E-6 milti mil .001 milxe mli mild minde mid mi'e command minji mi'i machine minli mile minra mir reflect mintu mit mi'u same mipri mip secret mirli deer misno mis mi'o famous misro Egyptian mitre tre meter mixre mix xre mixture mlana mla side mlatu lat cat mleca mec me'a less mledi led mold mluni lun satellite mo'a mob too few mo'i mov space motion moi mom moi ordinal selbri mokca moc point moklu mol mo'u mouth molki mlo mill molro mo'o mole morji moj mo'i remember morko mor Moroccan morna mon mo'a pattern morsi mro dead mosra mos friction mraji rye mrilu mri mail mruli mru hammer mu mum 5 mu'e muf point-event abstract mucti mut immaterial mudri mud wood mukti muk mu'i motive mulno mul mu'o complete munje muj mu'e universe mupli mup example murse glimmering murta mur mu'a curtain muslo mus Islamic mutce tce much muvdu muv mu'u move muzga muz museum na nar bridi negator na'e nal scalar contrary nabmi nam problem nakni nak male nalci na'i wing namcu nac na'u number nanba nab bread nanca na'a year nandu nad difficult nanla boy nanmu nau man nanvi nav 1E-9 narge nag nut narju naj orange natfe naf na'e deny natmi nat nai nation navni neon naxle nax xle canal nazbi naz zbi nose nejni nen energy nelci nel nei fond nenri ner ne'i in ni nil amount abstract nibli nib ni'i necessitate nicte cte night nikle nik nickel nilce ni'e furniture nimre citrus ninmu nim ni'u woman nirna nir nerve nitcu tcu need nivji niv knit nixli nix xli girl no non 0 no'e nor no'e scalar midpoint not nobli nol no'i noble notci not noi message nu nun event abstract nu'o nu'o can but has not nukni nuk magenta nupre nup nu'e promise nurma num rural nutli nul nu'i neutral nuzba nuz news pa pav 1 pacna pa'a hope pagbu pag pau part pagre gre pass through pajni pai judge palci pac evil palku pak pants palne tray palta plate pambe pump panci pan odor pandi pad punctuate panje sponge panka park panlo pa'o slice panpi pap peace panra parallel pante pat protest panzi paz offspring papri page parbi pab ratio pastu pas robe patfu paf pa'u father patlu potato patxu pax pot pe'a pev figurative pelji ple paper pelxu pel yellow pemci pem poem penbi peb pen pencu pec pe'u touch pendo ped pe'o friend penmi pen pe'i meet pensi pes pei think perli per pear pesxu pex paste petso pet 1E15 pezli pez leaf pi piz decimal point pi'u piv cross product picti pic 1E-12 pijne pin pikci beg pikta ticket pilji pi'i multiply pilka pil pi'a crust pilno pli use pimlu pim pi'u feather pinca urine pindi pid poor pinfu pif prisoner pinji penis pinka pik comment pinsi pis pencil pinta pin level pinxe pix drink pipno pi'o piano pixra pir xra picture plana plump platu pla plan pleji lej le'i pay plibu pib pubic plini planet plipe pip pi'e leap plise apple plita pit plane plixa lix plow pluja luj complicated pluka puk pu'a pleasant pluta lut lu'a route polje plo fold polno pol Polynesian ponjo pon po'o Japanese ponse pos po'e possess porpi pop po'i break porsi por poi sequence porto pot Portuguese prali pal profit prami pam pa'i love prane pa'e perfect preja pej pe'a spread prenu pre person preti ret rei question prije pij wise prina pri print pritu right prosa ros ro'a prose pruce ruc ru'e process pruni pun elastic pruxi rux ru'i spirit pu'i pus can and has pu'u puv process abstract pulce puc pu'e dust pulji police pulni pulley punji puj pu'i put punli pul swelling purci pur pru past purdi pud garden purmo pum pu'o powder racli sane ractu rabbit radno ra'o radian rafsi raf affix ragve rav across rakso Iraqi raktu ra'u trouble ralci rac delicate ralju ral principal ralte ra'e retain randa rad yield rango rag organ ranji ra'i continue ranmi ram myth ransu bronze ranti ran soft ranxi rax irony rapli rap repeat rarna rar natural ratcu rat ratni rat atom re rel 2 rebla reb tail rectu rec re'u meat remna rem re'a human renro rer re'o throw renvi rev re'i survive respa res reptile ricfu rif cfu rich rigni rig disgusting rijno rij silver rilti ril rhythm rimni rim rhyme rinci drain rinju ri'u restrain rinka rik ri'a cause rinsa greet rirci rare rirni rir parent rirxe ri'e river rismi ris rice risna heart ritli ri'i rite rivbi riv avoid ro rol each roi rom roi quantified tense rokci rok ro'i rock romge rog chrome ropno ron ro'o European rorci ror procreate rotsu rot tsu ro'u thick rozgu roz zgu rose ruble rub ble weak rufsu ruf rough runme rum melt runta dissolve rupnu rup ru'u dollar rusko ruk ru'o Russian rutni run artifact sabji sab provide sabnu cabin sacki match saclu decimal sadjo djo Saudi sakci sak suck sakli sal slide sakta sat sugar salci sla celebrate salpo sa'o slope salta salad samcu cassava sampu sap simple sance sna sound sanga sag sa'a sing sanji saj conscious sanli sa'i stand sanmi sai meal sanso sauce santa umbrella sarcu sa'u necessary sarji sra support sarlu spiral sarxe sax harmonious saske ske science satci exact satre sa'e stroke savru sav vru noise sazri saz operate se sel 2nd conversion sefta sfe surface selci sle cell selfu sef se'u serve semto sme Semitic senci sec sneeze senpi sen doubt senta set layer senva sev sne dream sepli sep sei apart serti ser stairs setca se'a insert sevzi sez se'i self sfani fly sfasa sfa punish sfofa sfo sofa sfubu sub su'u dive si'o siz concept abstract siclu sil whistle sicni si'i coin sidbo sib si'o idea sidju dju help sigja sig cigar silka sik silk silna salt simlu mlu seem simsa smi similar simxu sim si'u mutual since snake sinma si'a esteem sinso sine sinxa sni sign sipna sip sleep sirji sir straight sirxo six Syrian sisku sis seek sisti sti cease sitna sit cite sivni siv private skaci skirt skami sam computer skapi kap pelt skari ska color skicu ski describe skiji sij ski skina kin cinema skori sko cord skoto kot ko'o Scottish skuro ku'o groove slabu sau familiar slaka syllable slami acid slanu cylinder slari sar sour slasi las plastic sligu lig solid slilu sli oscillate sliri sulfur slovo lov lo'o Slavic sluji slu muscle sluni onion smacu mouse smadi guess smaji sma quiet smani monkey smoka smo sock smuci muc spoon smuni mun smu meaning snada sad succeed snanu nan south snidu nid second snime si'e snow snipa nip sticky snuji nuj sandwich snura nur nu'a secure snuti nut accidental so soz 9 so'a soj almost all so'e sop most so'i sor so'i many so'o sos several so'u sot few sobde sob so'e soya sodna sodium sodva sod soda softo sof Soviet solji slo gold solri sol solar sombo som so'o sow sonci son soi soldier sorcu soc sro store sorgu sog sorghum sovda sov so'a egg spaji paj surprise spali polish spano san Spanish spati spa plant speni spe married spisa spi piece spita hospital spofu pof po'u broken spoja poj po'a explode spuda spu reply sputu put pu'u spit sraji raj vertical sraku rak scratch sralo Australian srana ra'a pertain srasu sas grass srera sre err srito Sanskrit sruma ru'a assume sruri rur sru surround stace sac honest stagi vegetable staku tak ceramic stali sta remain stani stalk stapa tap step stasu soup stati talent steba seb frustration steci tec te'i specific stedu sed head stela tel lock stero te'o steradian stici sic west stidi sid ti'i suggest stika tik adjust stizu tiz chair stodi sto constant stuna sun east stura tur su'a structure stuzi tuz stu site su'e sup su'e at most su'o suz su'o at least su'u suv unspecif abstract sucta suc abstract sudga sud dry sufti sfu hoof suksa suk sudden sumji suj sum sumne smell sumti sum su'i argument sunga sug garlic sunla sul wool surla sur relax sutra sut fast ta taz that there tabno tab carbon tabra trumpet tadji method tadni tad study tagji tag snug talsa tal challenge tamca tomato tamji taj thumb tamne cousin tanbo ta'o board tance tac tongue tanjo tangent tanko tobacco tanru tau phrase compound tansi tas pan tanxe tax ta'e box tapla tile tarbi embryo tarci tar star tarla tar tarmi tam tai shape tarti tra behave taske thirst tatpi ta'i tired tatru tat breast tavla tav ta'a talk taxfu taf ta'u garment tcaci cac custom tcadu tca city tcana station tcati tea tcena ten stretch tcica tic deceive tcidu tid read tcika time of day tcila til detail tcima tim ti'a weather tcini situation tcita label te ter 3rd conversion temci tem tei time tenfa tef exponential tengu teg te'u texture terdi ted earth terpa tep te'a fear terto tet 1E12 ti tif this here tigni tig perform tikpa tip kick tilju tij heavy tinbe tib obey tinci tin tinsa stiff tirna tin hear tirse tir iron tirxu tiger tisna tis fill titla tit sweet tivni tiv television tixnu tix ti'u daughter to'e tol to'e polar opposite toknu tok oven toldi tod butterfly tonga tog to'a tone tordu tor to'u short torni ton to'i twist traji rai superlative trano nitrogen trati taut trene ren re'e train tricu ric tree trina tri attract trixe rix ti'e behind troci toc toi try tsali tsa strong tsani tan sky tsapi seasoning tsiju tsi seed tsina sin stage tu tuf that yonder tubnu tu'u tube tugni tug tu'i agree tujli tuj tulip tumla tum tu'a land tunba tub sibling tunka tuk copper tunlo tul tu'o swallow tunta tun poke tuple tup tu'e leg turni tru govern tutci tci tool tutra tut territory va vaz there at vacri var air vajni vaj vai important valsi val vla word vamji vam va'i value vamtu vat vomit vanbi vab environment vanci vac evening vanju van wine vasru vas vau contain vasxu vax va'u breathe ve vel 4th conversion ve'e ve'e whole space interval vecnu ven ve'u sell venfu vef revenge vensa ves spring verba ver ve'a child vi viz here at vibna vib vagina vidni video vidru vir virus vifne vif fresh vikmi vim vi'i excrete viknu vik viscous vimcu vic vi'u remove vindu vid poison vinji vij airplane vipsi vip deputy virnu vri brave viska vis vi'a see vitci vit irregular vitke vi'e guest vitno vi'o permanent vlagi lag vulva vlile vil violent vlina alternation vlipa vli powerful vo von 4 vofli vol voi flight voksa vok vo'a voice vorme vor vro door vraga vra lever vreji rej vei record vreta vre reclining vrici miscellaneous vrude vud vu'e virtue vrusi vus vu'i taste vu vuz yonder at vukro vur vu'o Ukrainian xa xav 6 xabju xa'u dwell xadba xab half xadni xad body xagji hunger xagri reed xajmi xam funny xaksu xak use up xalbo levity xalka xal alcohol xalni panic xamgu xag xau good xampo xap xa'o ampere xamsi xas sea xance xan xa'e hand xanka nervous xanri xar imaginary xanto elephant xarci xac xa'i weapon xarju xaj pig xarnu stubborn xasli donkey xasne sweat xatra xa'a letter xatsi xat 1E-18 xazdo xaz zdo Asiatic xe xel 5th conversion xebni xen xei hate xebro xeb bro Hebrew xecto xet cto 100 xedja xej xe'a jaw xekri xek xe'i black xelso xes Greek xendo xed xe'o kind xenru xer xe'u regret xexso xex 1E18 xindo xin Hindi xinmo xim ink xirma xir xi'a horse xislu xil xi'u wheel xispo xip Hispanic xlali xla bad xlura xlu influence xotli xol xoi hotel xrabo rab Arabic xrani xai injure xriso xis xi'o Christian xruba xub buckwheat xruki xuk turkey xrula rul flower xruti xru return xukmi xum xu'i chemical xunre xun xu'e red xurdo xur xu'o Urdu xusra xus xu'a assert xutla xul smooth za'i zaz state abstract za'o za'o superfective zabna zan za'a favorable zajba zaj gymnast zalvi zal grind zanru zar zau approve zarci zac zai market zargu zag za'u buttock zasni zas temporary zasti zat za'i exist zbabu bab soap zbani bay zbasu zba make zbepi zbe pedestal zdani zda nest zdile zdi amusing ze zel 7 ze'e ze'e whole time interval ze'o zev ze'o outward zekri zer zei crime zenba zen ze'a increase zepti zep 1E-21 zetro zet 1E21 zgana zga observe zgike zgi gi'e music zi'o zil nonexistent it zifre zif zi'e free zinki zin zi'i zinc zirpu zir zi'u purple zivle ziv vle invest zmadu zma mau more zmiku zmi automatic zo'a zon zo'a tangential to zo'i zor zo'i inward zu'o zum activity abstract zukte zuk zu'e act zumri zmu maize zungi zug guilt zunle zul left zunti zun zu'i interfere zutse zut tse sit zvati zva at jbofihe-0.38/relative.c100644 765 764 16600 7350750742 14115 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/relative.c,v 1.5 2000/10/14 06:58:10 richard Exp $ Processing for relative clauses. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include "nodes.h" #include "rpc_tab.h" #include "functions.h" #include "cmavotab.h" /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_goi_clause (TreeNode *x) { TreeNode *goi, *term, *termc; XDontGloss *xdg; goi = find_nth_cmavo_child(x, 1, GOI); term = find_nth_child(x, 1, TERM); assert (goi); assert (term); termc = child_ref(term, 0); /* What sort of term? */ switch (termc->data.nonterm.type) { case TERM_PLAIN_SUMTI: /* This is the standard 'associated with' meaning */ break; case TERM_TAGGED_SUMTI: case TAGGED_TERMSET: /* In this case we want to elide the gloss for the GOI (in all cases of GOI?) */ xdg = prop_dont_gloss(goi, YES); break; case TERM_PLACED_SUMTI: /* This is bizarre - what ever would it mean? */ break; case TERM_FLOATING_TENSE: /* A meaning for this can just about be envisaged : e.g. le finpe pe ca cu xamgu would mean the fish associated with something current is good but is that what the language definition would say? */ break; case TERMSET: /* ugh - the branches could differ, plus what would it mean anyway, there would be multiple terms in each branch. */ break; case TERM_FLOATING_NEGATE: /* meaning? */ break; case TERM_OTHER: break; default: break; } } /*++++++++++++++++++++++++++++++++++++++ Processing to decide whether to gloss NOI as 'such that' or as 'which'. TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_noi_clause (TreeNode *x) { } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_any_rel_clause (TreeNode *x) { TreeNode *rcs, *encl; TreeNode *antecedent; /* Find enclosing rule */ rcs = x->parent; while (rcs->data.nonterm.type != RELATIVE_CLAUSES) { rcs = rcs->parent; } encl = rcs->parent; /* In several cases, it looks like the relative clause can come before the antecedent (postcedent? :-) ). This needs to be confirmed. */ switch (encl->data.nonterm.type) { case FRAGMENT: antecedent = NULL; break; case SUMTI: antecedent = child_ref(encl, 0); /* The sumti_1 node */ break; case SUMTI_5: antecedent = child_ref(encl, 0); /* The sumti_5a or sumti_5b node */ break; case LAHE_SUMTI_6: antecedent = find_nth_child(encl, 1, SUMTI); break; case NAHE_BO_SUMTI_6: antecedent = find_nth_child(encl, 1, SUMTI); break; case NAME_SUMTI_6: antecedent = encl; break; case SUMTI_TAIL: antecedent = find_nth_child(encl, 1, SUMTI_6); /* If there's a sumti_6 present I think the relative clause applies to it, otherwise it's like the case above - does it apply to the sumti_tail_1, or to something else??? */ break; case SUMTI_TAIL_1: antecedent = child_ref(encl, 0); /* the sumti_tail_1A */ break; case FREE_VOCATIVE: /* The relative clause applies to the whole thing (see text around example 9.6 in the reference manual. (Strictly it applies to the selbri or CMENE_seq, but ignore that nicety for now.) */ antecedent = encl; break; default: fprintf(stderr, "Shouldn't find relative clause in this context\n"); antecedent = NULL; break; } /* Set the antecedent on the NOI to where it is, and put a property on the antecedent node to warn the bracketer that it needs to mark it. */ if (antecedent) { XRequireBrac *xrb; XAntecedent *xan; xan = prop_antecedent(x, YES); xan->node = antecedent; xrb = prop_require_brac(antecedent, YES); } } /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void process_keha(TreeNode *x) { TreeNode *rel; /* Need to extend to deal with subscripted ke'a, where you have to back-count out of nested relative clauses. */ rel = x->parent; while ((rel->data.nonterm.type != RELATIVE_CLAUSE) && (rel->data.nonterm.type != CHUNKS)) { rel = rel->parent; } if (rel->data.nonterm.type == RELATIVE_CLAUSE) { /* Set property on ke'a to point back to containing clause */ prop_rel_clause_link(x, YES)->rel = rel; /* Set property on containing clause to warn that it contains ke'a */ prop_contains_keha (rel, YES); } } /*++++++++++++++++++++++++++++++++++++++ Do processing for relative clauses. The actions are as follows 1. For GOI-type relative clauses, see if the term following is of the form or . This determines whether to bother glossing the GOI cmavo in the text output. 2. For NOI-type relative clauses, there is more to do. 2a. Mark the NOI cmavo with a property to point back to the antecedent of the relative clause. 2b. Look for each instance of ke'a in the text. Look for a subscript on it. Try to backtrack out to the associated relative clause, to point the ke'a at its antecedent. 2c. If ke'a occurs in a relative clause, mark a property on the NOI cmavo. This indicates it should be glossed as 'such that' rather than 'which'. (Maybe this criterion needs to be based on whether any terms precede the selbri in the relative clause? It gets awfully complex in some cases, e.g. if the relative clause is a because the 2 branches may be different in this regard.) TreeNode *top ++++++++++++++++++++++++++++++++++++++*/ void relative_clause_processing (TreeNode *x) { /* Traverse parse tree */ int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; /* Child scan first so that ke'a is processed before NOI */ nc = nt->nchildren; for (i=0; ichildren[i]; relative_clause_processing(c); } if (nt->type == RELATIVE_CLAUSE) { process_any_rel_clause(x); } if (nt->type == TERM_RELATIVE_CLAUSE) { process_goi_clause(x); } else if (nt->type == FULL_RELATIVE_CLAUSE) { process_noi_clause(x); } } else if ((x->type == N_CMAVO) && (!strcmp(cmavo_table[x->data.cmavo.code].cmavo, "ke\'a"))) { process_keha(x); } } jbofihe-0.38/smujajgau.1100644 765 764 13510 7350750742 14203 0ustar richardruser.TH "smujajgau" 1L "April 2000" .SH NAME smujajgau \- Dictionary builder for use with jbofihe and cmafihe .SH SYNOPSIS .PP .B smujajgau [-v] .PP .B smujajgau .I dictionary-name [ .I file1 .I file2 .BR "" ... .I filen ] .SH DESCRIPTION .I smujajgau is a program that reads a set of English definitions for Lojban words, and formats them into a presorted dictionary for use by the jbofihe and cmafihe programs. The dictionary is arranged for rapid access. .SH OPTIONS .TP .B -v Show the program version and exit. .TP .B dictionary-name This is the name of the formatted dictionary to be generated / modified. If the file exists, the definitions in the other file will be added, replacing existing entries where they clash. .TP .B file1 .. filen The source files to be added. Lines beginning with # are treated as comments and discarded. Other lines should have one of the forms .PP lojban:english .PP lojban:english:comment .SH SEE ALSO .PP .TP .B jbofihe Checks Lojban grammar checker and provides English translations of the individual words. .TP .B cmafihe Provides English translations of Lojban words in the input, without checking the grammar. Useful for getting a rough translation of grammatically invalid text. .SH FILES .TP .B /usr/local/lib/jbofihe/smujmaji.dat This file is the default location where .I jbofihe and .I cmafihe expect to find the dictionary. It should therefore be the default first argument to smujajgau (unless the software was installed to an alternative location.) .SH SPECIAL TRANSLATION FORMATS Dictionary entries for brivla (gismu & lujvo) are expected to provide entries for each place of the word. The English translation should indicate the type of the word and the translation. The types are shown in the following table. In addition, the gloss for a translation X is shown depending on the context where it will arise in the translation. These defaults may be overridden. .TS center tab(@); cb | cb || cb | cb | cb | cb c | c || c | c | c | c. Letter@Type@Noun@Verb@Qualifier@Tag = A @ Act @ X-er(s) @ X-ing @ X-ing @ X-er(s) D @ Discrete @ X(s) @ being X @ X @ X S @ Substance @ X @ being X @ X @ X P @ Property @ X thing(s) @ being X @ X @ X thing(s) R @ Rev. prop @ thing(s) X @ being X @ X @ things(s) X I @ Idiomatic @ thing(s) X-ing @ X-ing @ X-ing @ thing(s) X-ing E @ Event @ X(s) @ being X @ X @ X .TE To specify the dictionary entries, the lojban should take the form 'brivlaN', where brivla is the word and N is the place number. One of the following may be suffixed to provide an override of the defaults in the table : n v a or t (for noun, verb, adjective, tag respectively.) As an example, 'nanmu' might have entries .PP nanmu1:D;man .PP nanmu1n:D;man/men .PP whereas 'nandu' might have the definition .PP nandu1:P;difficulty .PP nandu2:I;have* difficulty .PP nandu3:S;conditions for difficulty .PP nandu3t:under conditions a '*' is used in the places where the affixed -s, -er and -ing should be applied (instead of putting them at the end of the English translation, which is the default.) The 'places.dat' file included in the distribution shows many examples. Where a translation with an 'n' suffix exists, this is used in place of some other default forms in the table. For example, this allows special plural forms to be used in other places (e.g. tags.) The dictionary also supports some 'pattern' translations. This allows defaults to be automatically generated for forms ending in '-gau', '-zma, '-rai' etc, where there is a standard lujvo place structure defined in terms of the prefix. The 'Lojban' form for such patterns should be defined in the dictionary as '*Mprefix+N' or '*M+suffixN' for prefix forms (e.g. nu+) and suffix forms (e.g. +zmadu) respectively. M is the 'precedence' (5 highest, 0 lowest), defining the order in which prefix v suffix matches will be attempted. N is the place number as usual. The letters n, v, a or t may be suffixed to define a particular form if required, as for normal definitions. The 'English' form is either a standard definition or a place redirection. In standard definitions, the symbol % is used to mean the translation of the rest of the lujvo form. Place redirections take the form @N, and mean that the lojban pattern form should be translated as place N of the rest of the lujvo. An example makes this clearer : zmadu. *2+zmadu1:R;more %1q .br *2+zmadu2:R;less %1q .br *2+zmadu2t:than .br *2+zmadu3:@2 .br *2+zmadu4:@3 .br *2+zmadu5:@4 .br *2+zmadu6:@5 The components are defined in terms of the full gismu forms, rather than rafsi (hence zmadu rather than mau). This is necessary because the form of a rafsi can change when components are added to or subtracted from a lujvo form. When the 'English' form is given as '-', it indicates that the next components inwards should be concatenated to form a new 'Lojban' form for lookup. This facility is only used for one thing so far - to handle the rafsi 'zil' followed by the rafsi for a cmavo of selma'o PA to puncture a place from the following form. An example (to delete the 1st place of a word, e.g. zilpavykla) : *4zi'o+1:- .br *4zi'o+2:- .br *4zi'o+3:- .br *4zi'o+4:- .br *4zi'o+5:- .br *4zi'o+pa+1:@2 .br *4zi'o+pa+2:@3 .br *4zi'o+pa+3:@4 .br *4zi'o+pa+4:@5 .br *4zi'o+pa+5:@6 The pattern forms are all defined in a file 'patterns' in the distribution. For cmavo, there are special forms used for certain selma'o, particular tenses. These allow dependence on the context in which the cmavo is used. Logical connectives are also defined in a special way. The file 'extradict' in the distribution provides examples. (More documentation is required!) .SH BUGS ju'oru'e so'imei (Surely there are many). .SH REFERENCES .TP .B http://go.to/jbofihe Home page for the jbofihe project .TP .B http://www.rrbcurnow.freeuk.com/lojban/ My Lojban page. .TP .B http://www.lojban.org/ Home page of the Lojban community .SH AUTHOR Richard Curnow .B jbofihe-0.38/rpc2x.y100644 765 764 216021 7350750742 13405 0ustar richardruser/** -*-Fundamental-*- ************************************* $Header: /cvs/src/jbofihe/rpc2x.y,v 1.20 2001/05/09 22:06:55 richard Exp $ Bison parser generator input for Lojban grammar. This is developed directly from the LLG's bnf.300 file. A number of extra tokens are added (in categ.c) so that the parser developed from this is LALR(1). bnf.300 has been extended in a few areas - for syntax error handling, and to make certain sub-categories of some rules directly recognizable in the back-end processing. The same language should still be recognized as that defined in bnf.300. The original BNF rules from bnf.300 are shown commented out in this file; they are those with left-hand sides of the form non-terminal. With acknowledgements to the Logical Language Group, as discussed at the top of bnf.300. The string \* ET *\ indicates where an elidable terminator is optionally missing from a rule. A perl script (terminator.pl) can be used to strip these rules, leaving a grammer where all rules are closed by terminators. By running that grammar through bison, you can look for residual shift/reduce conflicts, if any. (The only ones left here result from the error processing.) (There is a small crock for the case, q.v.). ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ %token GARBAGE %token A %token BAhE %token BAI %token BE %token BEhO %token BEI %token BIhE %token BIhI %token BO %token BOI %token BRIVLA %token BU %token BY %token CAhA %token CAI %token CEhE %token CEI %token CMENE %token CO %token COI %token CU %token CUhE %token DAhO %token DOhU %token DOI %token FA %token FAhA %token FAhO %token FEhE %token FEhU %token FIhO %token FOI %token FUhA %token FUhE %token FUhO %token GA %token GAhO %token GEhU %token GI %token GIhA %token GOhA %token GOI %token GUhA %token I %token JA %token JAI %token JOhI %token JOI %token KE %token KEhE %token KEI %token KI %token KOhA %token KUhE %token KUhO %token KU %token LA %token LAhE %token LAU %token LE %token LEhU %token LI %token LIhU %token LOhO %token LOhU %token LU %token LUhU %token MAhO %token MAI %token ME %token MEhU %token MOhE %token MOhI %token MOI %token NA %token NAhE %token NAhU %token NAI %token NIhE %token NIhO %token NOI %token NU %token NUhA %token NUhI %token NUhU %token PA %token PEhA %token PEhE %token PEhO %token POhA %token PU %token RAhO %token ROI %token SA %token SE %token SEhU %token SEI %token SI %token SOI %token SU %token TAhE %token TEhU %token TEI %token TO %token TOI %token TUhE %token TUhU %token UI %token VA %token VAU %token VEhA %token VEhO %token VEI %token VIhA %token VUhO %token VUhU %token XI %token Y %token ZAhO %token ZEhA %token ZEI %token ZI %token ZIhE %token ZO %token ZOhU %token ZOI /* EXTRA TOKENS REQUIRED TO MAKE GRAMMAR LALR(1) */ %token PRIVATE_START_EK %token PRIVATE_START_GIHEK %token PRIVATE_START_GUHEK %token PRIVATE_START_JEK %token PRIVATE_START_JOIK %token PRIVATE_START_GEK %token PRIVATE_START_BAI %token PRIVATE_EK_KE %token PRIVATE_EK_BO %token PRIVATE_JEK_KE %token PRIVATE_JEK_BO %token PRIVATE_JOIK_KE %token PRIVATE_JOIK_BO %token PRIVATE_I_JEKJOIK %token PRIVATE_I_BO %token PRIVATE_GIHEK_KE %token PRIVATE_GIHEK_BO %token PRIVATE_NAhE_BO %token PRIVATE_NAhE_time %token PRIVATE_NAhE_space %token PRIVATE_NAhE_CAhA %token PRIVATE_NA_KU %token PRIVATE_NUMBER_MAI %token PRIVATE_NUMBER_MOI %token PRIVATE_NUMBER_ROI %token PRIVATE_EOF_MARK %token IMPOSSIBLE_TOKEN %{ #define YYDEBUG 1 #include #include "nodes.h" #include "nonterm.h" #include "functions.h" #define YYSTYPE TreeNode * extern TreeNode *top; extern void yyerror(const char *); extern int last_tok_line; extern int last_tok_column; %} %% /* text<0> = [NAI ...] [CMENE ... # | (indicators & free ...)] [joik-jek] text-1 */ all : chunks ; /* all : text ; */ /* This is an artifact of the error handling mechanism - sometimes the parser will reduce right out to the top rule which is hopeless */ chunks : text PRIVATE_EOF_MARK | text error { $$ = $1; yyclearin; } | chunks text PRIVATE_EOF_MARK | chunks text error { fprintf(stderr, "Syntax error following text ending at line %d column %d\n", @2.last_line, @2.last_column); yyclearin; $$ = new_node_2(CHUNKS, $1, $2); } ; text : NAI_seq CMENE_seq free_seq joik_opt_ke free_seq text_1 | NAI_seq CMENE_seq free_seq jek_opt_ke free_seq text_1 | NAI_seq CMENE_seq free_seq joik_opt_ke text_1 | NAI_seq CMENE_seq free_seq jek_opt_ke text_1 | NAI_seq CMENE_seq free_seq text_1 | NAI_seq CMENE_seq joik_opt_ke free_seq text_1 | NAI_seq CMENE_seq jek_opt_ke free_seq text_1 | NAI_seq CMENE_seq joik_opt_ke text_1 | NAI_seq CMENE_seq jek_opt_ke text_1 | NAI_seq CMENE_seq text_1 | NAI_seq indicators free_seq joik_opt_ke free_seq text_1 | NAI_seq indicators free_seq jek_opt_ke free_seq text_1 | NAI_seq indicators free_seq joik_opt_ke text_1 | NAI_seq indicators free_seq jek_opt_ke text_1 | NAI_seq indicators free_seq text_1 | NAI_seq indicators joik_opt_ke free_seq text_1 | NAI_seq indicators jek_opt_ke free_seq text_1 | NAI_seq indicators joik_opt_ke text_1 | NAI_seq indicators jek_opt_ke text_1 | NAI_seq indicators text_1 | NAI_seq free_seq joik_opt_ke free_seq text_1 | NAI_seq free_seq jek_opt_ke free_seq text_1 | NAI_seq free_seq joik_opt_ke text_1 | NAI_seq free_seq jek_opt_ke text_1 | NAI_seq free_seq text_1 | NAI_seq joik_opt_ke free_seq text_1 | NAI_seq jek_opt_ke free_seq text_1 | NAI_seq joik_opt_ke text_1 | NAI_seq jek_opt_ke text_1 | NAI_seq text_1 | CMENE_seq free_seq joik_opt_ke free_seq text_1 | CMENE_seq free_seq jek_opt_ke free_seq text_1 | CMENE_seq free_seq joik_opt_ke text_1 | CMENE_seq free_seq jek_opt_ke text_1 | CMENE_seq free_seq text_1 | CMENE_seq joik_opt_ke free_seq text_1 | CMENE_seq jek_opt_ke free_seq text_1 | CMENE_seq joik_opt_ke text_1 | CMENE_seq jek_opt_ke text_1 | CMENE_seq text_1 | indicators free_seq joik_opt_ke free_seq text_1 | indicators free_seq jek_opt_ke free_seq text_1 | indicators free_seq joik_opt_ke text_1 | indicators free_seq jek_opt_ke text_1 | indicators free_seq text_1 | indicators joik_opt_ke free_seq text_1 | indicators jek_opt_ke free_seq text_1 | indicators joik_opt_ke text_1 | indicators jek_opt_ke text_1 | indicators text_1 | free_seq joik_opt_ke free_seq text_1 | free_seq jek_opt_ke free_seq text_1 | free_seq joik_opt_ke text_1 | free_seq jek_opt_ke text_1 | free_seq text_1 | joik_opt_ke free_seq text_1 | jek_opt_ke free_seq text_1 | joik_opt_ke text_1 | jek_opt_ke text_1 | text_1 | text_no_text_1 | /* empty */ ; text_no_text_1 : NAI_seq CMENE_seq free_seq joik_opt_ke free_seq | NAI_seq CMENE_seq free_seq jek_opt_ke free_seq | NAI_seq CMENE_seq free_seq joik_opt_ke | NAI_seq CMENE_seq free_seq jek_opt_ke | NAI_seq CMENE_seq free_seq | NAI_seq CMENE_seq joik_opt_ke free_seq | NAI_seq CMENE_seq jek_opt_ke free_seq | NAI_seq CMENE_seq joik_opt_ke | NAI_seq CMENE_seq jek_opt_ke | NAI_seq CMENE_seq | NAI_seq indicators free_seq joik_opt_ke free_seq | NAI_seq indicators free_seq jek_opt_ke free_seq | NAI_seq indicators free_seq joik_opt_ke | NAI_seq indicators free_seq jek_opt_ke | NAI_seq indicators free_seq | NAI_seq indicators joik_opt_ke free_seq | NAI_seq indicators jek_opt_ke free_seq | NAI_seq indicators joik_opt_ke | NAI_seq indicators jek_opt_ke | NAI_seq indicators | NAI_seq free_seq joik_opt_ke free_seq | NAI_seq free_seq jek_opt_ke free_seq | NAI_seq free_seq joik_opt_ke | NAI_seq free_seq jek_opt_ke | NAI_seq free_seq | NAI_seq joik_opt_ke free_seq | NAI_seq jek_opt_ke free_seq | NAI_seq joik_opt_ke | NAI_seq jek_opt_ke | NAI_seq | CMENE_seq free_seq joik_opt_ke free_seq | CMENE_seq free_seq jek_opt_ke free_seq | CMENE_seq free_seq joik_opt_ke | CMENE_seq free_seq jek_opt_ke | CMENE_seq free_seq | CMENE_seq joik_opt_ke free_seq | CMENE_seq jek_opt_ke free_seq | CMENE_seq joik_opt_ke | CMENE_seq jek_opt_ke | CMENE_seq | indicators free_seq joik_opt_ke free_seq | indicators free_seq jek_opt_ke free_seq | indicators free_seq joik_opt_ke | indicators free_seq jek_opt_ke | indicators free_seq | indicators joik_opt_ke free_seq | indicators jek_opt_ke free_seq | indicators joik_opt_ke | indicators jek_opt_ke | indicators | free_seq joik_opt_ke free_seq | free_seq jek_opt_ke free_seq | free_seq joik_opt_ke | free_seq jek_opt_ke | free_seq | joik_opt_ke free_seq | jek_opt_ke free_seq | joik_opt_ke | jek_opt_ke ; /* text-1<2> = [(I [jek | joik] [[stag] BO] #) ... | NIhO ... #] [paragraphs] */ text_1 : text_1A paragraphs | text_1A | paragraphs ; text_1A : text_1B | NIhO_seq_free_seq ; text_1B : text_1C | text_1B text_1C ; /* Differs from i_jj_stag_bo because it allows the construct without BO at the end . */ text_1C : PRIVATE_I_BO I joik stag BO free_seq | PRIVATE_I_BO I jek stag BO free_seq | PRIVATE_I_BO I stag BO free_seq | PRIVATE_I_BO I joik stag BO | PRIVATE_I_BO I jek stag BO | PRIVATE_I_BO I stag BO | PRIVATE_I_BO I joik BO free_seq | PRIVATE_I_BO I jek BO free_seq | PRIVATE_I_BO I BO free_seq | PRIVATE_I_BO I joik BO | PRIVATE_I_BO I jek BO | PRIVATE_I_BO I BO | I joik_opt_ke free_seq | I jek_opt_ke free_seq | I free_seq | I joik_opt_ke | I jek_opt_ke | I ; /* paragraphs<4> = paragraph [NIhO ... # paragraphs] */ /* Rewrite to make this left recursive : important as there may be lots of these in a text. */ /* paragraph<10> = (statement | fragment) [I # [statement | fragment]] ... */ paragraphs : paragraph | paragraphs NIhO_seq_free_seq paragraph ; paragraph : statement | fragment | paragraph i_opt_free_seq statement | paragraph i_opt_free_seq fragment | paragraph i_opt_free_seq ; i_opt_free_seq : I | I free_seq ; /* statement<11> = statement-1 | prenex statement */ statement : inner_statement ; inner_statement : statement_1 | prenex inner_statement ; /* statement-1<12> = statement-2 [I joik-jek [statement-2]] ... */ statement_1 : statement_2 | statement_1 i_joik_jek statement_2 | statement_1 i_joik_jek ; i_joik_jek : PRIVATE_I_JEKJOIK I joik_opt_ke free_seq | PRIVATE_I_JEKJOIK I joik_opt_ke | PRIVATE_I_JEKJOIK I jek_opt_ke free_seq | PRIVATE_I_JEKJOIK I jek_opt_ke ; /* statement-2<13> = statement-3 [I [jek | joik] [stag] BO # [statement-2]] */ statement_2 : statement_3 | statement_3 i_jj_stag_bo | statement_3 i_jj_stag_bo statement_2 ; i_jj_stag_bo : PRIVATE_I_BO I joik stag BO free_seq | PRIVATE_I_BO I joik stag BO | PRIVATE_I_BO I joik BO free_seq | PRIVATE_I_BO I joik BO | PRIVATE_I_BO I jek stag BO free_seq | PRIVATE_I_BO I jek stag BO | PRIVATE_I_BO I jek BO free_seq | PRIVATE_I_BO I jek BO | PRIVATE_I_BO I stag BO free_seq | PRIVATE_I_BO I stag BO | PRIVATE_I_BO I BO free_seq | PRIVATE_I_BO I BO ; /* statement-3<14> = sentence | [tag] TUhE # text-1 /TUhU#/ */ statement_3 : sentence | tag TUhE free_seq text_1 TUhU free_seq | tag TUhE free_seq text_1 TUhU | tag TUhE free_seq text_1 /* ET TUhU */ | tag TUhE text_1 TUhU free_seq | tag TUhE text_1 TUhU | tag TUhE text_1 /* ET TUhU */ | TUhE free_seq text_1 TUhU free_seq | TUhE free_seq text_1 TUhU | TUhE free_seq text_1 /* ET TUhU */ | TUhE text_1 TUhU free_seq | TUhE text_1 TUhU | TUhE text_1 /* ET TUhU */ ; /* fragment<20> = ek # | gihek # | quantifier | NA # | terms /VAU#/ | prenex | relative-clauses | links | linkargs */ fragment : ek free_seq | ek | gihek free_seq | gihek | quantifier | NA free_seq | NA | terms VAU free_seq | terms VAU | terms /* ET VAU */ | prenex | relative_clauses | links | linkargs ; /* prenex<30> = terms ZOhU # */ prenex : terms ZOhU free_seq | terms ZOhU ; /* sentence<40> = [terms [CU #]] bridi-tail */ /* It would be nice to rearrange this so that CU occurs at the end of a rule, so that the support for the 'show_elidables' option works the same way as for all other elidables. Unfortunately, if [terms [CU#]] is broken off as a rule on its own, a reduce/reduce conflict is introduced between reducing the terms on its own versus reducing terms on its own in the fragment rule. Although this can be accommodated with care, there is a worse problem. In a sentence like "mi pu klama le zarci", the "pu" gets treated as being a term in the terms before the missing CU, i.e. effectively "mi puku cu klama le zarci". This is incorrect, it should be reduced as part of the bridi_tail. This is pretty-much a showstopper problem for proceeding that way, so CU just has to have special treatment in elide.c. */ sentence : terms CU free_seq bridi_tail | terms CU bridi_tail | no_cu_sentence | observative_sentence /* The following are all artificial */ | terms PRIVATE_START_GIHEK /* error */ { fprintf(stderr, "Missing selbri before GIhA at line %d column %d\n", @2.first_line, @2.first_column); error_advance(0); $$ = $1; YYERROR; } | terms PRIVATE_GIHEK_KE /* error */ { fprintf(stderr, "Missing selbri before GIhA at line %d column %d\n", @2.first_line, @2.first_column); error_advance(0); $$ = $1; YYERROR; } | terms PRIVATE_GIHEK_BO /* error */ { fprintf(stderr, "Missing selbri before GIhA at line %d column %d\n", @2.first_line, @2.first_column); error_advance(0); $$ = $1; YYERROR; } ; /* The IMPOSSIBLE_TOKEN branch won't ever match. This allows the terms * bridi_tail branch to be stripped to produce the all-elidables version of the * grammar, without giving a syntax error on ';' when actions are inserted, or * not having a match for this rule under sentence */ no_cu_sentence : IMPOSSIBLE_TOKEN | terms /* ET CU */ bridi_tail ; /* A misnomer if there is a 'fa' in the tail terms, however ... */ observative_sentence : bridi_tail ; /* subsentence<41> = sentence | prenex subsentence */ subsentence : sentence | prenex subsentence ; /* bridi-tail<50> = bridi-tail-1 [gihek [stag] KE # bridi-tail /KEhE#/ tail-terms] */ bridi_tail : bridi_tail_1 | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail KEhE free_seq tail_terms | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail KEhE free_seq /* ET VAU */ | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail KEhE tail_terms | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail KEhE /* ET VAU */ | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail /* ET KEhE */ tail_terms | bridi_tail_1 gihek_stag_ke KE free_seq bridi_tail /* ET KEhE */ /* ET VAU */ | bridi_tail_1 gihek_stag_ke KE bridi_tail KEhE free_seq tail_terms | bridi_tail_1 gihek_stag_ke KE bridi_tail KEhE free_seq /* ET VAU */ | bridi_tail_1 gihek_stag_ke KE bridi_tail KEhE tail_terms | bridi_tail_1 gihek_stag_ke KE bridi_tail KEhE /* ET VAU */ | bridi_tail_1 gihek_stag_ke KE bridi_tail /* ET KEhE */ tail_terms | bridi_tail_1 gihek_stag_ke KE bridi_tail /* ET VAU */ ; gihek_stag_ke : PRIVATE_GIHEK_KE gihek stag | PRIVATE_GIHEK_KE gihek ; /* bridi-tail-1<51> = bridi-tail-2 [gihek # bridi-tail-2 tail-terms] ... */ bridi_tail_1 : bridi_tail_2 | bridi_tail_1 gihek free_seq bridi_tail_2 tail_terms | bridi_tail_1 gihek free_seq bridi_tail_2 /* ET VAU */ | bridi_tail_1 gihek bridi_tail_2 tail_terms | bridi_tail_1 gihek bridi_tail_2 /* ET VAU */ ; /* bridi-tail-2<52> = bridi-tail-3 [gihek [stag] BO # bridi-tail-2 tail-terms] */ bridi_tail_2 : bridi_tail_3 | bridi_tail_2 gihek_stag_bo bridi_tail_2 tail_terms | bridi_tail_2 gihek_stag_bo bridi_tail_2 /* ET VAU */ ; gihek_stag_bo : PRIVATE_GIHEK_BO gihek stag BO free_seq | PRIVATE_GIHEK_BO gihek stag BO | PRIVATE_GIHEK_BO gihek BO free_seq | PRIVATE_GIHEK_BO gihek BO ; /* bridi-tail-3<53> = selbri tail-terms | gek-sentence */ bridi_tail_3 : main_selbri tail_terms | main_selbri /* ET VAU */ | gek_sentence ; main_selbri : selbri ; /* The case of empty tail_terms must be handled in the parent rule and tagged with [* ET *] because there is a VAU elided in such a case */ tail_terms : terms VAU free_seq | terms VAU | terms /* ET VAU */ | VAU free_seq | VAU ; /* gek-sentence<54> = gek subsentence gik subsentence tail-terms | [tag] KE # gek-sentence /KEhE#/ | NA # gek-sentence */ gek_sentence : gek subsentence gik subsentence tail_terms | gek subsentence gik subsentence /* ET VAU */ | tag KE free_seq gek_sentence KEhE free_seq | tag KE free_seq gek_sentence KEhE | tag KE free_seq gek_sentence /* ET KEhE */ | tag KE gek_sentence KEhE free_seq | tag KE gek_sentence KEhE | tag KE gek_sentence /* ET KEhE */ | KE free_seq gek_sentence KEhE free_seq | KE free_seq gek_sentence KEhE | KE free_seq gek_sentence /* ET KEhE */ | KE gek_sentence KEhE free_seq | KE gek_sentence KEhE | KE gek_sentence /* ET KEhE */ | NA free_seq gek_sentence | NA gek_sentence ; /* This can reduce to null, so must be folded into everywhere it appears, unfortunately */ /* tail-terms<71> = [terms] /VAU#/ */ /* terms<80> = terms-1 ... */ terms : terms_1 | terms terms_1 ; /* terms-1<81> = terms-2 [PEhE # joik-jek terms-2] ... */ terms_1 : terms_2 | terms_1 PEhE free_seq joik free_seq terms_2 | terms_1 PEhE free_seq joik terms_2 | terms_1 PEhE free_seq jek free_seq terms_2 | terms_1 PEhE free_seq jek terms_2 | terms_1 PEhE joik free_seq terms_2 | terms_1 PEhE joik terms_2 | terms_1 PEhE jek free_seq terms_2 | terms_1 PEhE jek terms_2 ; /* terms-2<82> = term [CEhE # term] ... */ terms_2 : term | terms_2 CEhE free_seq term | terms_2 CEhE term ; /* term<83> = sumti | (tag | FA #) (sumti | /KU#/) | termset | NA KU # */ /* [ET] needed below to fix up the tag stag gik sumti-4... S/R conflict, which * is avoided by using tag termset. */ term : term_plain_sumti | term_tagged_sumti /* ET */ | term_placed_sumti | term_floating_tense | termset | tagged_termset | term_floating_negate | term_other ; term_plain_sumti : sumti ; term_placed_sumti : FA free_seq sumti | FA sumti ; term_tagged_sumti : tag sumti ; /* The next rule follows an email discussion on onelist/egroups in early June * 2000, about how to fix the "tag tag gi sumti gi sumti" shift-reduce conflict * problem. This also accommodates a statement in the Book which is not * realised in either bnf.233 or bnf.300 */ tagged_termset : tag termset ; term_floating_tense : tag KU free_seq | tag KU | tag /* ET KU */ ; term_floating_negate : PRIVATE_NA_KU NA KU free_seq | PRIVATE_NA_KU NA KU ; /* Where on earth do these arise? 'FA' on its own can be in a fragment as an answer to a fa'i question, but what about the others??? */ term_other : FA free_seq KU free_seq | FA free_seq KU | FA free_seq /* ET KU */ | FA KU free_seq | FA KU | FA /* ET KU */ ; /* termset<85> = NUhI # gek terms /NUhU#/ gik terms /NUhU#/ | NUhI # terms /NUhU#/ */ /* Termset is broken up this way so that the intermediate /NUhU#/ occurs at the end of a rule. This makes the support for the 'show_elidables_verbose' option easier to do. */ termset : termset_start gek termset_body gik termset_body | termset_start termset_body ; termset_start : NUhI free_seq | NUhI ; termset_body : terms NUhU free_seq | terms NUhU | terms /* ET NUhU */ ; /* sumti<90> = sumti-1 [VUhO # relative-clauses] */ sumti : sumti_1 | sumti_1 VUhO free_seq relative_clauses | sumti_1 VUhO relative_clauses ; /* sumti-1<91> = sumti-2 [(ek | joik) [stag] KE # sumti /KEhE#/] */ sumti_1 : sumti_2 | sumti_2 joik_ek_ke ke_sumti ; joik_ek_ke : PRIVATE_JOIK_KE joik stag | PRIVATE_JOIK_KE joik | PRIVATE_EK_KE ek stag | PRIVATE_EK_KE ek ; ke_sumti : KE free_seq sumti KEhE free_seq | KE free_seq sumti KEhE | KE free_seq sumti /* ET KEhE */ | KE sumti KEhE free_seq | KE sumti KEhE | KE sumti /* ET KEhE */ ; /* sumti-2<92> = sumti-3 [joik-ek sumti-3] ... */ sumti_2 : sumti_3 | sumti_2 joik free_seq sumti_3 | sumti_2 joik sumti_3 | sumti_2 ek free_seq sumti_3 | sumti_2 ek sumti_3 ; /* sumti-3<93> = sumti-4 [(ek | joik) [stag] BO # sumti-3] */ sumti_3 : sumti_4 | sumti_4 joik_ek_stag_bo sumti_3 ; joik_ek_stag_bo : PRIVATE_JOIK_BO joik stag BO free_seq | PRIVATE_JOIK_BO joik stag BO | PRIVATE_JOIK_BO joik BO free_seq | PRIVATE_JOIK_BO joik BO | PRIVATE_EK_BO ek stag BO free_seq | PRIVATE_EK_BO ek stag BO | PRIVATE_EK_BO ek BO free_seq | PRIVATE_EK_BO ek BO ; /* sumti-4<94> = sumti-5 | gek sumti gik sumti-4 */ sumti_4 : sumti_5 | gek sumti gik sumti_4 ; /* sumti-5<95> = [quantifier] sumti-6 [relative-clauses] | quantifier selbri /KU#/ [relative-clauses] */ sumti_5 : sumti_5a relative_clauses | sumti_5a | sumti_5b relative_clauses | sumti_5b ; sumti_5a : quantifier sumti_6 | sumti_6 ; sumti_5b : quantifier selbri KU free_seq | quantifier selbri KU | quantifier selbri /* ET KU */ ; /* sumti-6<97> = (LAhE # | NAhE BO #) [relative-clauses] sumti /LUhU#/ | KOhA # | lerfu-string /BOI#/ | LA # [relative-clauses] CMENE ... # | (LA | LE) # sumti-tail /KU#/ | LI # mex /LOhO#/ | ZO any-word # | LU text /LIhU#/ | LOhU any-word ... LEhU # | ZOI any-word anything any-word # */ sumti_6 : lahe_sumti_6 | nahe_bo_sumti_6 | KOhA free_seq | KOhA | lerfu_string BOI free_seq | lerfu_string BOI | lerfu_string /* ET BOI */ | LE free_seq sumti_tail KU free_seq | LE free_seq sumti_tail KU | LE free_seq sumti_tail /* ET KU */ | LE sumti_tail KU free_seq | LE sumti_tail KU | LE sumti_tail /* ET KU */ | LA free_seq sumti_tail KU free_seq | LA free_seq sumti_tail KU | LA free_seq sumti_tail /* ET KU */ | LA sumti_tail KU free_seq | LA sumti_tail KU | LA sumti_tail /* ET KU */ | name_sumti_6 | LI free_seq mex LOhO free_seq | LI free_seq mex LOhO | LI free_seq mex /* ET LOhO */ | LI mex LOhO free_seq | LI mex LOhO | LI mex /* ET LOhO */ | ZO free_seq /* Needs lexer tie-in */ | ZO /* Needs lexer tie-in */ | LU text LIhU free_seq | LU text LIhU | LU text /* ET LIhU */ | LOhU free_seq /* Needs lexer tie-in */ | LOhU /* Needs lexer tie-in */ | ZOI free_seq /* Needs lexer tie-in */ | ZOI /* Needs lexer tie-in */ ; lahe_sumti_6 : LAhE free_seq relative_clauses sumti LUhU free_seq | LAhE free_seq relative_clauses sumti LUhU | LAhE free_seq relative_clauses sumti /* ET LUhU */ | LAhE free_seq sumti LUhU free_seq | LAhE free_seq sumti LUhU | LAhE free_seq sumti /* ET LUhU */ | LAhE relative_clauses sumti LUhU free_seq | LAhE relative_clauses sumti LUhU | LAhE relative_clauses sumti /* ET LUhU */ | LAhE sumti LUhU free_seq | LAhE sumti LUhU | LAhE sumti /* ET LUhU */ ; nahe_bo_sumti_6 : PRIVATE_NAhE_BO NAhE BO free_seq relative_clauses sumti LUhU free_seq | PRIVATE_NAhE_BO NAhE BO free_seq relative_clauses sumti LUhU | PRIVATE_NAhE_BO NAhE BO free_seq relative_clauses sumti /* ET LUhU */ | PRIVATE_NAhE_BO NAhE BO free_seq sumti LUhU free_seq | PRIVATE_NAhE_BO NAhE BO free_seq sumti LUhU | PRIVATE_NAhE_BO NAhE BO free_seq sumti /* ET LUhU */ | PRIVATE_NAhE_BO NAhE BO relative_clauses sumti LUhU free_seq | PRIVATE_NAhE_BO NAhE BO relative_clauses sumti LUhU | PRIVATE_NAhE_BO NAhE BO relative_clauses sumti /* ET LUhU */ | PRIVATE_NAhE_BO NAhE BO sumti LUhU free_seq | PRIVATE_NAhE_BO NAhE BO sumti LUhU | PRIVATE_NAhE_BO NAhE BO sumti /* ET LUhU */ ; name_sumti_6 : LA free_seq relative_clauses CMENE_seq free_seq | LA free_seq relative_clauses CMENE_seq | LA free_seq CMENE_seq free_seq | LA free_seq CMENE_seq | LA relative_clauses CMENE_seq free_seq | LA relative_clauses CMENE_seq | LA CMENE_seq free_seq | LA CMENE_seq ; /* sumti-tail<111> = [sumti-6 [relative-clauses]] sumti-tail-1 | relative-clauses sumti-tail-1 */ sumti_tail : sumti_6 relative_clauses sumti_tail_1 | sumti_6 sumti_tail_1 | sumti_tail_1 | relative_clauses sumti_tail_1 ; /* sumti-tail-1<112> = [quantifier] selbri [relative-clauses] | quantifier sumti */ /* 1A split off so that there is a single antecedent node for the relative clauses case */ sumti_tail_1 : sumti_tail_1A relative_clauses | sumti_tail_1A | quantifier sumti ; sumti_tail_1A : quantifier selbri | selbri ; /* relative-clauses<121> = relative-clause [ZIhE # relative-clause] ... */ relative_clauses : relative_clause_seq ; relative_clause_seq : relative_clause | relative_clause_seq ZIhE free_seq relative_clause | relative_clause_seq ZIhE relative_clause ; /* relative-clause<122> = GOI # term /GEhU#/ | NOI # subsentence /KUhO#/ */ relative_clause : term_relative_clause | full_relative_clause ; term_relative_clause : GOI free_seq term GEhU free_seq | GOI free_seq term GEhU | GOI free_seq term /* ET GEhU */ | GOI term GEhU free_seq | GOI term GEhU | GOI term /* ET GEhU */ ; full_relative_clause : NOI free_seq subsentence KUhO free_seq | NOI free_seq subsentence KUhO | NOI free_seq subsentence /* ET KUhO */ | NOI subsentence KUhO free_seq | NOI subsentence KUhO | NOI subsentence /* ET KUhO */ ; /* selbri<130> = [tag] selbri-1 */ selbri : tag selbri_1 | selbri_1 ; /* selbri-1<131> = selbri-2 | NA # selbri */ selbri_1 : selbri_2 | NA free_seq selbri | NA selbri ; /* selbri-2<132> = selbri-3 [CO # selbri-2] */ selbri_2 : selbri_3 CO free_seq selbri_2 | selbri_3 CO selbri_2 | selbri_3 ; /* selbri-3<133> = selbri-4 ... */ selbri_3 : selbri_3 selbri_4 | selbri_4 ; /* selbri-4<134> = selbri-5 [joik-jek selbri-5 | joik [stag] KE # selbri-3 /KEhE#/] ... */ /* This is where things get REALLY hairy because of the KE # selbri_3 construct inside tanru_unit_2. Separate cases need to be broken out */ selbri_4 : selbri_5 | selbri_4 joik_opt_ke free_seq selbri_5 | selbri_4 joik_opt_ke selbri_5 | selbri_4 jek_opt_ke free_seq selbri_5 | selbri_4 jek_opt_ke selbri_5 | selbri_4 joik_stag_ke ke_selbri_3 ; joik_stag_ke : PRIVATE_JOIK_KE joik stag ; ke_selbri_3 : KE free_seq selbri_3 KEhE free_seq | KE free_seq selbri_3 KEhE | KE free_seq selbri_3 /* ET KEhE */ | KE selbri_3 KEhE free_seq | KE selbri_3 KEhE | KE selbri_3 /* ET KEhE */ ; /* selbri-5<135> = selbri-6 [(jek | joik) [stag] BO # selbri-5] */ selbri_5 : selbri_6 | selbri_6 joik_jek_stag_bo selbri_5 ; joik_jek_stag_bo : PRIVATE_JOIK_BO joik stag BO free_seq | PRIVATE_JOIK_BO joik stag BO | PRIVATE_JOIK_BO joik BO free_seq | PRIVATE_JOIK_BO joik BO | PRIVATE_JEK_BO jek stag BO free_seq | PRIVATE_JEK_BO jek stag BO | PRIVATE_JEK_BO jek BO free_seq | PRIVATE_JEK_BO jek BO ; /* selbri-6<136> = tanru-unit [BO # selbri-6] | [NAhE #] guhek selbri gik selbri-6 */ selbri_6 : tanru_unit | tanru_unit BO free_seq selbri_6 | tanru_unit BO selbri_6 | NAhE free_seq guhek selbri gik selbri_6 | NAhE guhek selbri gik selbri_6 | guhek selbri gik selbri_6 ; /* tanru-unit<150> = tanru-unit-1 [CEI # tanru-unit-1] ... */ tanru_unit : tanru_unit_1 | tanru_unit CEI free_seq tanru_unit_1 | tanru_unit CEI tanru_unit_1 ; /* tanru-unit-1<151> = tanru-unit-2 [linkargs] */ tanru_unit_1 : tanru_unit_2 | tanru_unit_2 linkargs ; /* tanru-unit-2<152> = BRIVLA # | GOhA [RAhO] # | KE # selbri-3 /KEhE#/ | ME # sumti /MEhU#/ [MOI #] | (number | lerfu-string) MOI # | NUhA # mex-operator | SE # tanru-unit-2 | JAI # [tag] tanru-unit-2 | any-word (ZEI any-word) ... | NAhE # tanru-unit-2 | NU [NAI] # [joik-jek NU [NAI] #] ... subsentence /KEI#/ */ /* All the cases that warrant special attention wrt handling conversion operators and how the propagate into following constructions are pulled out as subrules */ tanru_unit_2 : BRIVLA free_seq | BRIVLA | GOhA RAhO free_seq | GOhA RAhO | GOhA free_seq | GOhA | ke_selbri3_tu2 | ME free_seq sumti MEhU free_seq MOI free_seq | ME free_seq sumti MEhU free_seq MOI | ME free_seq sumti MEhU free_seq | ME free_seq sumti MEhU MOI free_seq | ME free_seq sumti MEhU MOI | ME free_seq sumti MEhU | ME free_seq sumti /* ET MEhU */ MOI free_seq | ME free_seq sumti /* ET MEhU */ MOI | ME free_seq sumti /* ET MEhU */ | ME sumti MEhU free_seq MOI free_seq | ME sumti MEhU free_seq MOI | ME sumti MEhU free_seq | ME sumti MEhU MOI free_seq | ME sumti MEhU MOI | ME sumti MEhU | ME sumti /* ET MEhU */ MOI free_seq | ME sumti /* ET MEhU */ MOI | ME sumti /* ET MEhU */ | number_moi_tu2 | NUhA free_seq mex_operator | NUhA mex_operator | se_tu2 | jai_tag_tu2 | jai_tu2 | ZEI /* needs lexical tie-in */ | nahe_tu2 | abstraction ; ke_selbri3_tu2 : KE free_seq selbri_3 KEhE free_seq | KE free_seq selbri_3 KEhE | KE free_seq selbri_3 /* ET KEhE */ | KE selbri_3 KEhE free_seq | KE selbri_3 KEhE | KE selbri_3 /* ET KEhE */ ; number_moi_tu2 : PRIVATE_NUMBER_MOI number MOI free_seq | PRIVATE_NUMBER_MOI number MOI | PRIVATE_NUMBER_MOI lerfu_string MOI free_seq | PRIVATE_NUMBER_MOI lerfu_string MOI ; se_tu2 : SE free_seq tanru_unit_2 | SE tanru_unit_2 ; jai_tag_tu2 : JAI free_seq tag tanru_unit_2 | JAI tag tanru_unit_2 ; jai_tu2 : JAI free_seq tanru_unit_2 | JAI tanru_unit_2 ; nahe_tu2 : NAhE free_seq tanru_unit_2 | NAhE tanru_unit_2 ; /* This needs rework to make it easy to spot the case of NU in the later analysis, as this would often be gloss-able as a single word */ abstraction : nu_nai_seq subsentence KEI free_seq | nu_nai_seq subsentence KEI | nu_nai_seq subsentence /* ET KEI */ ; nu_nai_seq : NU NAI free_seq | NU free_seq | NU NAI | NU | nu_nai_seq joik free_seq NU NAI free_seq | nu_nai_seq joik free_seq NU NAI | nu_nai_seq joik free_seq NU free_seq | nu_nai_seq joik free_seq NU | nu_nai_seq joik NU NAI free_seq | nu_nai_seq joik NU NAI | nu_nai_seq joik NU free_seq | nu_nai_seq joik NU | nu_nai_seq jek free_seq NU NAI free_seq | nu_nai_seq jek free_seq NU NAI | nu_nai_seq jek free_seq NU free_seq | nu_nai_seq jek free_seq NU | nu_nai_seq jek NU NAI free_seq | nu_nai_seq jek NU NAI | nu_nai_seq jek NU free_seq | nu_nai_seq jek NU ; /* linkargs<160> = BE # term [links] /BEhO#/ */ linkargs : BE free_seq term links BEhO free_seq | BE free_seq term links BEhO | BE free_seq term links /* ET BEhO */ | BE term links BEhO free_seq | BE term links BEhO | BE term links /* ET BEhO */ | BE free_seq term BEhO free_seq | BE free_seq term BEhO | BE free_seq term /* ET BEhO */ | BE term BEhO free_seq | BE term BEhO | BE term /* ET BEhO */ ; /* links<161> = BEI # term [links] */ links : BEI free_seq term links | BEI term links | BEI free_seq term | BEI term ; /* quantifier<300> = number /BOI#/ | VEI # mex /VEhO#/ */ quantifier : number BOI free_seq | number BOI | number /* ET BOI */ | VEI free_seq mex VEhO free_seq | VEI free_seq mex VEhO | VEI free_seq mex /* ET VEhO */ | VEI mex VEhO free_seq | VEI mex VEhO | VEI mex /* ET VEhO */ ; /* mex<310> = mex-1 [operator mex-1] ... | FUhA # rp-expression */ mex : mex_infix | mex_rp ; mex_rp : FUhA free_seq rp_expression | FUhA rp_expression ; mex_infix : mex_1 | mex_infix operator mex_1 ; /* mex-1<311> = mex-2 [BIhE # operator mex-1] */ mex_1 : mex_2 | mex_2 BIhE free_seq operator mex_1 | mex_2 BIhE operator mex_1 ; /* mex-2<312> = operand | [PEhO #] operator mex-2 ... /KUhE#/ */ mex_2 : operand | PEhO free_seq operator mex_2_seq KUhE free_seq | PEhO free_seq operator mex_2_seq KUhE | PEhO free_seq operator mex_2_seq /* ET KUhE */ | PEhO operator mex_2_seq KUhE free_seq | PEhO operator mex_2_seq KUhE | PEhO operator mex_2_seq /* ET KUhE */ | operator mex_2_seq KUhE free_seq | operator mex_2_seq KUhE | operator mex_2_seq /* ET KUhE */ ; mex_2_seq : mex_2 | mex_2_seq mex_2 ; /* rp-expression<330> = rp-operand rp-operand operator */ rp_expression : rp_expression rp_expression operator | operand rp_expression operator | rp_expression operand operator | operand operand operator ; /* rp-operand<332> = operand | rp-expression */ /* rp_operand : operand | rp_expression ; */ /* operator<370> = operator-1 [joik-jek operator-1 | joik [stag] KE # operator /KEhE#/] ... */ operator : operator_1 | operator joik_opt_ke free_seq operator_1 | operator joik_opt_ke operator_1 | operator jek_opt_ke free_seq operator_1 | operator jek_opt_ke operator_1 | operator joik_stag_ke ke_operator ; ke_operator : KE free_seq operator KEhE free_seq | KE free_seq operator KEhE | KE free_seq operator /* ET KEhE */ | KE operator KEhE free_seq | KE operator KEhE | KE operator /* ET KEhE */ ; /* operator-1<371> = operator-2 | guhek operator-1 gik operator-2 | operator-2 (jek | joik) [stag] BO # operator-1 */ operator_1 : operator_2 | guhek operator_1 gik operator_2 | operator_2 joik_jek_stag_bo operator_1 ; /* operator-2<372> = mex-operator | KE # operator /KEhE#/ */ operator_2 : mex_operator | KE free_seq operator KEhE free_seq | KE free_seq operator KEhE | KE free_seq operator /* ET KEhE */ | KE operator KEhE free_seq | KE operator KEhE | KE operator /* ET KEhE */ ; /* mex-operator<374> = SE # mex-operator | NAhE # mex-operator | MAhO # mex /TEhU#/ | NAhU # selbri /TEhU#/ | VUhU # */ mex_operator : SE free_seq mex_operator | SE mex_operator | NAhE free_seq mex_operator | NAhE mex_operator | MAhO free_seq mex TEhU free_seq | MAhO free_seq mex TEhU | MAhO free_seq mex /* ET TEhU */ | MAhO mex TEhU free_seq | MAhO mex TEhU | MAhO mex /* ET TEhU */ | NAhU free_seq selbri TEhU free_seq | NAhU free_seq selbri TEhU | NAhU free_seq selbri /* ET TEhU */ | NAhU selbri TEhU free_seq | NAhU selbri TEhU | NAhU selbri /* ET TEhU */ | VUhU free_seq | VUhU ; /* operand<381> = operand-1 [(ek | joik) [stag] KE # operand /KEhE#/] */ operand : operand_1 | operand_1 joik_ek_ke ke_operand ; ke_operand : KE free_seq operand KEhE free_seq | KE free_seq operand KEhE | KE free_seq operand /* ET KEhE */ | KE operand KEhE free_seq | KE operand KEhE | KE operand /* ET KEhE */ ; /* operand-1<382> = operand-2 [joik-ek operand-2] ... */ operand_1 : operand_2 | operand_1 joik free_seq operand_2 | operand_1 joik operand_2 | operand_1 jek free_seq operand_2 | operand_1 jek operand_2 ; /* operand-2<383> = operand-3 [(ek | joik) [stag] BO # operand-2] */ operand_2 : operand_3 | operand_3 joik_ek_stag_bo operand_2 ; /* operand-3<385> = quantifier | lerfu-string /BOI#/ | NIhE # selbri /TEhU#/ | MOhE # sumti /TEhU#/ | JOhI # mex-2 ... /TEhU#/ | gek operand gik operand-3 | (LAhE # | NAhE BO #) operand /LUhU#/ */ operand_3 : quantifier | lerfu_string BOI free_seq | lerfu_string BOI | lerfu_string /* ET BOI */ | NIhE free_seq selbri TEhU free_seq | NIhE free_seq selbri TEhU | NIhE free_seq selbri /* ET TEhU */ | NIhE selbri TEhU free_seq | NIhE selbri TEhU | NIhE selbri /* ET TEhU */ | MOhE free_seq sumti TEhU free_seq | MOhE free_seq sumti TEhU | MOhE free_seq sumti /* ET TEhU */ | MOhE sumti TEhU free_seq | MOhE sumti TEhU | MOhE sumti /* ET TEhU */ | JOhI free_seq mex_2_seq TEhU free_seq | JOhI free_seq mex_2_seq TEhU | JOhI free_seq mex_2_seq /* ET TEhU */ | JOhI mex_2_seq TEhU free_seq | JOhI mex_2_seq TEhU | JOhI mex_2_seq /* ET TEhU */ | gek operand gik operand_3 | LAhE free_seq operand LUhU free_seq | LAhE free_seq operand LUhU | LAhE free_seq operand /* ET LUhU */ | LAhE operand LUhU free_seq | LAhE operand LUhU | LAhE operand /* ET LUhU */ | PRIVATE_NAhE_BO NAhE BO free_seq operand LUhU free_seq | PRIVATE_NAhE_BO NAhE BO free_seq operand LUhU | PRIVATE_NAhE_BO NAhE BO free_seq operand /* ET LUhU */ | PRIVATE_NAhE_BO NAhE BO operand LUhU free_seq | PRIVATE_NAhE_BO NAhE BO operand LUhU | PRIVATE_NAhE_BO NAhE BO operand /* ET LUhU */ ; /* number<812> = PA [PA | lerfu-word] ... */ number : inner_number ; inner_number : PA | inner_number PA | inner_number lerfu_word ; /* lerfu-string<817> = lerfu-word [PA | lerfu-word] ... */ lerfu_string : lerfu_word | lerfu_string PA | lerfu_string lerfu_word ; /* lerfu-word<987> = BY | any-word BU | LAU lerfu-word | TEI lerfu-string FOI */ lerfu_word : BY | BU /* needs lexer tie-in */ | LAU lerfu_word | TEI lerfu_string FOI ; /* ek<802> = [NA] [SE] A [NAI] */ ek : PRIVATE_START_EK NA SE A NAI | PRIVATE_START_EK NA SE A | PRIVATE_START_EK NA A NAI | PRIVATE_START_EK NA A | PRIVATE_START_EK SE A NAI | PRIVATE_START_EK SE A | PRIVATE_START_EK A NAI | PRIVATE_START_EK A ; /* gihek<818> = [NA] [SE] GIhA [NAI] */ gihek : PRIVATE_START_GIHEK NA SE GIhA NAI | PRIVATE_START_GIHEK NA SE GIhA | PRIVATE_START_GIHEK NA GIhA NAI | PRIVATE_START_GIHEK NA GIhA | PRIVATE_START_GIHEK SE GIhA NAI | PRIVATE_START_GIHEK SE GIhA | PRIVATE_START_GIHEK GIhA NAI | PRIVATE_START_GIHEK GIhA ; /* jek<805> = [NA] [SE] JA [NAI] */ jek : PRIVATE_START_JEK NA SE JA NAI | PRIVATE_START_JEK NA SE JA | PRIVATE_START_JEK NA JA NAI | PRIVATE_START_JEK NA JA | PRIVATE_START_JEK SE JA NAI | PRIVATE_START_JEK SE JA | PRIVATE_START_JEK JA NAI | PRIVATE_START_JEK JA ; jek_opt_ke : PRIVATE_START_JEK NA SE JA NAI | PRIVATE_START_JEK NA SE JA | PRIVATE_START_JEK NA JA NAI | PRIVATE_START_JEK NA JA | PRIVATE_START_JEK SE JA NAI | PRIVATE_START_JEK SE JA | PRIVATE_START_JEK JA NAI | PRIVATE_START_JEK JA | PRIVATE_JEK_KE PRIVATE_START_JEK NA SE JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK NA SE JA | PRIVATE_JEK_KE PRIVATE_START_JEK NA JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK NA JA | PRIVATE_JEK_KE PRIVATE_START_JEK SE JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK SE JA | PRIVATE_JEK_KE PRIVATE_START_JEK JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK JA ; jek_opt_kebo : PRIVATE_START_JEK NA SE JA NAI | PRIVATE_START_JEK NA SE JA | PRIVATE_START_JEK NA JA NAI | PRIVATE_START_JEK NA JA | PRIVATE_START_JEK SE JA NAI | PRIVATE_START_JEK SE JA | PRIVATE_START_JEK JA NAI | PRIVATE_START_JEK JA | PRIVATE_JEK_KE PRIVATE_START_JEK NA SE JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK NA SE JA | PRIVATE_JEK_KE PRIVATE_START_JEK NA JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK NA JA | PRIVATE_JEK_KE PRIVATE_START_JEK SE JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK SE JA | PRIVATE_JEK_KE PRIVATE_START_JEK JA NAI | PRIVATE_JEK_KE PRIVATE_START_JEK JA | PRIVATE_JEK_BO PRIVATE_START_JEK NA SE JA NAI | PRIVATE_JEK_BO PRIVATE_START_JEK NA SE JA | PRIVATE_JEK_BO PRIVATE_START_JEK NA JA NAI | PRIVATE_JEK_BO PRIVATE_START_JEK NA JA | PRIVATE_JEK_BO PRIVATE_START_JEK SE JA NAI | PRIVATE_JEK_BO PRIVATE_START_JEK SE JA | PRIVATE_JEK_BO PRIVATE_START_JEK JA NAI | PRIVATE_JEK_BO PRIVATE_START_JEK JA ; /* joik<806> = [SE] JOI [NAI] | interval | GAhO interval GAhO */ joik : PRIVATE_START_JOIK SE JOI NAI | PRIVATE_START_JOIK SE JOI | PRIVATE_START_JOIK JOI NAI | PRIVATE_START_JOIK JOI | PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_START_JOIK SE BIhI | PRIVATE_START_JOIK BIhI NAI | PRIVATE_START_JOIK BIhI | PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_START_JOIK GAhO BIhI GAhO ; /* Used where we get a joik that can never be guarded by KE later, but where there might be a KE in the following construction, so we might introduce PRIVATE_JOIK_KE before */ joik_opt_ke : PRIVATE_START_JOIK SE JOI NAI | PRIVATE_START_JOIK SE JOI | PRIVATE_START_JOIK JOI NAI | PRIVATE_START_JOIK JOI | PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_START_JOIK SE BIhI | PRIVATE_START_JOIK BIhI NAI | PRIVATE_START_JOIK BIhI | PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_START_JOIK GAhO BIhI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE JOI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE JOI | PRIVATE_JOIK_KE PRIVATE_START_JOIK JOI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK JOI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE BIhI | PRIVATE_JOIK_KE PRIVATE_START_JOIK BIhI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK BIhI | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO BIhI GAhO ; joik_opt_kebo : PRIVATE_START_JOIK SE JOI NAI | PRIVATE_START_JOIK SE JOI | PRIVATE_START_JOIK JOI NAI | PRIVATE_START_JOIK JOI | PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_START_JOIK SE BIhI | PRIVATE_START_JOIK BIhI NAI | PRIVATE_START_JOIK BIhI | PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_START_JOIK GAhO BIhI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE JOI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE JOI | PRIVATE_JOIK_KE PRIVATE_START_JOIK JOI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK JOI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK SE BIhI | PRIVATE_JOIK_KE PRIVATE_START_JOIK BIhI NAI | PRIVATE_JOIK_KE PRIVATE_START_JOIK BIhI | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_JOIK_KE PRIVATE_START_JOIK GAhO BIhI GAhO | PRIVATE_JOIK_BO PRIVATE_START_JOIK SE JOI NAI | PRIVATE_JOIK_BO PRIVATE_START_JOIK SE JOI | PRIVATE_JOIK_BO PRIVATE_START_JOIK JOI NAI | PRIVATE_JOIK_BO PRIVATE_START_JOIK JOI | PRIVATE_JOIK_BO PRIVATE_START_JOIK SE BIhI NAI | PRIVATE_JOIK_BO PRIVATE_START_JOIK SE BIhI | PRIVATE_JOIK_BO PRIVATE_START_JOIK BIhI NAI | PRIVATE_JOIK_BO PRIVATE_START_JOIK BIhI | PRIVATE_JOIK_BO PRIVATE_START_JOIK GAhO SE BIhI NAI GAhO | PRIVATE_JOIK_BO PRIVATE_START_JOIK GAhO SE BIhI GAhO | PRIVATE_JOIK_BO PRIVATE_START_JOIK GAhO BIhI NAI GAhO | PRIVATE_JOIK_BO PRIVATE_START_JOIK GAhO BIhI GAhO ; /* interval<932> = [SE] BIhI [NAI] Inlined into joik and not used elsewhere */ /* joik-ek<421> = joik # | ek # joik-jek<422> = joik # | jek # The above are fully folded into other rules. */ /* gek<807> = [SE] GA [NAI] # | joik GI # | stag gik */ gek : PRIVATE_START_GEK SE GA NAI free_seq | PRIVATE_START_GEK SE GA NAI | PRIVATE_START_GEK SE GA free_seq | PRIVATE_START_GEK SE GA | PRIVATE_START_GEK GA NAI free_seq | PRIVATE_START_GEK GA NAI | PRIVATE_START_GEK GA free_seq | PRIVATE_START_GEK GA | PRIVATE_START_GEK joik GI free_seq | PRIVATE_START_GEK joik GI | stag gik ; /* guhek<808> = [SE] GUhA [NAI] # */ guhek : PRIVATE_START_GUHEK SE GUhA NAI free_seq | PRIVATE_START_GUHEK SE GUhA NAI | PRIVATE_START_GUHEK SE GUhA free_seq | PRIVATE_START_GUHEK SE GUhA | PRIVATE_START_GUHEK GUhA NAI free_seq | PRIVATE_START_GUHEK GUhA NAI | PRIVATE_START_GUHEK GUhA free_seq | PRIVATE_START_GUHEK GUhA ; /* gik<816> = GI [NAI] # */ gik : GI NAI free_seq | GI NAI | GI free_seq | GI ; /* tag<491> = tense-modal [joik-jek tense-modal] ... */ tag : ctag | stag ; ctag : complex_tense_modal | ctag joik_opt_kebo free_seq complex_tense_modal | ctag joik_opt_kebo complex_tense_modal | ctag jek_opt_kebo free_seq complex_tense_modal | ctag jek_opt_kebo complex_tense_modal | ctag joik_opt_kebo free_seq simple_tense_modal | ctag joik_opt_kebo simple_tense_modal | ctag jek_opt_kebo free_seq simple_tense_modal | ctag jek_opt_kebo simple_tense_modal | stag joik_opt_kebo free_seq complex_tense_modal | stag joik_opt_kebo complex_tense_modal | stag jek_opt_kebo free_seq complex_tense_modal | stag jek_opt_kebo complex_tense_modal ; complex_tense_modal : FIhO free_seq selbri FEhU free_seq | FIhO free_seq selbri FEhU | FIhO free_seq selbri /* ET FEhU */ | FIhO selbri FEhU free_seq | FIhO selbri FEhU | FIhO selbri /* ET FEhU */ | simple_tense_modal free_seq ; /* stag<971> = simple-tense-modal [(jek | joik) simple-tense-modal] ... */ stag : simple_tense_modal | stag jek_opt_kebo simple_tense_modal | stag joik_opt_kebo simple_tense_modal ; /* tense-modal<815> = simple-tense-modal # | FIhO # selbri /FEhU#/ */ /* simple-tense-modal<972> = [NAhE] [SE] BAI [NAI] [KI] | [NAhE] (time [space] | space [time]) & CAhA [KI] | KI | CUhE */ simple_tense_modal : PRIVATE_START_BAI NAhE se_bai NAI KI | PRIVATE_START_BAI NAhE se_bai NAI | PRIVATE_START_BAI NAhE se_bai KI | PRIVATE_START_BAI NAhE se_bai | PRIVATE_START_BAI NAhE bai1 NAI KI | PRIVATE_START_BAI NAhE bai1 NAI | PRIVATE_START_BAI NAhE bai1 KI | PRIVATE_START_BAI NAhE bai1 | PRIVATE_START_BAI se_bai NAI KI | PRIVATE_START_BAI se_bai NAI | PRIVATE_START_BAI se_bai KI | PRIVATE_START_BAI se_bai | PRIVATE_START_BAI bai1 NAI KI | PRIVATE_START_BAI bai1 NAI | PRIVATE_START_BAI bai1 KI | PRIVATE_START_BAI bai1 | PRIVATE_NAhE_time NAhE time space CAhA KI | PRIVATE_NAhE_time NAhE time space CAhA | PRIVATE_NAhE_time NAhE time space KI | PRIVATE_NAhE_time NAhE time space | PRIVATE_NAhE_time NAhE time CAhA KI | PRIVATE_NAhE_time NAhE time CAhA | PRIVATE_NAhE_time NAhE time KI | PRIVATE_NAhE_time NAhE time | time space CAhA KI | time space CAhA | time space KI | time space | time CAhA KI | time CAhA | time KI | time | PRIVATE_NAhE_space NAhE space time CAhA KI | PRIVATE_NAhE_space NAhE space time CAhA | PRIVATE_NAhE_space NAhE space time KI | PRIVATE_NAhE_space NAhE space time | PRIVATE_NAhE_space NAhE space CAhA KI | PRIVATE_NAhE_space NAhE space CAhA | PRIVATE_NAhE_space NAhE space KI | PRIVATE_NAhE_space NAhE space | space time CAhA KI | space time CAhA | space time KI | space time | space CAhA KI | space CAhA | space KI | space | CAhA KI | CAhA | PRIVATE_NAhE_CAhA NAhE CAhA KI | PRIVATE_NAhE_CAhA NAhE CAhA | KI | CUhE ; /* A special non-terminal to make it easy to recognize this in the post-processing */ se_bai : SE BAI ; bai1 : BAI ; /* time<1030> = ZI & time-offset ... & ZEhA [PU [NAI]] & interval-property ... */ time : ZI time_offset_seq zeha_pu_nai interval_property_seq | ZI time_offset_seq interval_property_seq | ZI time_offset_seq zeha_pu_nai | ZI time_offset_seq | ZI zeha_pu_nai interval_property_seq | ZI interval_property_seq | ZI zeha_pu_nai | ZI | time_offset_seq zeha_pu_nai interval_property_seq | time_offset_seq interval_property_seq | time_offset_seq zeha_pu_nai | time_offset_seq | zeha_pu_nai interval_property_seq | interval_property_seq | zeha_pu_nai ; zeha_pu_nai : ZEhA PU NAI | ZEhA PU | ZEhA ; /* time-offset<1033> = PU [NAI] [ZI] */ time_offset : PU NAI ZI | PU NAI | PU ZI | PU ; time_offset_seq : time_offset_seq time_offset | time_offset ; /* space<1040> = VA & space-offset ... & space-interval & (MOhI space-offset) */ space : VA space_offset_seq space_interval MOhI space_offset | VA space_offset_seq space_interval | VA space_offset_seq MOhI space_offset | VA space_offset_seq | VA space_interval MOhI space_offset | VA space_interval | VA MOhI space_offset | VA | space_offset_seq space_interval MOhI space_offset | space_offset_seq space_interval | space_offset_seq MOhI space_offset | space_offset_seq | space_interval MOhI space_offset | space_interval | MOhI space_offset ; /* space-offset<1045> = FAhA [NAI] [VA] */ space_offset : FAhA NAI VA | FAhA NAI | FAhA VA | FAhA ; space_offset_seq : space_offset_seq space_offset | space_offset ; /* space-interval<1046> = ((VEhA & VIhA) [FAhA [NAI]]) & space-int-props */ space_interval : VEhA VIhA FAhA NAI space_int_props | VEhA VIhA FAhA space_int_props | VEhA VIhA space_int_props | VEhA FAhA NAI space_int_props | VEhA FAhA space_int_props | VEhA space_int_props | VIhA FAhA NAI space_int_props | VIhA FAhA space_int_props | VIhA space_int_props | VEhA VIhA FAhA NAI | VEhA VIhA FAhA | VEhA VIhA | VEhA FAhA NAI | VEhA FAhA | VEhA | VIhA FAhA NAI | VIhA FAhA | VIhA | space_int_props ; /* space-int-props<1049> = (FEhE interval-property) ... */ space_int_props : space_int_props space_int_prop | space_int_prop ; space_int_prop : FEhE interval_property ; /* interval-property<1051> = number ROI [NAI] | TAhE [NAI] | ZAhO [NAI] */ interval_property : PRIVATE_NUMBER_ROI number ROI NAI | PRIVATE_NUMBER_ROI number ROI | TAhE NAI | TAhE | ZAhO NAI | ZAhO ; interval_property_seq : interval_property_seq interval_property | interval_property ; /* free<32> = SEI # [terms [CU #]] selbri /SEhU/ | SOI # sumti [sumti] /SEhU/ | vocative [relative-clauses] selbri [relative-clauses] /DOhU/ | vocative [relative-clauses] CMENE ... # [relative-clauses] /DOhU/ | vocative [sumti] /DOhU/ | (number | lerfu-string) MAI | TO text /TOI/ | XI # (number | lerfu-string) /BOI/ | XI # VEI # mex /VEhO/ */ free_seq : free_seq free | free ; free : metalinguistic | reciprocity | free_vocative | utterance_ordinal | parenthetical | subscript ; metalinguistic : SEI free_seq terms CU free_seq metalinguistic_main_selbri SEhU | SEI free_seq terms CU free_seq metalinguistic_main_selbri /* ET SEhU */ | SEI free_seq terms CU metalinguistic_main_selbri SEhU | SEI free_seq terms CU metalinguistic_main_selbri /* ET SEhU */ | SEI free_seq terms metalinguistic_main_selbri SEhU | SEI free_seq terms metalinguistic_main_selbri /* ET SEhU */ | SEI free_seq metalinguistic_main_selbri SEhU | SEI free_seq metalinguistic_main_selbri /* ET SEhU */ | SEI terms CU free_seq metalinguistic_main_selbri SEhU | SEI terms CU free_seq metalinguistic_main_selbri /* ET SEhU */ | SEI terms CU metalinguistic_main_selbri SEhU | SEI terms CU metalinguistic_main_selbri /* ET SEhU */ | SEI terms metalinguistic_main_selbri SEhU | SEI terms metalinguistic_main_selbri /* ET SEhU */ | SEI metalinguistic_main_selbri SEhU | SEI metalinguistic_main_selbri /* ET SEhU */ ; metalinguistic_main_selbri : selbri ; reciprocity : SOI free_seq sumti sumti SEhU | SOI free_seq sumti sumti /* ET SEhU */ | SOI free_seq sumti SEhU | SOI free_seq sumti /* ET SEhU */ | SOI sumti sumti SEhU | SOI sumti sumti /* ET SEhU */ | SOI sumti SEhU | SOI sumti /* ET SEhU */ ; free_vocative : vocative relative_clauses selbri relative_clauses DOhU | vocative relative_clauses selbri relative_clauses /* ET DOhU */ | vocative relative_clauses selbri DOhU | vocative relative_clauses selbri /* ET DOhU */ | vocative selbri relative_clauses DOhU | vocative selbri relative_clauses /* ET DOhU */ | vocative selbri DOhU | vocative selbri /* ET DOhU */ | vocative relative_clauses CMENE_seq free_seq relative_clauses DOhU | vocative relative_clauses CMENE_seq free_seq relative_clauses /* ET DOhU */ | vocative relative_clauses CMENE_seq free_seq DOhU | vocative relative_clauses CMENE_seq free_seq /* ET DOhU */ | vocative CMENE_seq free_seq relative_clauses DOhU | vocative CMENE_seq free_seq relative_clauses /* ET DOhU */ | vocative CMENE_seq free_seq DOhU | vocative CMENE_seq free_seq /* ET DOhU */ | vocative relative_clauses CMENE_seq relative_clauses DOhU | vocative relative_clauses CMENE_seq relative_clauses /* ET DOhU */ | vocative relative_clauses CMENE_seq DOhU | vocative relative_clauses CMENE_seq /* ET DOhU */ | vocative CMENE_seq relative_clauses DOhU | vocative CMENE_seq relative_clauses /* ET DOhU */ | vocative CMENE_seq DOhU | vocative CMENE_seq /* ET DOhU */ | vocative sumti DOhU | vocative sumti /* ET DOhU */ | vocative DOhU | vocative /* ET DOhU */ ; utterance_ordinal : PRIVATE_NUMBER_MAI number MAI | PRIVATE_NUMBER_MAI lerfu_string MAI ; parenthetical : TO text TOI | TO text /* ET TOI */ ; subscript : XI free_seq number BOI | XI free_seq number /* ET BOI */ | XI number BOI | XI number /* ET BOI */ | XI free_seq lerfu_string BOI | XI free_seq lerfu_string /* ET BOI */ | XI lerfu_string BOI | XI lerfu_string /* ET BOI */ | XI free_seq VEI free_seq mex VEhO | XI free_seq VEI free_seq mex /* ET VEhO */ | XI free_seq VEI mex VEhO | XI free_seq VEI mex /* ET VEhO */ | XI VEI free_seq mex VEhO | XI VEI free_seq mex /* ET VEhO */ | XI VEI mex VEhO | XI VEI mex /* ET VEhO */ ; /* vocative<415> = (COI [NAI]) ... & DOI */ vocative : coi_nai_seq DOI | coi_nai_seq | DOI ; coi_nai_seq : COI NAI | COI | coi_nai_seq COI NAI | coi_nai_seq COI ; /* indicators<411> = [FUhE] indicator ... */ indicators : FUhE indicator_seq | indicator_seq ; indicator_seq : indicator_seq indicator | indicator ; /* indicator<413> = (UI | CAI) [NAI] | Y | DAhO | FUhO */ indicator : UI NAI | UI | CAI NAI | CAI | Y | DAhO | FUhO ; NAI_seq : NAI_seq NAI | NAI ; CMENE_seq : CMENE_seq CMENE | CMENE ; NIhO_seq_free_seq : NIhO_seq free_seq | NIhO_seq ; NIhO_seq : NIhO_seq NIhO | NIhO ; jbofihe-0.38/smujajgau.c100644 765 764 34774 7350750742 14304 0ustar richardruser/* $Header: /cvs/src/jbofihe/smujajgau.c,v 1.6 2000/10/14 22:09:42 richard Exp $ Program for reading plaintext dictionaries in the form lojban:english:comment or just lojban:english and compiling them into a sorted database. If the lojban is of the form X1 (i.e. ends in a digit), the entries X1n, X1v, X1a and X1t are deleted; they may be redefined by a later entry in the source dictionary. This is a total rewrite of the original gdbm based dictionary scheme. This uses a locally defined file format (removing the need for gdbm library to be available), and compiles the whole dictionary in-core before writing it out. This is many times faster because there aren't any random access disc accesses that gdbm generates. However, the core image could be quite significant for a big dictionary. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "version.h" #define new_string(s) ((s) ? strcpy((char *) malloc(1+strlen(s)), (s)) : NULL) #define new(T) (T *) malloc(sizeof(T)) #define new_array(T, n) (T *) malloc(sizeof(T) * (n)) typedef enum { DEFINE, ERASE } Action; /*+ Structure describing each 'transaction' to apply to build the final dictionary. This allows the same word to be redefined several times in successive input files, with the latest definition taking precedence. +*/ typedef struct { Action action; char *key; /* The key to lookup */ char *val; /* The result of the lookup (invalid for ERASE) */ int ord; /* The ordinal position of this transaction in the complete sequence, used to resolve which comes first if several definitions for a single word over-ride one another. */ } Trans; typedef struct Link { struct Link *next; Trans *trans; } Link; static Link *links = NULL; /*+ Number of transactions on the list or in the array +*/ static int transord = 0; /*+ Array of transactions, built up from the 'links' singly linked list +*/ static Trans **transac; #define MKL 256 static int wordlens[MKL]; extern char *canon_lujvo(char *); /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void clear_histogram(void) { int i; for (i=0; iaction = DEFINE; new_trans->key = new_string(key); new_trans->val = new_string(val); new_trans->ord = transord++; new_link->next = links; new_link->trans = new_trans; links = new_link; } /*++++++++++++++++++++++++++++++++++++++ Add a deletion of a word to the transaction list. char *key ++++++++++++++++++++++++++++++++++++++*/ static void add_deletion(char *key) { Trans *new_trans; Link *new_link; new_trans = new(Trans); new_link = new(Link); new_trans->action = ERASE; new_trans->key = new_string(key); new_trans->val = NULL; new_trans->ord = transord++; new_link->next = links; new_link->trans = new_trans; links = new_link; } /*++++++++++++++++++++++++++++++++++++++ Turn the linked list into an array, required for sorting. ++++++++++++++++++++++++++++++++++++++*/ static void build_array(void) { int i; Link *x; transac = new_array(Trans *, transord); for (x=links, i=transord-1; i>=0; x=x->next, i--) { transac[i] = x->trans; } } /*++++++++++++++++++++++++++++++++++++++ Comparison function for sorting. Sort first by the key field, then by the ordinal. So if a key occurs twice, do the correct order of over-riding the definitions. static int sort_comparison ++++++++++++++++++++++++++++++++++++++*/ static int sort_comparison(const void *a, const void *b) { const Trans **aa = (const Trans **) a; const Trans **bb = (const Trans **) b; int sc; int ao, bo; sc = strcmp((*aa)->key, (*bb)->key); if (sc) { return sc; } else { ao = (*aa)->ord; bo = (*bb)->ord; if (ao > bo) { return 1; } else if (ao < bo) { return -1; } else { return 0; } } } /*++++++++++++++++++++++++++++++++++++++ Sort the transaction array into order. ++++++++++++++++++++++++++++++++++++++*/ static void sort_array(void) { qsort(transac, transord, sizeof(Trans *), sort_comparison); } /*++++++++++++++++++++++++++++++++++++++ Work down through the array. For each key value, preserve only the final definition, if any. Mark all over-ridden definitions and erasures with the ERASE action. ++++++++++++++++++++++++++++++++++++++*/ static void rationalise_transactions(void) { int top, bot; /* indices spanning a particular key, inclusive */ int i; top = transord - 1; while (top >= 0) { bot = top - 1; while ((bot >= 0) && (!strcmp(transac[bot]->key, transac[top]->key))) { bot--; } bot++; if (transac[top]->action == ERASE) { /* delete the definition altogether */ for (i=bot; i<=top; i++) { transac[i]->action = ERASE; } } else { /* Keep final definition */ for (i=bot; iaction = ERASE; } } top = bot - 1; } } /*++++++++++++++++++++++++++++++++++++++ Squash all erasures and over-ridden definitions out of the list. ++++++++++++++++++++++++++++++++++++++*/ static void compress_transactions(void) { int i, j; i = j = 0; while (j < transord) { if (transac[j]->action == DEFINE) { transac[i++] = transac[j]; } j++; } transord = i; } /*++++++++++++++++++++++++++++++++++++++ Write a 'long' integer to file avoiding endianness problems. FILE *out unsigned long val ++++++++++++++++++++++++++++++++++++++*/ static void put_long(FILE *out, unsigned long val) { unsigned long a, b, c, d; /* Avoid endian-ness problem if we were to use fwrite */ a = (val >> 24) & 0xff; b = (val >> 16) & 0xff; c = (val >> 8) & 0xff; d = (val >> 0) & 0xff; putc(a, out); putc(b, out); putc(c, out); putc(d, out); } /*++++++++++++++++++++++++++++++++++++++ Read a 'long' integer from file avoiding endianness problems. static unsigned long get_long FILE *in ++++++++++++++++++++++++++++++++++++++*/ static unsigned long get_long(FILE *in) { unsigned long a, b, c, d; /* Avoid endian-ness problem if we were to use fwrite */ a = getc(in); b = getc(in); c = getc(in); d = getc(in); return (a << 24) | (b << 16) | (c << 8) | (d << 0); } /*++++++++++++++++++++++++++++++++++++++ Write a single byte integer to file, range checking the operand. FILE *out unsigned long val ++++++++++++++++++++++++++++++++++++++*/ inline static void put_char(FILE *out, unsigned long val) { if (val > 255) { fprintf(stderr, "Tried to write a value that was too big\n"); } putc(val&0xff, out); } /*++++++++++++++++++++++++++++++++++++++ Write the entire dictionary to file FILE *out ++++++++++++++++++++++++++++++++++++++*/ static void write_database(FILE *out) { int i, len; Trans *t; put_long(out, transord); for (i=0; ikey); ++wordlens[len]; put_char(out, len); len = strlen(t->val); ++wordlens[len]; put_char(out, len); } for (i=0; ikey, sizeof(char), 1 + strlen(t->key), out); fwrite(t->val, sizeof(char), 1 + strlen(t->val), out); } } /*++++++++++++++++++++++++++++++++++++++ Read the database to build the transaction list. FILE *in ++++++++++++++++++++++++++++++++++++++*/ static void read_database(FILE *in) { typedef struct { int klen; int vlen; } Entry; int n_entries; Entry *entries; int i, len; char key[1024], val[1024]; n_entries = get_long(in); entries = new_array(Entry, n_entries); for (i=0; ienglish pair. If the lojban ends with a digit, call preen to get rid of any more specific definitions for noun, verb etc variants. Try lujvo canonicalisation on the word and define the 'canonical' form too. char *src char *dest ++++++++++++++++++++++++++++++++++++++*/ static void handle_mapping(char *src, char *dest) { int len = strlen(src); int defines_place = isdigit(src[len-1]); int specific = isdigit(src[len-2]); char buffer[1024], buffer2[1024], buffer3[1024]; char *canon; /* If we're about to add a case of something, check we get rid of any more specific entries first. */ if (defines_place) { preen(src); } add_defn(src, dest); #if defined (DIAG) fprintf(stderr, "Adding defn 1 key=[%s] val=[%s]\n", src, dest); #endif /* If we're adding a lujvo, add the definition against its 'canonical' form too. e.g. if we're defining soirsai:rations add an entry equivalent to sonci+sanmi:rations For soirsai1:rations, add sonci+sanmi1:@soirsai1 For soirsai1n:rations, don't do anything since it's assumed that soirsai1 is defined too and the mapping this adds for the canonical form will be enough to redirect lookups in the translator to pick up this specific mapping. */ if (isalpha(src[0])) { char *p = src; int baselen; /* Work out length of basic lujvo/gismu etc */ while (isalpha(*p)) p++; baselen = p - src; if ((baselen >= 6) && defines_place) { strncpy(buffer, src, baselen); buffer[baselen] = 0; canon = canon_lujvo(buffer); if (canon) { int lencanon = strlen(canon); strcpy(buffer2, canon); buffer2[lencanon++] = src[len-1]; buffer2[lencanon] = 0; preen(buffer2); strcpy(buffer3, "@"); strcat(buffer3, src); add_defn(buffer2, buffer3); #if defined (DIAG) fprintf(stderr, "Adding defn 2 key=[%s] val=[%s]\n", buffer2, buffer3); #endif } } } } /*++++++++++++++++++++++++++++++++++++++ Handle one input file FILE *f ++++++++++++++++++++++++++++++++++++++*/ static void do_file(FILE *f) { char line[2048]; char src[1024]; char dest[1024]; char *p, *q, *r; while (fgets(line, sizeof(line), f)) { line[strlen(line)-1] = 0; p = line; while (*p && isspace(*p)) p++; if (!*p) { /* Line is blank */ continue; } if (strchr("#!;", *p)) { /* line is a comment */ continue; } q = src; while (*p && *p!=':') { *q++ = *p++; } if (!*p) { fprintf(stderr, "Line [%s] does not contain a colon\n", line); } else { *q = 0; p++; r = dest; while (*p && *p!=':') { *r++ = *p++; } *r = 0; handle_mapping(src, dest); } } } /*++++++++++++++++++++++++++++++++++++++ The main routine int main int argc char **argv ++++++++++++++++++++++++++++++++++++++*/ int main (int argc, char **argv) { char *dbname; FILE *in, *out; clear_histogram(); if ((argc > 1) && (!strcmp(argv[1], "-v"))) { fprintf(stderr, "jvocuhadju version %s\n", version_string); exit(0); } if (argc < 3) { fprintf(stderr, "Usage : %s ... \n", argv[0]); exit(1); } dbname = argv[1]; argv += 2; /* Try to read input database */ in = fopen(dbname, "rb"); if (in) { fprintf(stderr, "Reading existing database ...\n"); read_database(in); fclose(in); } else { /* Doesn't exist, benign */ } /* Run through input files, generating the transaction list. */ if (*argv) { while (*argv) { fprintf(stderr, "Reading file %s ... \n", *argv); in = fopen(*argv, "rb"); if (!in) { fprintf(stderr, "Could not open %s\n", *argv); } else { do_file(in); fclose(in); } ++argv; } } else { do_file(stdin); } /* Go through processing steps */ fprintf(stderr, "Building transaction array from list ...\n"); build_array(); fprintf(stderr, "Sorting transaction array ...\n"); sort_array(); fprintf(stderr, "Crunching transaction array ...\n"); rationalise_transactions(); compress_transactions(); fprintf(stderr, "Write database ...\n"); out = fopen(dbname, "wb"); if (!out) { fprintf(stderr, "Cannot open database file to write to\n"); exit(1); } write_database(out); fclose(out); if (0) { print_histogram(); } return 0; } jbofihe-0.38/textblk.c100644 765 764 22136 7350750743 13761 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/textblk.c,v 1.5 2001/05/28 21:30:15 richard Exp $ Driver for producing plain text output, using blocks rather than free-flow. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" #include "output.h" #define MAX_WIDTH 120 extern int opt_output_width; /* Defined in main.c */ static int max_width = MAX_WIDTH; #define BUFFER_SIZE 512 typedef enum { ST_OPEN, ST_TEXT, ST_CLOSE, ST_START } States; static States state; /* Largest number of tags supported on a single sumti */ #define MAX_TAGS 32 /* Variables to hold block being built */ static int tags_used; static char tag_text[MAX_TAGS][BUFFER_SIZE]; static char loj_text[BUFFER_SIZE]; static char eng_text[BUFFER_SIZE]; /* Variables to hold line being constructed */ static int current_width; /* The width of the line buffer currently occupied */ static char tag_line[MAX_TAGS][BUFFER_SIZE]; static int line_tags_used; static char loj_line[BUFFER_SIZE]; static char eng_line[BUFFER_SIZE]; static void clear_line_buffer(void)/*{{{*/ { int i; for (i=0; i 0) { flush_line(); if (pending_eols > 1) { printf("\n------------------------------------------------------------\n"); } else { printf("\n"); } state = ST_OPEN; pending_eols = 0; } }/*}}}*/ static void append_to_width(char *src, char *dbuf, int wid)/*{{{*/ /* Append a string onto a buffer, and right pad with spaces to bring up to a specific width */ { int len, toadd, i; char buffer[BUFFER_SIZE]; len = strlen(src); toadd = wid - len; for (i=0; i max_len) max_len = len; len = strlen(eng_text); if (len > max_len) max_len = len; for (i=0; i max_len) max_len = len; } if (max_len + current_width > max_width) { flush_line(); } append_to_width(loj_text, loj_line, max_len); append_to_width(eng_text, eng_line, max_len); for (i=0; i= line_tags_used) { append_to_width("", tag_line[i], current_width); } append_to_width(tag_text[i], tag_line[i], max_len); } /* Space-pad the tag lines on words that don't generate enough tags. */ for (i=tags_used; i line_tags_used) line_tags_used = tags_used; /* Clear the block buffers for the next lot */ for (i=0; i 0) { flush_block(); } clear_eols(); brac = brac1 = brac2 = brac3 = NULL; switch (type) { case BR_NONE: brac = NULL; break; case BR_ROUND: brac = "("; break; case BR_SQUARE: brac = "["; break; case BR_BRACE: brac = "{"; break; case BR_ANGLE: brac = "<"; break; case BR_CEIL: brac1 = " /"; brac2 = "|"; brac3 = "|"; break; case BR_FLOOR: brac1 = "|"; brac2 = "|"; brac3 = " \\"; break; case BR_TRIANGLE: brac = "<<"; break; } if (brac) { sprintf(loj_text, "%s ", brac); sprintf(eng_text, "%s ", brac); sprintf(tag_text[0], "%s ", brac); sprintf(tag_text[1], "%d ", subscript); tags_used = 2; } else if (brac1) { sprintf(loj_text, "%s ", brac1); sprintf(eng_text, "%s ", brac2); sprintf(tag_text[0], "%s ", brac3); sprintf(tag_text[1], "%d ", subscript); tags_used = 2; } state = ST_OPEN; } /*}}}*/ static void write_close_bracket(BracketType type, int subscript)/*{{{*/ { char *brac; char *brac1, *brac2, *brac3; if (type == BR_NONE) return; if (loj_text[0] || eng_text[0]) { flush_block(); } brac = brac1 = brac2 = brac3 = NULL; switch (type) { case BR_NONE: brac = NULL; break; case BR_ROUND: brac = ")"; break; case BR_SQUARE: brac = "]"; break; case BR_BRACE: brac = "}"; break; case BR_ANGLE: brac = ">"; break; case BR_CEIL: brac1 = "\\"; brac2 = " |"; brac3 = " |"; break; case BR_FLOOR: brac1 = " |"; brac2 = " |"; brac3 = "/"; break; case BR_TRIANGLE: brac = ">>"; break; } if (brac) { sprintf(loj_text, "%s ", brac); sprintf(eng_text, "%s ", brac); sprintf(tag_text[0], "%s ", brac); sprintf(tag_text[1], "%d ", subscript); tags_used = 2; } else if (brac1) { sprintf(loj_text, "%s ", brac1); sprintf(eng_text, "%s ", brac2); sprintf(tag_text[0], "%s ", brac3); sprintf(tag_text[1], "%d ", subscript); tags_used = 2; } state = ST_CLOSE; }/*}}}*/ static void write_lojban_text(char *text)/*{{{*/ { if (eng_text[0]) { flush_block(); } clear_eols(); strcat(loj_text, text); strcat(loj_text, " "); }/*}}}*/ static void write_special(char *text)/*{{{*/ { if (!strcmp(text, "$LEFTARROW")) { strcat(eng_text, "<-"); } else if (!strcmp(text, "$OPENQUOTE")) { strcat(eng_text, "\""); } else if (!strcmp(text, "$CLOSEQUOTE")) { strcat(eng_text,"\""); } }/*}}}*/ static void write_translation(char *text)/*{{{*/ { if (text[0] == '$') { write_special(text); } else { strcat(eng_text, text); strcat(eng_text, " "); } } /*}}}*/ /*+ +*/ static int first_tag; static void start_tags(void)/*{{{*/ { if (loj_text[0] || eng_text[0]) { flush_block(); } clear_eols(); first_tag = 1; }/*}}}*/ static void end_tags(void)/*{{{*/ { tags_used++; }/*}}}*/ static void start_tag(void)/*{{{*/ { if (!first_tag) { tags_used++; } first_tag = 0; } /*}}}*/ static void write_tag_text(char *brivla, char *place, char *trans, int brac)/*{{{*/ { char buffer1[256], buffer2[256]; sprintf(buffer1, "%s%s ", brivla, place); if (brac) { sprintf(buffer2, "(%s) ", trans); } else { sprintf(buffer2, "%s ", trans); } strcat(tag_text[tags_used], buffer1); strcat(tag_text[tags_used], buffer2); } /*}}}*/ static void write_partial_tag_text(char *t)/*{{{*/ { strcat(tag_text[tags_used], t); } /*}}}*/ DriverVector text_block_driver = /*{{{*/ { initialise, write_prologue, write_epilog, write_open_bracket, write_close_bracket, set_eols, write_lojban_text, write_translation, start_tags, end_tags, start_tag, write_tag_text, write_partial_tag_text };/*}}}*/ jbofihe-0.38/stag.y100644 765 764 24320 7350750742 13264 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/stag.y,v 1.3 1999/08/05 22:15:51 richard Exp $ Small bison grammar used to recognize a followed by KE or BO. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ %token JUST_STAG /* try to match (or an empty string then KE or BO) on its own */ %token JOIK_STAG /* try to match */ %token JJ_STAG /* try to match maybe with or before, or not */ %token STAG_BAI %token STAG_BIhI %token STAG_BU %token STAG_BY %token STAG_CAhA %token STAG_CUhE %token STAG_FAhA %token STAG_FEhE %token STAG_FOI %token STAG_GAhO %token STAG_JA %token STAG_JOI %token STAG_LAU %token STAG_KI %token STAG_MOhI %token STAG_NA %token STAG_NAhE %token STAG_NAI %token STAG_PA %token STAG_PU %token STAG_ROI %token STAG_SE %token STAG_TAhE %token STAG_TEI %token STAG_VA %token STAG_VEhA %token STAG_VIhA %token STAG_ZAhO %token STAG_ZEhA %token STAG_ZI %token STAG_KE %token STAG_BO /* This is the bogus token if we fall off the end of without finding BO or KE, i.e. find something else */ %token STAG_OTHER %{ extern void stag_lookahead_bo(void); extern void stag_lookahead_ke(void); extern void stag_error(const char *); extern int stag_lex(void); %} %% all : JUST_STAG just_stag | JUST_STAG empty_stag | JOIK_STAG joik_stag | JOIK_STAG joik empty_stag | JJ_STAG jj_stag | JJ_STAG jek empty_stag | JJ_STAG joik empty_stag | JJ_STAG empty_stag ; just_stag : stag_ke | stag_bo ; empty_stag : STAG_KE { stag_lookahead_ke(); } | STAG_BO { stag_lookahead_bo(); } ; joik_stag : joik stag_ke | joik stag_bo ; jj_stag : joik stag_ke | joik stag_bo | jek stag_ke | jek stag_bo | stag_ke | stag_bo ; stag_ke : stag STAG_KE { stag_lookahead_ke(); } ; stag_bo : stag STAG_BO { stag_lookahead_bo(); } ; stag : simple_tense_modal | stag jek simple_tense_modal | stag joik simple_tense_modal ; joik : STAG_SE STAG_JOI STAG_NAI | STAG_SE STAG_JOI | STAG_JOI STAG_NAI | STAG_JOI | STAG_SE STAG_BIhI STAG_NAI | STAG_SE STAG_BIhI | STAG_BIhI STAG_NAI | STAG_BIhI | STAG_GAhO STAG_SE STAG_BIhI STAG_NAI STAG_GAhO | STAG_GAhO STAG_SE STAG_BIhI STAG_GAhO | STAG_GAhO STAG_BIhI STAG_NAI STAG_GAhO | STAG_GAhO STAG_BIhI STAG_GAhO ; jek : STAG_NA STAG_SE STAG_JA STAG_NAI | STAG_NA STAG_SE STAG_JA | STAG_NA STAG_JA STAG_NAI | STAG_NA STAG_JA | STAG_SE STAG_JA STAG_NAI | STAG_SE STAG_JA | STAG_JA STAG_NAI | STAG_JA ; simple_tense_modal : STAG_NAhE se_bai STAG_NAI STAG_KI | STAG_NAhE se_bai STAG_NAI | STAG_NAhE se_bai STAG_KI | STAG_NAhE se_bai | STAG_NAhE STAG_BAI STAG_NAI STAG_KI | STAG_NAhE STAG_BAI STAG_NAI | STAG_NAhE STAG_BAI STAG_KI | STAG_NAhE STAG_BAI | se_bai STAG_NAI STAG_KI | se_bai STAG_NAI | se_bai STAG_KI | se_bai | STAG_BAI STAG_NAI STAG_KI | STAG_BAI STAG_NAI | STAG_BAI STAG_KI | STAG_BAI | STAG_NAhE time space STAG_CAhA STAG_KI | STAG_NAhE time space STAG_CAhA | STAG_NAhE time space STAG_KI | STAG_NAhE time space | STAG_NAhE time STAG_CAhA STAG_KI | STAG_NAhE time STAG_CAhA | STAG_NAhE time STAG_KI | STAG_NAhE time | time space STAG_CAhA STAG_KI | time space STAG_CAhA | time space STAG_KI | time space | time STAG_CAhA STAG_KI | time STAG_CAhA | time STAG_KI | time | STAG_NAhE space time STAG_CAhA STAG_KI | STAG_NAhE space time STAG_CAhA | STAG_NAhE space time STAG_KI | STAG_NAhE space time | STAG_NAhE space STAG_CAhA STAG_KI | STAG_NAhE space STAG_CAhA | STAG_NAhE space STAG_KI | STAG_NAhE space | space time STAG_CAhA STAG_KI | space time STAG_CAhA | space time STAG_KI | space time | space STAG_CAhA STAG_KI | space STAG_CAhA | space STAG_KI | space | STAG_CAhA STAG_KI | STAG_CAhA | STAG_KI | STAG_CUhE ; se_bai : STAG_SE STAG_BAI ; time : STAG_ZI time_offset_seq zeha_pu_nai interval_property_seq | STAG_ZI time_offset_seq interval_property_seq | STAG_ZI time_offset_seq zeha_pu_nai | STAG_ZI time_offset_seq | STAG_ZI zeha_pu_nai interval_property_seq | STAG_ZI interval_property_seq | STAG_ZI zeha_pu_nai | STAG_ZI | time_offset_seq zeha_pu_nai interval_property_seq | time_offset_seq interval_property_seq | time_offset_seq zeha_pu_nai | time_offset_seq | zeha_pu_nai interval_property_seq | interval_property_seq | zeha_pu_nai ; zeha_pu_nai : STAG_ZEhA STAG_PU STAG_NAI | STAG_ZEhA STAG_PU | STAG_ZEhA ; time_offset : STAG_PU STAG_NAI STAG_ZI | STAG_PU STAG_NAI | STAG_PU STAG_ZI | STAG_PU ; time_offset_seq : time_offset_seq time_offset | time_offset ; space : STAG_VA space_offset_seq space_interval STAG_MOhI space_offset | STAG_VA space_offset_seq space_interval | STAG_VA space_offset_seq STAG_MOhI space_offset | STAG_VA space_offset_seq | STAG_VA space_interval STAG_MOhI space_offset | STAG_VA space_interval | STAG_VA STAG_MOhI space_offset | STAG_VA | space_offset_seq space_interval STAG_MOhI space_offset | space_offset_seq space_interval | space_offset_seq STAG_MOhI space_offset | space_offset_seq | space_interval STAG_MOhI space_offset | space_interval | STAG_MOhI space_offset ; space_offset : STAG_FAhA STAG_NAI STAG_VA | STAG_FAhA STAG_NAI | STAG_FAhA STAG_VA | STAG_FAhA ; space_offset_seq : space_offset_seq space_offset | space_offset ; space_interval : STAG_VEhA STAG_VIhA STAG_FAhA STAG_NAI space_int_props | STAG_VEhA STAG_VIhA STAG_FAhA space_int_props | STAG_VEhA STAG_VIhA space_int_props | STAG_VEhA STAG_FAhA STAG_NAI space_int_props | STAG_VEhA STAG_FAhA space_int_props | STAG_VEhA space_int_props | STAG_VIhA STAG_FAhA STAG_NAI space_int_props | STAG_VIhA STAG_FAhA space_int_props | STAG_VIhA space_int_props | STAG_VEhA STAG_VIhA STAG_FAhA STAG_NAI | STAG_VEhA STAG_VIhA STAG_FAhA | STAG_VEhA STAG_VIhA | STAG_VEhA STAG_FAhA STAG_NAI | STAG_VEhA STAG_FAhA | STAG_VEhA | STAG_VIhA STAG_FAhA STAG_NAI | STAG_VIhA STAG_FAhA | STAG_VIhA | space_int_props ; space_int_props : space_int_props STAG_FEhE interval_property | STAG_FEhE interval_property ; interval_property : number STAG_ROI STAG_NAI | number STAG_ROI | STAG_TAhE STAG_NAI | STAG_TAhE | STAG_ZAhO STAG_NAI | STAG_ZAhO ; interval_property_seq : interval_property_seq interval_property | interval_property ; number : STAG_PA | number STAG_PA | number lerfu_word ; lerfu_string : lerfu_word | lerfu_string STAG_PA | lerfu_string lerfu_word ; lerfu_word : STAG_BY | STAG_BU /* needs lexer tie-in */ | STAG_LAU lerfu_word | STAG_TEI lerfu_string STAG_FOI ; jbofihe-0.38/tenses.c100644 765 764 11655 7350750742 13610 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/tenses.c,v 1.6 2000/10/14 06:58:10 richard Exp $ Processing to do with tense tokens, e.g. working out how to gloss them depending on the context where they arise. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ /* Processing to do clever things with how tenses are glossed */ #include #include #include #include #include "rpc_tab.h" #include "nonterm.h" #include "functions.h" /*++++++++++++++++++++++++++++++++++++++ TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void check_tense_context(TreeNode *x) { TreeNode *parent; struct nonterm *nt; XTenseCtx *tc; parent = x->parent; for (;;) { /* Already know parent is non-terminal!! */ nt = & parent->data.nonterm; /* In all cases, we will need to traverse upwards until we come out of or , since they don't tell us anything useful. */ switch (nt->type) { case TERM_TAGGED_SUMTI: case TAGGED_TERMSET: tc = prop_tense_ctx(x, YES); tc->ctx = TSC_TERM; goto done; break; case TEXT_1C: case I_JJ_STAG_BO: case GIHEK_STAG_KE: case GIHEK_STAG_BO: case JOIK_EK_KE: case JOIK_EK_STAG_BO: case JOIK_STAG_KE: case JOIK_JEK_STAG_BO: tc = prop_tense_ctx(x, YES); tc->ctx = TSC_LINK; goto done; break; case SUMTI_5B: case SUMTI_TAIL_1: tc = prop_tense_ctx(x, YES); tc->ctx = TSC_NOUN; goto done; break; case STATEMENT_3: case TERM_FLOATING_TENSE: case GEK_SENTENCE: case MAIN_SELBRI: case METALINGUISTIC_MAIN_SELBRI: /* It's no use just looking for , because that happens in a sumti context as well. */ tc = prop_tense_ctx(x, YES); tc->ctx = TSC_SELBRI; goto done; break; case JAI_TAG_TU2: tc = prop_tense_ctx(x, YES); tc->ctx = TSC_JAITAG; goto done; break; case MEX_OPERATOR: /* Via NAhU selbri */ goto done; break; case OPERAND_3: /* Via NIhE selbri */ goto done; break; case COMPLEX_TENSE_MODAL: /* Via FIhO selbri */ goto done; break; case FREE: goto done; break; case GEK: /* This is the case where we have something like 'ca gi X gi Y' which can be treated like 'X icabo Y'. */ tc = prop_tense_ctx(x, YES); tc->ctx = TSC_CONNECT; goto done; break; case CHUNKS: fprintf(stderr, "Selma'o PU token at line %d column %d lies in unhandled context\n", x->start_line, x->start_column); abort(); /* oops, we've got all the way out to the top of the parse tree. */ goto done; break; default: break; } parent = parent->parent; } done: return; } /*++++++++++++++++++++++++++++++++++++++ Scan for each node in selma'o PU. Backtrack up the tree to find out the context where it occurs. TreeNode *x ++++++++++++++++++++++++++++++++++++++*/ static void scan_tenses(TreeNode *x) { struct nonterm *nt; int nc, i; TreeNode *c; if (x->type == N_NONTERM) { nt = & x->data.nonterm; switch (nt->type) { case TIME_OFFSET: case SPACE_INT_PROP: case INTERVAL_PROPERTY: check_tense_context(x); break; default: break; } nc = nt->nchildren; for (i=0; ichildren[i]; scan_tenses(c); } } else { if (x->type == N_CMAVO) { switch (x->data.cmavo.selmao) { case ZAhO: case VA: case FAhA: case BAI: case PU: check_tense_context(x); break; default: break; } } } } /*++++++++++++++++++++++++++++++++++++++ Top level of tense handling, exported to rest of software TreeNode *top ++++++++++++++++++++++++++++++++++++++*/ void tense_processing(TreeNode *top) { scan_tenses(top); } jbofihe-0.38/terminator.pl100644 765 764 2277 7350750742 14644 0ustar richardruser# $Header: /cvs/src/jbofihe/terminator.pl,v 1.3 2000/12/30 23:21:52 richard Exp $ # # Remove rules from the grammar that have elidable terminators elided. # The resulting grammar can be run through bison to see how many # shift/reduce conflicts remain. # # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # while (<>) { print; last if (/^\%\%$/); } while (<>) { s,/\* SG \*/,START_GEK,; print unless (m~/\* ET [A-Za-z]+~); if (m~/\* ET ~ && !m~/\* ET [A-Za-z]+~) { chomp; print STDERR "Line with odd ET construction [$_]\n"; } } jbofihe-0.38/terms.c100644 765 764 130573 7350750743 13463 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/terms.c,v 1.23 2001/05/30 20:48:31 richard Exp $ Processing to work out which x-place of a particular selbri any term in the text occupies. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ /*{{{ #Includes */ #include #include #include #include #include "functions.h" #include "rpc_tab.h" #include "nodes.h" #include "cmavotab.h" /*}}}*/ #define MAX_TERMS_IN_VECTOR 20 /* Maximum argument position. Even the most horrific abstraction or lujvo would be pushed to get this many args!!! */ #define MAX_POS 20 /*+ Value used to denote 'fai' as a place. So fa,fe,fi,fo,fu are 1..5, f[aeiou] xi xa is 6, ... f[aeiou] xi soso is 99, fai or fai xi pa is 101 etc +*/ #define FAI_OFFSET 101 /* Type definitions *//*{{{*/ typedef enum { TRM_POS, /* positional, i.e. just bare sumti */ TRM_FA, /* a term with a FA in front */ TRM_FAhI,/* a term with a fa'i in front */ TRM_TAG /* a term with a modal tag in front */ } TermType; typedef struct TermVectorEntry{ TermType type; int pos; /* For the FA case, which position the sumti has */ TreeNode *node; /* The treenode corresponding to this term */ } TermVectorEntry; typedef struct TermVector{ int n_nodes; TermVectorEntry nodes[MAX_TERMS_IN_VECTOR]; } TermVector; /*+ Enumeration tags for the LinkConvEntry type. +*/ typedef enum { LC_LINKS, /* TermVector of sumti links */ LC_SE, /* SE conversion */ LC_JAI, /* JAI conversion */ LC_TAG /* JAI tag conversion */ } LCType; typedef struct { int conv; TreeNode *senode; } SeInfo; typedef struct { LCType type; union { TermVector *links; SeInfo se; struct { TreeNode *tag; /* The tag */ TreeNode *inner_tu2; /* The modified tanru_unit_2 */ } jai_tag; } data; } LinkConvEntry; /*+ Structure containing an array of linked sumti blocks and conversions. This is accumulated whilst drilling down into 'KE selbri3 KE'E BE links' constructions, which could recurse a lot. +*/ typedef struct { int n; LinkConvEntry e[MAX_TERMS_IN_VECTOR]; } LinkConv; /*}}}*/ /* Forward prototypes *//*{{{*/ static void process_bridi_tail(TreeNode *bt, TermVector *pre, TermVector *post); static void process_selbri_args(TreeNode *s, TermVector *pre, TermVector *post, LinkConv *lc); static void process_selbri_3_args(TreeNode *s3, TermVector *pre, TermVector *post, LinkConv *lc); /*}}}*/ static void tv_init(TermVector *tv)/*{{{*/ { tv->n_nodes = 0; } /*}}}*/ static void tv_catenate(TermVector *s1, TermVector *s2, TermVector *r)/*{{{*/ { int tn; int i, n1, n2; tn = s1->n_nodes + s2->n_nodes; /* If this is exceeded, we'll need to reassess the design. Really ought to make the arrays dynamic but that incurs hassle of releasing them. */ assert(tn <= MAX_TERMS_IN_VECTOR); n1 = s1->n_nodes; n2 = s2->n_nodes; r->n_nodes = tn; for (i=0; inodes[i] = s1->nodes[i]; } for (i=0; inodes[n1+i] = s2->nodes[i]; } } /*}}}*/ static void tv_reverse(TermVector *dest, TermVector *src)/*{{{*/ { /* Reverse the order of a Termector. */ int n, i; assert(dest != src); /* Not designed to cope with this case */ n = dest->n_nodes = src->n_nodes; for (i=0; inodes[i] = src->nodes[n-1-i]; } }/*}}}*/ static void lc_init(LinkConv *lc)/*{{{*/ { /* Initialise a linkconv list to empty */ lc->n = 0; } /*}}}*/ static void lc_append_se(LinkConv *lc, int conv, TreeNode *senode)/*{{{*/ { /* Append a SE conversion to a linkconv chain */ assert(lc->n < MAX_TERMS_IN_VECTOR); lc->e[lc->n].data.se.conv = conv; lc->e[lc->n].data.se.senode = senode; lc->e[lc->n].type = LC_SE; ++(lc->n); } /*}}}*/ static void lc_append_jai_tag(LinkConv *lc, TreeNode *tag, TreeNode *inner_tu2)/*{{{*/ { assert(lc->n < MAX_TERMS_IN_VECTOR); lc->e[lc->n].data.jai_tag.tag = tag; lc->e[lc->n].data.jai_tag.inner_tu2 = inner_tu2; lc->e[lc->n].type = LC_TAG; ++(lc->n); } /*}}}*/ static void lc_append_jai(LinkConv *lc)/*{{{*/ { assert(lc->n < MAX_TERMS_IN_VECTOR); lc->e[lc->n].type = LC_JAI; ++(lc->n); } /*}}}*/ static void lc_append_links(LinkConv *lc, TermVector *v)/*{{{*/ { /* Append a set of linked sumti to a linkconv chain. Note, a dynamic COPY is made of 'v'. */ assert(lc->n < MAX_TERMS_IN_VECTOR); lc->e[lc->n].data.links = new(TermVector); /* Deep structure copy */ *(lc->e[lc->n].data.links) = *v; lc->e[lc->n].type = LC_LINKS; ++(lc->n); } /*}}}*/ static void lc_copy(const LinkConv *src, LinkConv *dest)/*{{{*/ { /* Copy a link/conv vector. A semi-deep structure copy is made, i.e. the pointers to the vectors of linked sumti get aliased. The intention is to produce a local copy onto which extra terms can be appended, rather than to make a completely general copy. */ *dest = *src; } /*}}}*/ static int recover_se_conv(TreeNode *x)/*{{{*/ { /* Turn se, te etc into 2..5 */ int se_code; char *se_str; TreeNode *se; se = strip_attitudinal(x); assert (se->data.cmavo.selmao == SE); se_code = se->data.cmavo.code; se_str = cmavo_table[se_code].cmavo; /* Unfortunately, faxixa, faxize etc to access the 6th places onwards are just too much to handle for now!! */ if (!strcmp(se_str, "se")) { return 2; } else if (!strcmp(se_str, "te")) { return 3; } else if (!strcmp(se_str, "ve")) { return 4; } else if (!strcmp(se_str, "xe")) { return 5; } else { abort(); } } /*}}}*/ static int recover_fa_conv(TreeNode *x)/*{{{*/ { /* Turn fa, fe... into 1 .. 5 EXTEND TO COPE WITH SUBSCRIPTED VALUES!!! static int recover_fa_conv Return the value in the range 1 .. 5 corresponding to the FA cmavo. TreeNode *x The parse node, must be a cmavo of selma'o FA. */ int fa_code; char *fa_str; x = strip_attitudinal(x); assert (x->data.cmavo.selmao == FA); fa_code = x->data.cmavo.code; fa_str = cmavo_table[fa_code].cmavo; /* Unfortunately, faxixa, faxize etc to access the 6th places onwards are just too much to handle for now!! */ if (!strcmp(fa_str, "fi'a")) { return 0; } else if (!strcmp(fa_str, "fa")) { return 1; } else if (!strcmp(fa_str, "fe")) { return 2; } else if (!strcmp(fa_str, "fi")) { return 3; } else if (!strcmp(fa_str, "fo")) { return 4; } else if (!strcmp(fa_str, "fu")) { return 5; } else if (!strcmp(fa_str, "fai")) { return FAI_OFFSET; } else { abort(); } } /*}}}*/ static void tv_build(TermVector *r, TreeNode *x)/*{{{*/ { /* Build a TermVector from a terms node in the parse tree. Any terms_1 or terms_2 with CEhE or PEhE inside is ignored - to defer the problem of what to do about afterthought termsets to somewhere else. */ TermVector vv; TreeNode *xx, *t1, *t2, *t, *tc, *tcc; struct nonterm *ntx, *ntt; int nc, ntc; type_check(x, TERMS); /* The main hassle is that the rule is left recursive, so we build the vector backwards and reverse it at the end. */ tv_init(&vv); xx = x; do { ntx = &xx->data.nonterm; nc = ntx->nchildren; if (nc == 1) { /* last term in the series */ t1 = ntx->children[0]; } else if (nc == 2) { t1 = ntx->children[1]; xx = ntx->children[0]; /* next term in the series */ } else { abort(); } type_check(t1, TERMS_1); /* No point assertion checking whether the children are nonterminals, they must be from the grammar */ ntt = &t1->data.nonterm; ntc = ntt->nchildren; if (ntc > 1) { /* aaaargh!! termset land */ fprintf(stderr, "No place tagging for termset at line %d\n", t1->start_line); continue; } t2 = ntt->children[0]; type_check(t2, TERMS_2); ntt = &t2->data.nonterm; ntc = ntt->nchildren; if (ntc > 1) { /* aaaargh!! termset land */ fprintf(stderr, "No place tagging for termset at line %d\n", t2->start_line); continue; } t = ntt->children[0]; assert(t->data.nonterm.type == TERM); /* Now, what sort of term is it? Have to drill down one layer further */ tc = t->data.nonterm.children[0]; switch (tc->data.nonterm.type) { case TERM_PLAIN_SUMTI: vv.nodes[vv.n_nodes].type = TRM_POS; vv.nodes[vv.n_nodes].node = t; vv.n_nodes++; break; case TERM_PLACED_SUMTI: { int pos; tcc = child_ref(tc, 0); pos = recover_fa_conv(tcc); if (pos == 0) { vv.nodes[vv.n_nodes].type = TRM_FAhI; vv.nodes[vv.n_nodes].node = t; vv.nodes[vv.n_nodes].pos = 0; } else { vv.nodes[vv.n_nodes].type = TRM_FA; vv.nodes[vv.n_nodes].node = t; vv.nodes[vv.n_nodes].pos = pos; } vv.n_nodes++; } break; case TERM_TAGGED_SUMTI: case TAGGED_TERMSET: vv.nodes[vv.n_nodes].type = TRM_TAG; vv.nodes[vv.n_nodes].node = t; vv.n_nodes++; break; case TERMSET: fprintf(stderr, "No place tagging for termset at line %d\n", t->start_line); break; case TERM_FLOATING_TENSE: case TERM_FLOATING_NEGATE: case TERM_OTHER: default: /* None of these are interesting for place tagging */ break; } } while (nc == 2); /* Keep looping whilst were in the left recursive rule */ /* Reverse the order to put the terms in natural order */ tv_reverse(r, &vv); } /*}}}*/ static void process_subsentence(TreeNode *ss, TermVector *pre, TermVector *post)/*{{{*/ { struct nonterm *nt, *ntc; int nc; TreeNode *sss; TreeNode *c; TermVector head_terms, new_pre; TreeNode *terms, *btail; sss = ss; do { type_check(ss, SUBSENTENCE); nt = &sss->data.nonterm; nc = nt->nchildren; if (nc == 2) { /* Pick the 'subsentence' following the 'prenex' out of the 2 child version */ sss = child_ref(sss, 1); } else { /* Pick 'sentence' out of the 1 child version */ sss = child_ref(sss, 0); } } while (nc == 2); type_check(sss, SENTENCE); nt = &sss->data.nonterm; if (nt->nchildren == 1) { c = nt->children[0]; if (c->type == N_NONTERM) { ntc = & c->data.nonterm; if ((ntc->type == NO_CU_SENTENCE) || (ntc->type == OBSERVATIVE_SENTENCE)) { sss = c; nt = ntc; } } } /* Now looking at the '[terms [CU #]] bridi_tail' node. */ terms = find_nth_child(sss, 1, TERMS); btail = find_nth_child(sss, 1, BRIDI_TAIL); assert(btail); /* Every sentence has one of these! */ if (terms) { tv_build(&head_terms, terms); tv_catenate(pre, &head_terms, &new_pre); process_bridi_tail(btail, &new_pre, post); } else { process_bridi_tail(btail, pre, post); } } /*}}}*/ /* Type definitions (tags, places etc) *//*{{{*/ typedef enum { PT_ORD, /* one of the x1 .. x5 of the BRIVLA etc */ PT_TAG, /* e.g. the x1 of 'jai bau cusku' */ PT_JAI /* e.g. the x1 of 'jai rinka' */ } PlaceType; typedef struct { TreeNode *tag; TreeNode *inner_tu2; } TagPlace; typedef struct { int pad; } JaiPlace; typedef struct { PlaceType type; int valid; int taken; int pos; TagPlace tag; JaiPlace jai; } Place; /*}}}*/ static void fixup_term_place(TreeNode *x, Place *pl, XTermTag *tt)/*{{{*/ { /* Given a term treenode and a single place descriptor, chain the place information to the node's property list for later display. */ XTermTags *ts, *nts; type_check(x, TERM); ts = prop_term_tags(x, NO); if (ts) { while(ts->next) ts = ts->next; /* Get to end of list */ nts = new(XTermTags); ts->next = nts; nts->next = NULL; ts = nts; } else { ts = prop_term_tags(x, YES); /* Create it */ ts->next = NULL; } ts->tag = *tt; /* deep copy, tt is in automatic storage */ ts->tag.pos = pl->pos; switch (pl->type) { case PT_ORD: break; case PT_TAG: ts->tag.jaitag.tag = pl->tag.tag; ts->tag.jaitag.inner_tu2 = pl->tag.inner_tu2; ts->tag.type = TTT_JAITAG; break; case PT_JAI: ts->tag.type = TTT_JAI; break; } }/*}}}*/ static void assign_terms_to_places(TermVector *t, Place *place, Place *fai, int abase, XTermTag *tt)/*{{{*/ { int i, n; int base; int pos; base = abase; /* Assign FA places */ n = t->n_nodes; for (i=0; inodes[i].type == TRM_FA) { pos = t->nodes[i].pos; if (pos < FAI_OFFSET) { if (place[pos].valid) { fixup_term_place(t->nodes[i].node, &place[pos], tt); place[pos].taken = 1; } else { fprintf(stderr, "Invalid place\n"); } } else { pos -= FAI_OFFSET; pos++; if (fai[pos].valid) { fixup_term_place(t->nodes[i].node, &fai[pos], tt); fai[pos].taken = 1; } else { fprintf(stderr, "Invalid place\n"); } } } } /* Now fix up unmarked places */ for (i=0; inodes[i].type) { case TRM_POS : /* Look for first unassigned place */ while (place[base].taken) ++base; if (base > MAX_POS) { fprintf(stderr, "Too many places assigned\n"); } else { fixup_term_place(t->nodes[i].node, &place[base], tt); place[base].taken = 1; ++base; } break; case TRM_FA : pos = t->nodes[i].pos; if (pos < FAI_OFFSET) { base = pos + 1; } break; default: break; } } } /*}}}*/ static void assign_conversion(LinkConv *lc, TreeNode *convertible)/*{{{*/ { Place place[MAX_POS]; XConversion *ext; int i, n; /* Init the place and vectors */ for (i=0; in; for (i=n-1; i>=0; i--) { switch (lc->e[i].type) { case LC_SE: /* Just swap 2 positions in the place[] array */ { Place temp; SeInfo *j; XDontGloss *dg; j = &lc->e[i].data.se; temp = place[1]; place[1] = place[j->conv]; place[j->conv] = temp; dg = prop_dont_gloss(j->senode, YES); /* prevent the node being glossed */ } break; case LC_LINKS: /* Binding of linked sumti does not affect the glossing of the brivla or whatever, just drop through to next loop iteration */ break; case LC_TAG: /* Break out at this point */ goto loop_done; break; case LC_JAI: fprintf(stderr, "Don't know what to do with for gloss conversion\n"); break; } } loop_done: ext = prop_conversion(convertible, YES); ext->conv = place[1].pos; } /*}}}*/ static void assign_places(TermVector *pre, TermVector *post, LinkConv *lc, XTermTag *tt)/*{{{*/ { /* Work out which terms have which places in the bridi, and tag them accordingly */ /* Variable declarations */ /*+ Array for the ordinary places in the bridi. e.g. if you get a term with 'fe' in front of it, look in place[2] to find what to do with it. +*/ Place place[MAX_POS]; /*+ Array for the 'fai' places. e.g. if a term has 'fai xi re' in front, look in fai[2] to find what to do. +*/ Place fai[MAX_POS]; int i, n; /* Init the place and fai vectors */ for (i=0; in; for (i=n-1; i>=0; i--) { switch (lc->e[i].type) { case LC_SE: /* Just swap 2 positions in the place[] array */ { Place temp; SeInfo *j; j = &lc->e[i].data.se; temp = place[1]; place[1] = place[j->conv]; place[j->conv] = temp; } break; case LC_TAG: { int j; /* Shift fai place array up (i.e. need subscripts if more than one fai place is in scope). */ for (j=1; ; j++) { if (!fai[j].valid) break; } for (; j>1; j--) { fai[j] = fai[j-1]; } fai[1] = place[1]; place[1].type = PT_TAG; place[1].valid = 1; place[1].tag.tag = lc->e[i].data.jai_tag.tag; place[1].tag.inner_tu2 = lc->e[i].data.jai_tag.inner_tu2; } break; case LC_JAI: { int j; /* Shift fai place array up (i.e. need subscripts if more than one fai place is in scope). */ for (j=1; ; j++) { if (!fai[j].valid) break; } for (; j>1; j--) { fai[j] = fai[j-1]; } fai[1] = place[1]; place[1].type = PT_ORD; place[1].valid = 1; } break; case LC_LINKS: assign_terms_to_places(lc->e[i].data.links, place, fai, 2, tt); break; } } /* Do the pre and post terms */ assign_terms_to_places(pre, place, fai, 1, tt); assign_terms_to_places(post, place, fai, 2, tt); } /*}}}*/ static void process_tanru_unit_2_args(TreeNode *tu2, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Handle argument processing at the level of a tanru_unit_2. This is where the clever tag assignment stuff is done! */ TreeNode *c1; type_check(tu2, TANRU_UNIT_2); c1 = maybe_strip_attitudinal(child_ref(tu2, 0)); if (c1->type == N_CMAVO) {/*{{{*/ switch (c1->data.cmavo.selmao) { case GOhA:/*{{{*/ { XTermTag tt; tt.type = TTT_GOhA; tt.goha.goha = c1; assign_places(pre, post, lc, &tt); assign_conversion(lc, c1); } break;/*}}}*/ case ME:/*{{{*/ { XTermTag tt; XRequireBrac *xrb; TreeNode *me_node; tt.type = TTT_ME; tt.me.sumti = find_nth_child(tu2, 1, SUMTI); me_node = find_nth_cmavo_child(tu2, 1, ME); assert(tt.me.sumti); xrb = prop_require_brac (tt.me.sumti, YES); assign_places(pre, post, lc, &tt); /* Conversion can't occur on ME, there is only an x1 place */ } break;/*}}}*/ case NUhA:/*{{{*/ { XTermTag tt; XRequireBrac *xrb; tt.type = TTT_NUhA; tt.nuha.mex_operator = find_nth_child(tu2, 1, MEX_OPERATOR); assign_places(pre, post, lc, &tt); assign_conversion(lc, c1); xrb = prop_require_brac (tt.nuha.mex_operator, YES); } break;/*}}}*/ } /*}}}*/ } else if (c1->type == N_BRIVLA) {/*{{{*/ XTermTag tt; tt.type = TTT_BRIVLA; tt.brivla.x = c1; assign_places(pre, post, lc, &tt); assign_conversion(lc, c1);/*}}}*/ } else if (c1->type == N_NONTERM) { switch (c1->data.nonterm.type) { case NUMBER_MOI_TU2:/*{{{*/ { TreeNode *norl, *moi; XRequireBrac *xrb; XTermTag tt; /* Remember : The NUMBER_MOI marker that's in the bison file is NOT built into the parse tree!! */ norl = child_ref(c1, 0); moi = find_nth_cmavo_child(c1, 1, MOI); tt.type = TTT_NUMBERMOI; tt.numbermoi.number_or_lerfu = norl; tt.numbermoi.moi = moi; assign_places(pre, post, lc, &tt); if ((pre->n_nodes > 0) || (post->n_nodes > 0)) { xrb = prop_require_brac (norl, YES); } } break; /*}}}*/ case KE_SELBRI3_TU2:/*{{{*/ { TreeNode *cs3; cs3 = find_nth_child(c1, 1, SELBRI_3); assert(cs3); process_selbri_3_args(cs3, pre, post, lc); } break;/*}}}*/ case SE_TU2:/*{{{*/ { LinkConv newlc; int conv; TreeNode *se_child, *tu2_child; lc_copy(lc, &newlc); se_child = child_ref(c1, 0); tu2_child = find_nth_child(c1, 1, TANRU_UNIT_2); assert(tu2_child); conv = recover_se_conv(se_child); lc_append_se(&newlc, conv, se_child); process_tanru_unit_2_args(tu2_child, pre, post, &newlc); } break;/*}}}*/ case JAI_TAG_TU2:/*{{{*/ { LinkConv newlc; TreeNode *ctag, *tu2_child; XRequireBrac *xrb; lc_copy(lc, &newlc); ctag = find_nth_child(c1, 1, TAG); tu2_child = find_nth_child(c1, 1, TANRU_UNIT_2); assert(ctag); assert(tu2_child); lc_append_jai_tag(&newlc, ctag, tu2_child); xrb = prop_require_brac(tu2_child, YES); process_tanru_unit_2_args(tu2_child, pre, post, &newlc); } break; /*}}}*/ case JAI_TU2:/*{{{*/ { LinkConv newlc; TreeNode *tu2_child; lc_copy(lc, &newlc); tu2_child = find_nth_child(c1, 1, TANRU_UNIT_2); assert(tu2_child); lc_append_jai(&newlc); process_tanru_unit_2_args(tu2_child, pre, post, &newlc); } break; /*}}}*/ case NAHE_TU2:/*{{{*/ { TreeNode *tu2_child; tu2_child = find_nth_child(c1, 1, TANRU_UNIT_2); assert(tu2_child); process_tanru_unit_2_args(tu2_child, pre, post, lc); } break; /*}}}*/ case ABSTRACTION:/*{{{*/ { TreeNode *nns, *c2, *nu, *nai; XTermTag tt; nns = child_ref(c1, 0); type_check(nns, NU_NAI_SEQ); c2 = maybe_strip_attitudinal(child_ref(nns, 0)); if ((c2->type == N_CMAVO) && (c2->data.cmavo.selmao == NU)) { /* A simple NU thing */ nu = c2; /* Maybe null - not sure what to do with it as I haven't seen any examples */ nai = find_nth_child(nns, 1, NAI); if (nai) { fprintf(stderr, "Don't know how to handle negated abstractor yet at line %d column %d - ignoring negation\n", c1->start_line, c1->start_column); } tt.type = TTT_ABSTRACTION; tt.abstraction.nu = nu; assign_places(pre, post, lc, &tt); assign_conversion(lc, nu); } else { fprintf(stderr, "Can't handle connected abstractors wrt places yet at line %d column %d\n", c1->start_line, c1->start_column); } } break; /*}}}*/ default: break; } } else if (c1->type == N_ZEI) {/*{{{*/ XTermTag tt; tt.type = TTT_ZEI; tt.zei.zei = c1; assign_places(pre, post, lc, &tt); assign_conversion(lc, c1); /*}}}*/ } else { abort(); } } /*}}}*/ static void process_tanru_unit_1_args(TreeNode *tu1, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Handle argument processing at the level of a tanru_unit_1. */ XTermVector *xtv; /* The linked sumti vector of the tu1 if any */ XDoneTU1 *xdtu1; /* Property whose existence on the TU1 tree node shows we have processed its linked sumti */ TreeNode *tu2; xtv = prop_term_vector(tu1, NO); tu2 = child_ref(tu1, 0); if (xtv) { LinkConv newlc; lc_copy(lc, &newlc); lc_append_links(&newlc, xtv->vec); process_tanru_unit_2_args(tu2, pre, post, &newlc); } else { process_tanru_unit_2_args(tu2, pre, post, lc); } /* Put marker on the TU1 node so that we know its linked sumti have now been processed. Later on we scan the entire parse tree for TU1 nodes that don't have this property already set - these are ones that are not part of tertau */ xdtu1 = prop_done_tu1(tu1, YES); } /*}}}*/ static void process_selbri_6_args(TreeNode *s6, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Drill down into a selbri_6 etc */ TreeNode *tu, *tu1, *cs6, *cs; /* For the cases with BO, I think it's only the very final term that's relevant. For the guhek cases, I think these are like connectives, in selbri_4/5, it's like gek_sentence?? */ type_check(s6, SELBRI_6); if (nch(s6) == 1) { tu = child_ref(s6, 0); /* Always first child */ if (nch(tu) > 1) { fprintf(stderr, "tanru_unit at line %d column %d contains CEI, can't handle this yet\n", tu->start_line, tu->start_column); } else { tu1 = child_ref(tu, 0); process_tanru_unit_1_args(tu1, pre, post, lc); } } else { tu = find_nth_child(s6, 1, TANRU_UNIT); if (tu) { /* BO form */ cs6 = find_nth_child(s6, 1, SELBRI_6); process_selbri_6_args(cs6, pre, post, lc); } else { cs = find_nth_child(s6, 1, SELBRI); cs6 = find_nth_child(s6, 1, SELBRI_6); process_selbri_args(cs, pre, post, lc); process_selbri_6_args(cs6, pre, post, lc); } } } /*}}}*/ static void process_selbri_5_args(TreeNode *s5, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Drill down into a selbri_5 etc */ TreeNode *s6, *cs5; cs5 = s5; do { s6 = find_nth_child(cs5, 1, SELBRI_6); process_selbri_6_args(s6, pre, post, lc); cs5 = find_nth_child(cs5, 1, SELBRI_5); } while (cs5); } /*}}}*/ static void process_selbri_3_args(TreeNode *s3, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Drill down into a selbri_3 to try to recover a single tanru_unit_2 which is the tertau. Apply the supplied args to that - i.e. work out the place structure, then go and mark all the referenced terms accordingly. */ TreeNode *s4, *s5, *ks3, *cs3; /* The selbri chain */ type_check(s3, SELBRI_3); /* The tertau is always the last entry in the sequence of selbri_4's. Fortunately, this is immediately available via left recursion */ s4 = find_nth_child(s3, 1, SELBRI_4); /* If the selbri_4 is non-trivial (i.e. has connectives in), we have to descend each branch, more or less as though there was a gihek at the sentence level. Fortunately from this function onwards, the same termvectors apply to every child, so at least we're over that. */ if (nch(s4) > 1) { do { s5 = find_nth_child(s4, 1, SELBRI_5); if (s5) { process_selbri_5_args(s5, pre, post, lc); } else { ks3 = find_nth_child(s4, 1, KE_SELBRI_3); assert(ks3); cs3 = find_nth_child(ks3, 1, SELBRI_3); assert(cs3); process_selbri_3_args(cs3, pre, post, lc); } s4 = find_nth_child(s4, 1, SELBRI_4); } while (s4); } else { s5 = find_nth_child(s4, 1, SELBRI_5); process_selbri_5_args(s5, pre, post, lc); } } /*}}}*/ static void process_selbri_args(TreeNode *s, TermVector *pre, TermVector *post, LinkConv *lc)/*{{{*/ { /* Drill down into a selbri etc */ TreeNode *cs, *s1, *s2, *s3; /* The selbri chain */ TermVector empty_tv; tv_init(&empty_tv); type_check(s, SELBRI); cs = s; do { s1 = find_nth_child(cs, 1, SELBRI_1); /* Try to get selbri_2, or go round again if there's a NA */ s2 = find_nth_child(s1, 1, SELBRI_2); if (!s2) { cs = find_nth_child(s1, 1, SELBRI); assert(cs); } } while (!s2); /* OK, have selbri_2, the fun starts here if there's a CO. */ s3 = child_ref(s2, 0); if (nch(s2) > 1) { /* There is a CO following. Only the head terms apply to this first selbri_3, its other arguments are either linked sumti or are unspecified. */ process_selbri_3_args(s3, pre, &empty_tv, lc); while (nch(s2) > 1) { s2 = find_nth_child(s2, 1, SELBRI_2); } s3 = child_ref(s2, 0); process_selbri_3_args(s3, &empty_tv, post, lc); } else { /* All arguments apply to the selbri_3 */ process_selbri_3_args(s3, pre, post, lc); } }/*}}}*/ static void process_main_selbri(TreeNode *ms, TermVector *pre, TermVector *post)/*{{{*/ { /* Handle each main selbri after it has been located. */ TermVector *cpre, *cpost; XTermVectors *xtv; TreeNode *s; LinkConv lc; type_check(ms, MAIN_SELBRI); cpre = new(TermVector); cpost = new(TermVector); *cpre = *pre; *cpost = *post; /* Do we really need to store this property???!!! We do all the processing on these vectors below! */ xtv = prop_term_vectors(ms, YES); xtv->pre = cpre; xtv->post = cpost; lc_init(&lc); /* Roll up the sleeves ..., this is where the real grunge starts. */ s = child_ref(ms, 0); /* selbri */ process_selbri_args(s, pre, post, &lc); }/*}}}*/ static void process_bridi_tail_3(TreeNode *bt3, TermVector *pre, TermVector *post)/*{{{*/ { TreeNode *c1, *gsc, *tt, *ttc; TermVector tail_terms, new_post; type_check(bt3, BRIDI_TAIL_3); c1 = child_ref(bt3, 0); if (c1->data.nonterm.type == MAIN_SELBRI) { /* Do main_selbri processing --- make a property record for the pre and post vectors and tag it onto that node */ TreeNode *ms; ms = c1; tt = find_nth_child(bt3, 1, TAIL_TERMS); if (tt) { ttc = find_nth_child(tt, 1, TERMS); if (ttc) { tv_build(&tail_terms, ttc); tv_catenate(&tail_terms, post, &new_post); process_main_selbri(ms, pre, &new_post); } else { process_main_selbri(ms, pre, post); } } else { process_main_selbri(ms, pre, post); } } else { /* Gek sentence */ TreeNode *gs, *ss1, *ss2, *tt, *ttt; gs = c1; type_check(gs, GEK_SENTENCE); /* Do gek_sentence processing. If first child is not a 'gek', the sentence is a 'tag KE ..' format one. Drill down through that until we come to something of the form 'gek subsentence...' .*/ while (gsc = child_ref(gs, 0), ((gsc->type != N_NONTERM) || (gsc->data.nonterm.type != GEK))) { gs = find_nth_child(gs, 1, GEK_SENTENCE); } /* OK , got it. Extract the two subsentences */ ss1 = find_nth_child(gs, 1, SUBSENTENCE); ss2 = find_nth_child(gs, 2, SUBSENTENCE); assert(ss1); assert(ss2); tt = find_nth_child(gs, 1, TAIL_TERMS); if (tt) { ttt = find_nth_child(tt, 1, TERMS); if (ttt) { TermVector new_post, tail_terms; tv_build(&tail_terms, ttt); tv_catenate(&tail_terms, post, &new_post); process_subsentence(ss1, pre, &new_post); process_subsentence(ss2, pre, &new_post); } else { process_subsentence(ss1, pre, post); process_subsentence(ss2, pre, post); } } else { process_subsentence(ss1, pre, post); process_subsentence(ss2, pre, post); } } return; }/*}}}*/ static void process_bridi_tail_2(TreeNode *bt2, TermVector *pre, TermVector *post)/*{{{*/ { TreeNode *bt3, *bt2a, *bt2b, *tt, *ttt; /* The children */ struct nonterm *nt; int nc; /* The structure of a bridi_tail_2 is, for this fn's purposes, bridi_tail_3 | bridi_tail_2 [CONNECTIVE bridi_tail_2 [tail_terms]] */ nt = & bt2->data.nonterm; nc = nt->nchildren; if (nc == 1) { /* Just ananlyse the child */ bt3 = nt->children[0]; process_bridi_tail_3(bt3, pre, post); } else { TermVector new_post, tail_terms; bt2a = find_nth_child(bt2, 1, BRIDI_TAIL_2); assert(bt2a); bt2b = find_nth_child(bt2, 2, BRIDI_TAIL_2); assert(bt2b); tt = find_nth_child(bt2, 1, TAIL_TERMS); if (tt) { ttt = find_nth_child(tt, 1, TERMS); if (ttt) { tv_build(&tail_terms, ttt); tv_catenate(&tail_terms, post, &new_post); process_bridi_tail_2(bt2a, pre, &new_post); process_bridi_tail_2(bt2b, pre, &new_post); } else { process_bridi_tail_2(bt2a, pre, post); process_bridi_tail_2(bt2b, pre, post); } } else { process_bridi_tail_2(bt2a, pre, post); process_bridi_tail_2(bt2b, pre, post); } } return; }/*}}}*/ static void process_bridi_tail_1(TreeNode *bt1, TermVector *pre, TermVector *post)/*{{{*/ { TreeNode *bt2, *bt1c, *tt, *ttt; /* The children */ struct nonterm *nt; int nc; /* The structure of a bridi_tail_1 is, for this fn's purposes, bridi_tail_2 | bridi_tail_1 [CONNECTIVE bridi_tail_2 [tail_terms]] */ nt = & bt1->data.nonterm; nc = nt->nchildren; if (nc == 1) { /* Just ananlyse the child */ bt2 = nt->children[0]; process_bridi_tail_2(bt2, pre, post); } else { TermVector new_post, tail_terms; bt1c = find_nth_child(bt1, 1, BRIDI_TAIL_1); assert(bt1c); bt2 = find_nth_child(bt1, 1, BRIDI_TAIL_2); assert(bt2); tt = find_nth_child(bt1, 1, TAIL_TERMS); if (tt) { ttt = find_nth_child(tt, 1, TERMS); if (ttt) { tv_build(&tail_terms, ttt); tv_catenate(&tail_terms, post, &new_post); process_bridi_tail_1(bt1c, pre, &new_post); process_bridi_tail_2(bt2, pre, &new_post); } else { process_bridi_tail_1(bt1c, pre, post); process_bridi_tail_2(bt2, pre, post); } } else { process_bridi_tail_1(bt1c, pre, post); process_bridi_tail_2(bt2, pre, post); } } return; }/*}}}*/ static void process_bridi_tail(TreeNode *bt, TermVector *pre, TermVector *post)/*{{{*/ { /* Analyse a bridi_tail down to each vector of tail_terms and find each main_selbri within it. Ultimately tag each main_selbri with the vectors of pre- and post- terms that apply to it. TreeNode *bt The bridi_tail to analyse TermVector *pre The vector of all sumti-like terms in before the 'CU'. Note, for gek-sentences, this is the concatenation of all such pre-term sequences. TermVector *post The vector of tail_terms accumulated from outer bridi_tail constructions. (Initially this will be empty). */ TreeNode *bt1, *btc, *tt, *ttt; /* The children */ struct nonterm *nt; int nc; /* The structure of a bridi_tail is, for this fn's purposes, bridi_tail_1 [CONNECTIVE bridi_tail [tail_terms]] */ nt = & bt->data.nonterm; nc = nt->nchildren; if (nc == 1) { /* Just ananlyse the child */ bt1 = nt->children[0]; process_bridi_tail_1(bt1, pre, post); } else { TermVector new_post, tail_terms; btc = find_nth_child(bt, 1, BRIDI_TAIL); assert(btc); bt1 = find_nth_child(bt, 1, BRIDI_TAIL_1); assert(bt1); tt = find_nth_child(bt, 1, TAIL_TERMS); if (tt) { ttt = find_nth_child(tt, 1, TERMS); if (ttt) { tv_build(&tail_terms, ttt); tv_catenate(&tail_terms, post, &new_post); process_bridi_tail_1(bt1, pre, &new_post); process_bridi_tail(btc, pre, &new_post); } else { process_bridi_tail_1(bt1, pre, &new_post); process_bridi_tail(btc, pre, post); } } else { process_bridi_tail_1(bt1, pre, &new_post); process_bridi_tail(btc, pre, post); } } }/*}}}*/ static void process_statement_3(TreeNode *x)/*{{{*/ { struct nonterm *nt, *nts, *ntc; TreeNode *sent, *terms, *btail, *c; TermVector pre_terms, tail_terms; assert(x->type == N_NONTERM && x->data.nonterm.type == STATEMENT_3); nt = & x->data.nonterm; if (nt->nchildren == 1) { /* Must be the form where 'sentence' is the only child. All the forms with TUhE and text_1 have at least 2 child nodes */ sent = nt->children[0]; /* This is the 'sentence' inside */ /* If the sentence is 'no_cu_sentence' or 'observative_sentence', drill down */ assert(sent->type == N_NONTERM); nts = &sent->data.nonterm; if (nts->nchildren == 1) { c = nts->children[0]; if (c->type == N_NONTERM) { ntc = & c->data.nonterm; if ((ntc->type == NO_CU_SENTENCE) || (ntc->type == OBSERVATIVE_SENTENCE)) { sent = c; nts = ntc; } } } /* Now looking at the '[terms [CU #]] bridi_tail' node. */ terms = find_nth_child(sent, 1, TERMS); btail = find_nth_child(sent, 1, BRIDI_TAIL); assert(btail); /* Every sentence has one of these! */ tv_init(&tail_terms); if (terms) { tv_build(&pre_terms, terms); } else { tv_init(&pre_terms); } process_bridi_tail(btail, &pre_terms, &tail_terms); #if 0 if (terms) { /* Test code, for now */ TermVector tv; int i, n; TreeNode *c; tv_build(&tv, terms); n = tv.n_nodes; for (i=0; istart_line, c->start_column); switch (tv.nodes[i].type) { case TRM_POS: fprintf(stderr, "Ordinary positional sumti\n"); break; case TRM_FA: fprintf(stderr, "Positioned sumti, place=%d\n", tv.nodes[i].pos); break; case TRM_TAG: fprintf(stderr, "Tagged sumti\n"); break; } } } #endif } }/*}}}*/ static void process_abstraction(TreeNode *x)/*{{{*/ { TreeNode *ss; TermVector pre, post; tv_init(&pre); tv_init(&post); ss = child_ref(x, 1); type_check(ss, SUBSENTENCE); process_subsentence(ss, &pre, &post); }/*}}}*/ static void process_relative_clause(TreeNode *x)/*{{{*/ { TreeNode *ss, *fc; TermVector pre, post; tv_init(&pre); tv_init(&post); fc = child_ref(x, 0); if (fc->data.nonterm.type == FULL_RELATIVE_CLAUSE) { ss = find_nth_child(fc, 1, SUBSENTENCE); if (ss) { process_subsentence(ss, &pre, &post); } } }/*}}}*/ static void process_metalinguistic(TreeNode *x)/*{{{*/ { /* Handle metalinguistic constructions (SEI...). This is slightly different to the other cases, in that we have to resolve the terms and selbri ourselves. */ TermVector pre, post; TreeNode *terms, *mmselbri, *selbri; LinkConv lc; terms = find_nth_child(x, 1, TERMS); mmselbri = find_nth_child(x, 1, METALINGUISTIC_MAIN_SELBRI); assert(mmselbri); selbri = child_ref(mmselbri, 0); tv_init(&pre); tv_init(&post); if (terms) { tv_build(&pre, terms); } lc_init(&lc); process_selbri_args(selbri, &pre, &post, &lc); }/*}}}*/ static void scan_for_sentence_parents(TreeNode *x)/*{{{*/ { /* Seek recursively downwards looking for treenodes of type STATEMENT_3, ABSTRACTION. We're really interested in SENTENCE, but that occurs within ge subsentence->sentence gi subsentence->sentence, and we have to track term strings into gek_sentences because you can have terms in front plus tail terms behind, that are part of both clauses. Relative clauses and NU abstractions (the 2 other places where sentences can occur) will have to be looked at afterwards. */ int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; if (nt->type == STATEMENT_3) { process_statement_3(x); } else if (nt->type == ABSTRACTION) { process_abstraction(x); } else if (nt->type == RELATIVE_CLAUSE) { process_relative_clause(x); } else if (nt->type == METALINGUISTIC) { process_metalinguistic(x); } /* Traverse down even for statement_3 (there may be abstractors, TO..TOI etc buried inside) */ nc = nt->nchildren; for (i=0; ichildren[i]; scan_for_sentence_parents(c); } } }/*}}}*/ static void process_sumti_5b(TreeNode *x)/*{{{*/ { /* Scan down into the selbri inside a 'quantifier selbri' sumti, to mark up the tertau for conversions. */ TreeNode *c; LinkConv lc; TermVector empty_tv; tv_init(&empty_tv); c = find_nth_child(x, 1, SELBRI); assert(c); lc_init(&lc); process_selbri_args(c, &empty_tv, &empty_tv, &lc); }/*}}}*/ static void process_sumti_tail_1a(TreeNode *x)/*{{{*/ { /* Scan down into the selbri inside a sumti_tail construction. */ TreeNode *c; LinkConv lc; TermVector empty_tv; tv_init(&empty_tv); c = find_nth_child(x, 1, SELBRI); assert(c); lc_init(&lc); process_selbri_args(c, &empty_tv, &empty_tv, &lc); }/*}}}*/ static void scan_for_selbri_in_sumti(TreeNode *x)/*{{{*/ { /* Process selbri in the context of sumti. Allows conversions to be handled with full generality. */ int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; if (nt->type == SUMTI_5B) { process_sumti_5b(x); } else if (nt->type == SUMTI_TAIL_1A) { process_sumti_tail_1a(x); } nc = nt->nchildren; for (i=0; ichildren[i]; scan_for_selbri_in_sumti(c); } } }/*}}}*/ static void check_tu1_for_links(TreeNode *tu1)/*{{{*/ { /* Check whether there are linked sumti and add property */ TreeNode *la, *tm, *lk, *tc, *tcc; TermVector tv; XTermVector *xtv; type_check(tu1, TANRU_UNIT_1); if (tu1->data.nonterm.nchildren > 1) { /* There is a linkargs field */ tv_init(&tv); la = tu1->data.nonterm.children[1]; /* linkargs */ type_check(la, LINKARGS); do { tm = find_nth_child(la, 1, TERM); lk = find_nth_child(la, 1, LINKS); assert(tm); /* Always a term present */ /* But not always an lk */ /* Now, what sort of term is it? Have to drill down one layer further */ tc = child_ref(tm, 0); switch (tc->data.nonterm.type) { case TERM_PLAIN_SUMTI: tv.nodes[tv.n_nodes].type = TRM_POS; tv.nodes[tv.n_nodes].node = tm; tv.n_nodes++; break; case TERM_PLACED_SUMTI: { int pos; tcc = child_ref(tc, 0); pos = recover_fa_conv(tcc); if (pos == 0) { tv.nodes[tv.n_nodes].type = TRM_FAhI; tv.nodes[tv.n_nodes].node = tm; tv.nodes[tv.n_nodes].pos = 0; } else { tv.nodes[tv.n_nodes].type = TRM_FA; tv.nodes[tv.n_nodes].node = tm; tv.nodes[tv.n_nodes].pos = pos; } tv.n_nodes++; } break; case TERM_TAGGED_SUMTI: case TAGGED_TERMSET: tv.nodes[tv.n_nodes].type = TRM_TAG; tv.nodes[tv.n_nodes].node = tm; tv.n_nodes++; break; case TERMSET: fprintf(stderr, "Termset at line %d ignored, place tagging will be faulty\n", tm->start_line); break; case TERM_FLOATING_TENSE: case TERM_FLOATING_NEGATE: case TERM_OTHER: default: /* None of these are interesting for place tagging */ break; } la = lk; } while (la); /* Attach property to node */ xtv = prop_term_vector(tu1, YES); xtv->vec = new(TermVector); *(xtv->vec) = tv; } }/*}}}*/ static void scan_tu1_phase1(TreeNode *x)/*{{{*/ { /* Find any tanru_unit_1 with linked sumti on it, and build a termvector property to attach to it. */ int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; if (nt->type == TANRU_UNIT_1) { check_tu1_for_links(x); } nc = nt->nchildren; for (i=0; ichildren[i]; scan_tu1_phase1(c); } } } /*}}}*/ static void scan_tu1_phase2(TreeNode *x)/*{{{*/ { int nc, i; struct nonterm *nt; TreeNode *c; if (x->type == N_NONTERM) { nt = &x->data.nonterm; if (nt->type == TANRU_UNIT_1) { XTermVector *xtv; XDoneTU1 *xdtu1; xtv = prop_term_vector(x, NO); xdtu1 = prop_done_tu1(x, NO); if (xtv && !xdtu1) { LinkConv lc; TreeNode *tu2; TermVector pre, post; tu2 = child_ref(x, 0); lc_init(&lc); lc_append_links(&lc, xtv->vec); tv_init(&pre); tv_init(&post); process_tanru_unit_2_args(tu2, &pre, &post, &lc); xdtu1 = prop_done_tu1(x, YES); } } nc = nt->nchildren; for (i=0; ichildren[i]; scan_tu1_phase2(c); } } } /*}}}*/ void terms_processing(TreeNode *top)/*{{{*/ { scan_tu1_phase1(top); scan_for_sentence_parents(top); scan_for_selbri_in_sumti(top); scan_tu1_phase2(top); } /*}}}*/ jbofihe-0.38/textout.c100644 765 764 14102 7350750743 14012 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/textout.c,v 1.3 2001/05/28 21:30:15 richard Exp $ Driver for producing plain text output from the glosser. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include #include "functions.h" #include "output.h" typedef enum { ST_OPEN, ST_TEXT, ST_CLOSE, ST_START } States; static States state; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void initialise(void) { state = ST_START; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_prologue(void) { return; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void write_epilog(void) { printf("\n"); return; } /* Number of end of lines that are pending. (These are only inserted when we have closed a sequence of close brackets, i.e. before the next open bracket or ordinary text.) */ static int pending_eols = 0; /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void clear_eols(void) { if (pending_eols > 0) { printf("\n\n"); state = ST_OPEN; pending_eols = 0; } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void set_eols(int eols) { pending_eols += eols; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_open_bracket(BracketType type, int subscript) { clear_eols(); switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf("("); break; case BR_SQUARE: printf("["); break; case BR_BRACE: printf("{"); break; case BR_ANGLE: printf("<"); break; case BR_CEIL: printf("^"); break; case BR_FLOOR: printf("^"); break; case BR_TRIANGLE: printf("<<"); break; } state = ST_OPEN; } /*++++++++++++++++++++++++++++++++++++++ BracketType type int subscript ++++++++++++++++++++++++++++++++++++++*/ static void write_close_bracket(BracketType type, int subscript) { switch (state) { case ST_START: case ST_CLOSE: case ST_TEXT: break; case ST_OPEN: printf(" "); break; } switch (type) { case BR_NONE: break; case BR_ROUND: printf(")"); break; case BR_SQUARE: printf("]"); break; case BR_BRACE: printf("}"); break; case BR_ANGLE: printf(">"); break; case BR_CEIL: printf("^"); break; case BR_FLOOR: printf("^"); break; case BR_TRIANGLE: printf(">>"); break; } state = ST_CLOSE; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_lojban_text(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } printf("%s", text); fflush(stdout); state = ST_TEXT; } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_special(char *text) { if (!strcmp(text, "$LEFTARROW")) { printf("<-"); } else if (!strcmp(text, "$OPENQUOTE")) { printf("``"); } else if (!strcmp(text, "$CLOSEQUOTE")) { printf("''"); } } /*++++++++++++++++++++++++++++++++++++++ char *text ++++++++++++++++++++++++++++++++++++++*/ static void write_translation(char *text) { switch (state) { case ST_START: case ST_OPEN: break; case ST_TEXT: case ST_CLOSE: printf(" "); break; } if (text[0] == '$') { write_special(text); } else { printf("/%s/", text); } state = ST_TEXT; /* fflush(stdout); */ } /*+ +*/ static int first_tag; /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tags(void) { printf("["); first_tag = 1; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void end_tags(void) { printf(":]"); state = ST_CLOSE; return; } /*++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++*/ static void start_tag(void) { if (!first_tag) { printf(", "); } first_tag = 0; } /*++++++++++++++++++++++++++++++++++++++ char *brivla char *place char *trans int brac ++++++++++++++++++++++++++++++++++++++*/ static void write_tag_text(char *brivla, char *place, char *trans, int brac) { if (brac) { printf("%s%s (%s)", brivla, place, trans); } else { printf("%s%s %s", brivla, place, trans); } } static void write_partial_tag_text(char *t)/*{{{*/ { printf("%s", t); } /*}}}*/ DriverVector textout_driver = /*{{{*/ { initialise, write_prologue, write_epilog, write_open_bracket, write_close_bracket, set_eols, write_lojban_text, write_translation, start_tags, end_tags, start_tag, write_tag_text, write_partial_tag_text };/*}}}*/ jbofihe-0.38/tracebk.c100644 765 764 13330 7350750743 13713 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/tracebk.c,v 1.5 2001/03/05 22:59:53 richard Exp $ Provide traceback capability when parse errors are encountered. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include "functions.h" #include "trctabs.c" #include "trcftabs.c" typedef struct { int state; int rule; } Reduction; static Reduction reductions[1024]; static int n_reductions=0; /* command line options in main.c */ extern int show_backtrace; extern int require_elidables; static void display_rule(int ruleno, int indent, int focus) { int i, j; char **toknames = require_elidables ? full_toknames : norm_toknames; unsigned short *ruleindex = require_elidables ? full_ruleindex : norm_ruleindex; unsigned short *rulelhs = require_elidables ? full_rulelhs : norm_rulelhs; unsigned short *rulerhs = require_elidables ? full_rulerhs : norm_rulerhs; for (i=0; i0) fprintf(stderr, " "); if (strncmp(toknames[rhs], "PRIVATE_", 8)) { fprintf(stderr, "%s", toknames[rulerhs[j]]); } if (i+1 == focus) { fprintf(stderr, " ."); } } fprintf(stderr, "\n"); } void report_trace_reduce(int stateno, int ruleno) { reductions[n_reductions].rule = ruleno; reductions[n_reductions].state = stateno; n_reductions++; } void report_trace_shift(int yychar, int yychar1) { /* After a successful shift, reduction list clears */ n_reductions = 0; } void report_trace_error(short *yyss, short *yyssp) { int i; short *s; unsigned short *stateindex = require_elidables ? full_stateindex : norm_stateindex; unsigned short *shiftrule = require_elidables ? full_shiftrule : norm_shiftrule; unsigned char *focus = require_elidables ? full_focus : norm_focus; unsigned short *shift_in_state = require_elidables ? full_shift_in_state : norm_shift_in_state; unsigned short *shift_in_state_index = require_elidables ? full_shift_in_state_index : norm_shift_in_state_index; char **toknames = require_elidables ? full_toknames : norm_toknames; /* This stuff is done here now instead of in yyerror. It means the token dump comes before the backtrace rather than after it, which makes more sense. */ fprintf(stderr, "--------------------\n"); fprintf(stderr, "SYNTAX ERROR IN TEXT\n"); fprintf(stderr, "--------------------\n"); print_last_toks(); fprintf(stderr, "--------------------\n"); /* If not doing backtrace, exit now. */ if (!show_backtrace) return; fprintf(stderr, "==============================================\n" "Rules reduced since misparsed token was read :\n" "==============================================\n"); if (n_reductions == 0) { fprintf(stderr," NONE\n"); } else { for (i=0; i r1) { for (r=r1; r=yyss; s--) { int r1, r2; int r; r1 = stateindex[*s], r2 = stateindex[*s+1]; fprintf(stderr, "State %d\n", *s); for (r=r1; r #include #include #include #include #include "functions.h" #include "canonluj.h" #include "morf.h" #include "dictaccs.h" /*}}}*/ extern int show_dictionary_defects; static char buffers[64][512]; static int bufptr=0; #define GETBUF() (&buffers[bufptr=(bufptr+1)&0x3f][0]) /* ================================================== */ typedef struct Component {/*{{{*/ int start; /* 0 for 1st, pos of + for others (before conversions) */ int pure_start; /* likewise, but just the gismu/cmavo excl conversions) */ char text[6]; int places[6]; } Component;/*}}}*/ /*{{{ Forward prototype for place/context translater. */ extern char *adv_translate(char *w, int place, TransContext ctx); static void split_into_comps(char *canon, Component *comp, int *ncomp); /*}}}*/ char * translate(char *word)/*{{{*/ { char *buf; char *res; buf = GETBUF(); res = dict_lookup(word); if (res) { strcpy(buf, res); return buf; } else { return NULL; } }/*}}}*/ static char * translate_lujvo(char *word, int place)/*{{{*/ /* Lookup a lujvo that isn't matched in the ordinary dictionary, by smashing it into consituent rafsi and glueing these together. */ { Component comp[32]; int ncomp; char *canon; char *result; char *trans; int i; int xplace; canon = canon_lujvo(word); if (!canon) return "?"; split_into_comps(canon, comp, &ncomp); if (ncomp < 2) { /* Prevent infinite recursion */ return NULL; } result = GETBUF(); result[0] = 0; for (i=0; i 0) { strcat(result, "-"); } if (trans) { strcat(result, trans); } else { strcat(result, "?"); } } return result; }/*}}}*/ char * translate_fuivla_prefix(char *w, int place, TransContext ctx)/*{{{*/ { char *canon; Component comp[32]; int n_comps; static char buffer[1024]; char *trans; int i; canon = canon_lujvo(w); split_into_comps(canon, comp, &n_comps); buffer[0] = 0; for (i=0; i] le A cu Y : case tag (T) We identify 4 classes of word. Different places of the same brivla may fall into different classes. These are (patterns shown in []) : (D) discrete noun [x1 is a _, x1 are _ (plural)] e.g. nanmu (x1 is a man) (S) substance noun [x1 is _, x1 is _-like] e.g. djacu [x1 is some water, x1 is water-like) (A) actor noun [x1 is a _ (actor), x1 _ (action verb)] e.g. bajra (x1 is a runner, x1 runs) (P) property (adjective) [x1 is _ (adjective)] e.g. badri (x1 is sad) (R) reverse property (adjective) [x1 is _ (adjective)] e.g. te ckana (x1 is supported by a bed) (I) 'idiomatic' [x1 is X-ing], but where verb doesn't support -er form e.g. kuspe (x1 is extending) (Perhaps some other classes will be defined later.) We write the entries in the dictionary like this nanmu1:D;man djacu1:S;water bajra1:A;run badri1:P;sad The glosses are generated according to the following table, where X is the gloss following the semicolon in the dictionary : CONTEXT CLASS | N(oun) V(erb) (4) Q(ualifier) T(ag) (2) --------+-------------------------------------------------------------------- D | X(s) (5) being X(s) (6) X-ish X(s) (6) | S | X being X (6) X-ish X (6) | A | X-er(s) (3) X-ing (3) X-ing (3) X-er(s) (3) | P | X thing(s) being X X X thing(s) | R | thing(s) X being X X thing(s) X | I | thing(s) X-ing X-ing X-ing thing(s) X-ing Notes (1) a->an if X starts with a vowel. (2) Glosses not put in for the x1 place, since they are apparent from the form of the gloss applied to the selbri itself. (3) Double final consonant of X where required (X ends in VC?) (4) Verb forms are written as participles for 2 reasons. First, they avoid worrying about to use is/are, plus using is/are looks silly with other than present tense. Second, it looks good as part of an abstraction (le nu nanmu) - this almost flows as real English! (5) (es) if word ends in s, z, ch. (ies) if it ends in (-Cy). (6) Replace X or X(s) by the noun form, if a special noun entry is found in the dictionary (unless then overridden by an explicit V or T entry) If this ruleset is insufficient for some reason, some of the glosses can be specifically provided. For example, the DN combination for nanmu1 will give the gloss 'man(s)', which is bad. In this case, the NVQT context can be specified~: nanmu1n:man/men In this case, the verb form will automatically become 'being a man/men', unless a nanmu1v entry is found. ------------------- Other horrors to look into : lo X should gloss as 'a,any' for D,A,P and 'some' for S */ /*}}}*/ static char consonants[] = "bcdfghjklmnpqrstvwxz"; static char vowels[] = "aeiou"; static int starts_with_preposition(char *x)/*{{{*/ { char *y; y = x; while (isspace(*y)) y++; if (!strncmp(y, "in", 2) || !strncmp(y, "at", 2) || !strncmp(y, "with", 4) || !strncmp(y, "through", 7) ) { return 1; } else { return 0; } }/*}}}*/ static char * basic_trans(char *x)/*{{{*/ /* Remove the '*' markers from a translation (only really applies to discrete class words being used as qualifiers, so far). */ { char *result, *p, *q; result = GETBUF(); p = x, q = result; while (*p) { if (p[0] != '*' || !isspace(p[1])) { *q++ = *p; } p++; } *q = 0; return result; }/*}}}*/ static int is_ok_after_star(char x)/*{{{*/ { return (!x || isspace(x) || x == '/'); } /*}}}*/ static char * make_plural(char *x)/*{{{*/ /* Make a word plural, applying standard English rules for when to use -es or -ies instead of plain -s. */ { char *result; int n; char *star_pos; result = GETBUF(); star_pos = strchr(x, '*'); if (star_pos && is_ok_after_star(star_pos[1])) { char head[1024]; char *result2; char *p, *q; result2 = GETBUF(); p = x, q = head; while (p < star_pos) *q++ = *p++; *q = 0; p++; strcpy(result2, make_plural(head)); if (strchr(p, '*')) { strcat(result2, make_plural(p)); } else { strcat(result2, p); } return result2; } else { n = strlen(x); if (n>0 && (x[n-1] == 's' || x[n-1] == 'z' || x[n-1] == 'x')) { sprintf(result, "%s(es)", x); } else if (n>1 && x[n-1] == 'h' && x[n-2] == 'c') { sprintf(result, "%s(es)", x); } else if (n>1 && x[n-1] == 'y' && strchr(consonants, x[n-2])) { sprintf(result, "%s(ies)", x); } else { sprintf(result, "%s(s)", x); } return result; } }/*}}}*/ static char * append_er(char *x)/*{{{*/ { static char result[128]; int n; char *star_pos; star_pos = strchr(x, '*'); if (star_pos && is_ok_after_star(star_pos[1])) { char head[1024]; char *result2; char *p, *q; result2 = GETBUF(); p = x, q = head; while (p < star_pos) *q++ = *p++; *q = 0; p++; strcpy(result2, append_er(head)); if (!starts_with_preposition(p)) { strcat(result2, " of"); } if (strchr(p, '*')) { strcat(result2, append_er(p)); } else { strcat(result2, p); } return result2; } else { n = strlen(x); if (n > 0 && x[n-1] == 'e') { sprintf(result, "%s-r(s)", x); } else { sprintf(result, "%s-er(s)", x); } return result; } }/*}}}*/ static char * append_ing(char *x)/*{{{*/ { static char result[128]; int n; char *star_pos; star_pos = strchr(x, '*'); if (star_pos && is_ok_after_star(star_pos[1])) { char head[1024]; char *result2; char *p, *q; result2 = GETBUF(); p = x, q = head; while (p < star_pos) *q++ = *p++; *q = 0; p++; strcpy(result2, append_ing(head)); if (strchr(p, '*')) { strcat(result2, append_ing(p)); } else { strcat(result2, p); } return result2; } else { n = strlen(x); if (n > 1 && x[n-1] == 'e' && !strchr(vowels, x[n-2])) { strncpy(result, x, n-1); result[n-1] = 0; strcat(result, "-ing"); } else { sprintf(result, "%s-ing", x); } return result; } }/*}}}*/ static char * translate_pattern(char *w, int place, char *suffix)/*{{{*/ { char *new_start = NULL; int swap; static char result[128]; char *buffer, *buffer2; char *trans; return NULL; if (!strncmp("sel", w, 3)) { new_start = w+3; swap = 2; } else if (!strncmp("ter", w, 3)) { new_start = w+3; swap = 3; } else if (!strncmp("vel", w, 3)) { new_start = w+3; swap = 4; } else if (!strncmp("xel", w, 3)) { new_start = w+3; swap = 5; } if (new_start) { if (*new_start == 'y') { new_start++; } if (place == 1) { place = swap; } else if (place == swap) { place = 1; } buffer = GETBUF(); /* FIXME - if we're left with a 3 letter rafsi, we ought to look up the gismu it corresponds to and translate that. */ if (strlen(new_start) < 5) { sprintf(buffer,"@%s", new_start); trans = translate(buffer); if (!trans) { /* Invalid rafsi? or one derived from a cmavo. In either case, we've no way of getting a default place structure for it. */ return NULL; } buffer2 = GETBUF(); strcpy(buffer2, trans); new_start = buffer2; } sprintf(buffer, "%s%1d%s", new_start, place, suffix); trans = translate(buffer); if (trans) { strcpy(result, trans); return result; } else { sprintf(buffer, "%s%1d", new_start, place); trans = translate(buffer); if (trans) { strcpy(result, trans); strcat(result, "??"); return result; } else { return NULL; } } } else { return NULL; } }/*}}}*/ char * fix_trans_in_context(char *src, char *trans, TransContext ctx, char *w1n, int found_full_trans)/*{{{*/ { enum {CL_DISCRETE, CL_SUBSTANCE, CL_ACTOR, CL_PROPERTY, CL_REVERSE_PROPERTY, CL_IDIOMATIC} wordclass; char *result; char w1[128]; result = GETBUF(); if (trans[1] == ';') { switch (trans[0]) { case 'D': case 'E': /* place holder for adding 'event' type later */ wordclass = CL_DISCRETE; break; case 'S': wordclass = CL_SUBSTANCE; break; case 'A': wordclass = CL_ACTOR; break; case 'P': wordclass = CL_PROPERTY; break; case 'R': wordclass = CL_REVERSE_PROPERTY; break; case 'I': wordclass = CL_IDIOMATIC; break; default: if (show_dictionary_defects) { fprintf(stderr, "Dictionary contains bogus extended entry for [%s]\n", src); } return NULL; break; } strcpy(w1, trans+2); switch (wordclass) { case CL_DISCRETE: switch (ctx) { case TCX_NOUN: strcpy(result, make_plural(w1)); break; case TCX_VERB: if (*w1n) { sprintf(result, "being %s", w1n); } else { sprintf(result, "being %s", make_plural(w1)); } break; case TCX_QUAL: strcpy(result, basic_trans(w1)); strcat(result, "-ish"); break; case TCX_TAG: if (*w1n) { strcpy(result, w1n); } else { strcpy(result, make_plural(w1)); } break; } break; case CL_SUBSTANCE: switch (ctx) { case TCX_NOUN: strcpy(result, basic_trans(w1)); break; case TCX_VERB: if (*w1n) { sprintf(result, "being %s", w1n); } else { sprintf(result, "being %s", w1); } break; case TCX_QUAL: strcpy(result, w1); strcat(result, "-ish"); break; case TCX_TAG: if (*w1n) { strcpy(result, w1n); } else { strcpy(result, w1); } break; } break; case CL_ACTOR: switch (ctx) { case TCX_NOUN: case TCX_TAG: strcpy(result, append_er(w1)); break; case TCX_VERB: case TCX_QUAL: strcpy(result, append_ing(w1)); break; } break; case CL_PROPERTY: switch (ctx) { case TCX_NOUN: sprintf(result, "%s thing(s)", w1); break; case TCX_VERB: sprintf(result, "being %s", w1); break; case TCX_QUAL: strcpy(result, w1); break; case TCX_TAG: sprintf(result, "%s thing(s)", w1); break; } break; case CL_REVERSE_PROPERTY: switch (ctx) { case TCX_NOUN: sprintf(result, "thing(s) %s", w1); break; case TCX_VERB: sprintf(result, "being %s", w1); break; case TCX_QUAL: strcpy(result, w1); break; case TCX_TAG: sprintf(result, "thing(s) %s", w1); break; } break; case CL_IDIOMATIC: { char tempbuf[1024]; strcpy(tempbuf, append_ing(w1)); switch (ctx) { case TCX_NOUN: case TCX_TAG: sprintf(result, "thing(s) %s", tempbuf); break; case TCX_VERB: case TCX_QUAL: strcpy(result, tempbuf); break; } } break; } return result; } else { if (!found_full_trans && show_dictionary_defects) { fprintf(stderr, "No advanced entry for [%s]\n", src); } /* Either it's not an advanced entry, we have to just return the word as-is, OR the word1n form matched. */ return trans; } }/*}}}*/ static char * subst_base_in_pattern(char *trans, char *base)/*{{{*/ { char *result = GETBUF(); char *p, *q, *r; char *localtrans; q = result; p = trans; while (*p) { if (*p == '%') { int place = *++p - '0'; char context = *++p; TransContext ctx; switch (context) { case 'n': ctx = TCX_NOUN; break; case 'v': ctx = TCX_VERB; break; case 'q': ctx = TCX_QUAL; break; case 't': ctx = TCX_TAG; break; default: ctx = TCX_NOUN; if (show_dictionary_defects) { fprintf(stderr, "Broken base context for %s\n", trans); } break; } localtrans = adv_translate(base, place, ctx); r = localtrans; while (*r) { *q++ = *r++; } ++p; /* onto the char beyond the context symbol */ } else { *q++ = *p++; } } *q = 0; return result; }/*}}}*/ static void split_into_comps(char *canon, Component *comp, int *ncomp)/*{{{*/ /* Take a string a+b+c and split it into an array of components separated by + signs. If any components are se, te etc, bind them as place exchanges to the following component. */ { int i; int nc = 0; char buffer[256]; char *p, *q; int place = 0; strcpy(buffer, canon); p = buffer; while (*p) p++; while (p > buffer) { while (p > buffer && *p != '+') p--; place = 0; q = p + (*p == '+'); if (!strcmp(q, "se")) { place = 2; } else if (!strcmp(q, "te")) { place = 3; } else if (!strcmp(q, "ve")) { place = 4; } else if (!strcmp(q, "xe")) { place = 5; } if (place > 0) { int t = comp[0].places[1]; comp[0].places[1] = comp[0].places[place]; comp[0].places[place] = t; comp[0].start = (p - buffer); } else { for (i=nc-1; i>=0; i--) { comp[i+1] = comp[i]; } for (i=1; i<=5; i++) { comp[0].places[i] = i; } nc++; comp[0].pure_start = comp[0].start = (p - buffer); strcpy(comp[0].text, q); } *p = 0; } *ncomp = nc; }/*}}}*/ static char * lookup_template_match(int prec, int suffix, int gather, char *orig, Component *comp, int ncomp, int place, TransContext ctx)/*{{{*/ { char generic[128]; /* the part that's found in the LHS of the dictionary pattern match */ char specific[256]; /* the other part of the string */ char buffer[256]; int cutg, cuts; int new_place; char *ctx_suf_as_string[4] = {"n", "v", "q", "t"}; char *trans; int got_full_trans; char * subst; if (suffix) { cutg = comp[ncomp-gather].pure_start; cuts = comp[ncomp-gather].start; strcpy(generic, orig + cutg); strncpy(specific, orig, cuts); specific[cuts] = 0; new_place = comp[ncomp-gather].places[place]; } else { cutg = comp[gather].start + 1; cuts = cutg; strncpy(generic, orig, cutg); generic[cutg] = 0; strcpy(specific, orig + cuts); new_place = comp[gather-1].places[place]; } sprintf(buffer, "*%1d%s%1d%s", prec, generic, new_place, ctx_suf_as_string[(int) ctx]); trans = translate(buffer); if (trans) { got_full_trans = 1; } else { got_full_trans = 0; sprintf(buffer, "*%1d%s%1d", prec, generic, new_place); trans = translate(buffer); } if (trans) { if (trans[0] == '@') { /* redirection to another form */ int redir_place = trans[1] - '0'; return adv_translate(specific, redir_place, ctx); } else { /* Need to substitute % stuff. */ subst = subst_base_in_pattern(trans, specific); if (got_full_trans) { return subst; } else { char buffer1[256], *trans1, w1n[256]; sprintf(buffer1, "*%1d%s%1dn", prec, generic, new_place); trans1 = translate(buffer1); if (trans1) { strcpy(w1n, trans1); } else { w1n[0] = 0; } return fix_trans_in_context(buffer, subst, ctx, w1n, got_full_trans); } } } else { return NULL; } }/*}}}*/ static char * attempt_pattern_match(char *w, int place, TransContext ctx)/*{{{*/ /* Try to match the Lojban word with various standard forms which the dictionary provides. Return NULL on no match. */ { char *canon; char *trans; Component comp[32]; int ncomp; canon = canon_lujvo(w); /* Bail out now if it's not a lujvo that can be split up. */ if (!canon) return NULL; /* If it's not got a '+' in it, give up too. */ if (!strchr(canon, '+')) return NULL; /* Split components into array. Work from the right. */ split_into_comps(canon, comp, &ncomp); #if 0 { int i; for (i=0; i= 0; prec--) { for (suffix = 1; suffix >= 0; suffix--) { for (gather = 1; gather <= 2; gather++) { trans = lookup_template_match(prec, suffix, gather, canon, comp, ncomp, place, ctx); if (trans) { if (strcmp(trans, "-")) { /* didn't match */ return trans; } } else { break; /* out of gather loop */ } } } } } return NULL; }/*}}}*/ char * adv_translate(char *w, int place, TransContext ctx)/*{{{*/ { char *trans, *trans1; char w1n[128]; char buffer[1024], buffer1[1024]; static char result[1024]; char ctx_suffix[4] = "nvqt"; char *ctx_suf_as_string[4] = {"n", "v", "q", "t"}; int found_full_trans=0; /* Special case. A request for place 0 is mapped to a request for the x1 verb form. This is to represent an 'infinitive' form required for translating things like jai bau cusku. */ if (place == 0) { place = 1; ctx = TCX_VERB; } /* Try looking up the explicit gloss asked for */ sprintf(buffer, "%s%1d%c", w, place, ctx_suffix[ctx]); trans = translate(buffer); if (trans) { found_full_trans = 1; } if (!trans) { /* OK, no full translation found. Lookup the wn form */ sprintf(buffer, "%s%1d", w, place); trans = translate(buffer); if (!trans) { /* Try to match sel..., ter..., ...mau etc */ trans = translate_pattern(w, place, ""); } } if (!trans) { /* Try to match sel..., ter..., ...mau etc */ trans = translate_pattern(w, place, ctx_suf_as_string[ctx]); } if (trans) { if (trans[0] == '@') { char *p, *q; int pos; p = buffer; q = trans+1; while (isalpha(*q)) { *p++ = *q++; } *p = 0; if (isdigit(*q)) { pos = *q - '0'; return adv_translate(buffer, pos, ctx); } else { if (show_dictionary_defects) { fprintf(stderr, "Error in dictionary entry for place %d of %s\n", place, w); } return "??"; } /* Never get here */ } sprintf(buffer1, "%s%1dn", w, place); trans1 = translate(buffer1); if (trans1) { strcpy(w1n, trans1); } else { w1n[0] = 0; } strcpy(result, fix_trans_in_context(buffer, trans, ctx, w1n, found_full_trans)); return result; } else { /* If we can't get any place-dependent translation, don't bother - the gismu headword entry is probably misleading and does more harm than good. */ if (show_dictionary_defects) { fprintf(stderr, "No advanced entry for [%s]\n", buffer); } trans = translate(w); if (trans) { strcpy(result, trans); strcat(result, "??"); return result; } else { /* Try to get pattern match for word */ if (show_dictionary_defects) { fprintf(stderr, "No dictionary entry for [%s], attempting pattern match\n", w); } trans = attempt_pattern_match(w, place, ctx); if (trans) { return trans; } if (show_dictionary_defects) { fprintf(stderr, "No dictionary entry for [%s], attempting to break up as lujvo\n", w); } trans = translate_unknown(w, place, ctx); if (trans) { strcpy(result, trans); strcat(result, "??"); return result; } else { strcpy(result, "??"); return result; } } } }/*}}}*/ jbofihe-0.38/version.txt100644 765 764 52 7350750743 14277 0ustar richardruserchar version_string[] = "$Name: V0_38 $"; jbofihe-0.38/tree.c100644 765 764 42154 7350750743 13245 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/tree.c,v 1.12 2001/06/22 22:16:04 richard Exp $ Functions to manipulate and print the parse tree. ***************************************/ /********************************************************************** * Copyright (C) Richard P. Curnow 1998-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * *********************************************************************/ #include #include #include #include "nonterm.h" #include "functions.h" #include "cmavotab.h" #include "rpc_tab.h" /*++++++++++++++++++++++++++++++ Work through the tree and eliminate any nodes that only have single children, by raising their children up to their status. ++++++++++++++++++++++++++++++*/ void compress_singletons(TreeNode *x) { int i, n; TreeNode *child, *grandchild; if (x->type == N_NONTERM) { n = x->data.nonterm.nchildren; for (i=0; idata.nonterm.children[i]; while ((child->type == N_NONTERM) && (child->data.nonterm.nchildren == 1)) { grandchild = child->data.nonterm.children[0]; free_node(child); child = x->data.nonterm.children[i] = grandchild; } compress_singletons(child); } } } /*++++++++++++++++++++++++++++++ Work through the tree and eliminate any nodes that only have single children, by raising their children up to their status. However, particular types of node are not compressed - those which are required for producing particular formatted outputs. ++++++++++++++++++++++++++++++*/ void compress_singletons_but_preserve(TreeNode *x) { int i, n; TreeNode *child, *grandchild; if (x->type == N_NONTERM) { n = x->data.nonterm.nchildren; for (i=0; idata.nonterm.children[i]; while ((child->type == N_NONTERM) && (child->data.nonterm.nchildren == 1)) { grandchild = child->data.nonterm.children[0]; free_node(child); child = x->data.nonterm.children[i] = grandchild; } compress_singletons(child); } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void show_indent(int indent) { int i; for (i=indent; i>0; i--) { if (i == 1) { printf("+-"); } else { printf("| "); } } } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ static void print_tree(TreeNode *x, int indent) { int i, n; if (x->type == N_NONTERM) { n = x->data.nonterm.nchildren; for (i=0; idata.nonterm.children[i], indent+1); } } /* Print node itself */ if (x->type != N_MARKER) { show_indent(indent); } switch (x->type) { case N_NONTERM: printf("%s\n", nonterm_names[x->data.nonterm.type]); break; case N_MARKER: break; /* No need to display */ case N_CMAVO: { int code = x->data.cmavo.code; if (prop_elidable(x, NO)) { printf("CMAVO : %s [%s]\n", make_uppercase(cmavo_table[code].cmavo), selmao_names[cmavo_table[code].ssm_code]); } else { printf("CMAVO : %s [%s]\n", cmavo_table[code].cmavo, selmao_names[cmavo_table[code].ssm_code]); if (cmavo_table[code].selmao == UI) { XCaiIndicator *xci; if (prop_neg_indicator(x, NO)) { show_indent(indent); printf("CMAVO : nai [NAI]\n"); } xci = prop_cai_indicator(x, NO); if (xci) { switch (xci->code) { case CC_CAI: show_indent(indent); printf("CMAVO : cai [CAI]\n"); break; case CC_SAI: show_indent(indent); printf("CMAVO : sai [CAI]\n"); break; case CC_RUhE: show_indent(indent); printf("CMAVO : ru'e [CAI]\n"); break; case CC_CUhI: show_indent(indent); printf("CMAVO : cu'i [CAI]\n"); break; case CC_PEI: show_indent(indent); printf("CMAVO : pei [CAI]\n"); break; case CC_CAINAI: show_indent(indent); printf("CMAVO : cai [CAI]\n"); show_indent(indent); printf("CMAVO : nai [NAI]\n"); break; case CC_SAINAI: show_indent(indent); printf("CMAVO : sai [CAI]\n"); show_indent(indent); printf("CMAVO : nai [NAI]\n"); break; case CC_RUhENAI: show_indent(indent); printf("CMAVO : ru'e [CAI]\n"); show_indent(indent); printf("CMAVO : nai [NAI]\n"); break; case CC_PEINAI: show_indent(indent); printf("CMAVO : pei [CAI]\n"); show_indent(indent); printf("CMAVO : nai [NAI]\n"); break; } } } else if (cmavo_table[code].selmao == CAI) { if (prop_neg_indicator(x, NO)) { printf("CMAVO : nai [NAI]\n"); } } } } break; case N_ZOI: printf("ZOI : %s\n", x->data.zoi.text); break; case N_ZO: printf("ZO : %s\n", x->data.zo.text); break; case N_LOhU: printf("LOhU : %s\n", x->data.lohu.text); break; case N_ZEI: printf("ZEI : %s\n", x->data.zei.sep_with_zei); break; case N_BU: printf("BU : %s\n", x->data.bu.word); break; case N_BRIVLA: printf("BRIVLA : %s\n", x->data.brivla.word); break; case N_CMENE: printf("CMENE : %s\n", x->data.cmene.word); break; default: printf("OTHER?\n"); break; } } /*++++++++++++++++++++++++++++++ Give a rough print-out of the parse tree. ++++++++++++++++++++++++++++++*/ void print_parse_tree(TreeNode *x) { print_tree(x, 0); } /*++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++*/ typedef enum { B_OPEN, B_TEXT, B_CLOSE } State; #define SPACE_B4_TEXT \ do { \ if (*state == B_TEXT || *state == B_CLOSE) { \ printf(" "); \ } \ *state = B_TEXT; \ } while (0) static int pending_eols = 0; static int do_glossing = 0; static void clear_eols(State *state) { int i; if (pending_eols > 0) { for (i=0; i"); break; } } typedef enum { CV_NORMAL, CV_2, CV_3, CV_4, CV_5 } Conversion; /*++++++++++++++++++++++++++++++ Print out 'raw' bracketed version of the text ++++++++++++++++++++++++++++++*/ static void print_bracketed(TreeNode *x, int depth, State *state, Conversion conv) { int i, n; TreeNode *c1, *c2; Conversion child_conv; char *english; char buffer[2048]; if (x->type == N_NONTERM) { clear_eols(state); if (*state == B_TEXT || *state == B_CLOSE) { printf(" "); } print_open(depth); *state = B_OPEN; n = x->data.nonterm.nchildren; for (i=0; i 0) { c1 = x->data.nonterm.children[i-1]; c2 = x->data.nonterm.children[i]; if (c1->type == N_CMAVO && c1->data.cmavo.selmao == SE) { /* Attempt conversion of this value */ if (!strcmp(cmavo_table[c1->data.cmavo.code].cmavo, "se")) { child_conv = CV_2; } else if (!strcmp(cmavo_table[c1->data.cmavo.code].cmavo, "te")) { child_conv = CV_3; } else if (!strcmp(cmavo_table[c1->data.cmavo.code].cmavo, "ve")) { child_conv = CV_4; } else if (!strcmp(cmavo_table[c1->data.cmavo.code].cmavo, "xe")) { child_conv = CV_5; } else { child_conv = CV_NORMAL; } print_bracketed(x->data.nonterm.children[i], depth + 1, state, child_conv); } else { print_bracketed(x->data.nonterm.children[i], depth + 1, state, CV_NORMAL); } } else { print_bracketed(x->data.nonterm.children[i], depth + 1, state, CV_NORMAL); } } print_close(depth); *state = B_CLOSE; } else { clear_eols(state); switch (x->type) { case N_CMAVO: SPACE_B4_TEXT; if (prop_elidable(x, NO)) { printf("%s", make_uppercase(cmavo_table[x->data.cmavo.code].cmavo)); } else { int code = x->data.cmavo.code; printf("%s", cmavo_table[code].cmavo); if (cmavo_table[code].selmao == UI) { XCaiIndicator *xci; if (prop_neg_indicator(x, NO)) { printf(" nai"); } xci = prop_cai_indicator(x, NO); if (xci) { switch (xci->code) { case CC_CAI: printf(" cai"); break; case CC_SAI: printf(" sai"); break; case CC_RUhE: printf(" ru'e"); break; case CC_CUhI: printf(" cu'i"); break; case CC_PEI: printf(" pei"); break; case CC_CAINAI: printf(" cai nai"); break; case CC_SAINAI: printf(" sai nai"); break; case CC_RUhENAI: printf(" ru'e nai"); break; case CC_PEINAI: printf(" pei"); break; } } } else if (cmavo_table[code].selmao == CAI) { if (prop_neg_indicator(x, NO)) { printf(" nai"); } } } if (do_glossing) { if (x->data.cmavo.selmao == BAI) { english = NULL; switch (conv) { case CV_NORMAL: english = translate(cmavo_table[x->data.cmavo.code].cmavo); break; case CV_2: strcpy(buffer, "se"); strcat(buffer, cmavo_table[x->data.cmavo.code].cmavo); english = translate(buffer); break; case CV_3: strcpy(buffer, "te"); strcat(buffer, cmavo_table[x->data.cmavo.code].cmavo); english = translate(buffer); break; case CV_4: strcpy(buffer, "ve"); strcat(buffer, cmavo_table[x->data.cmavo.code].cmavo); english = translate(buffer); break; case CV_5: strcpy(buffer, "xe"); strcat(buffer, cmavo_table[x->data.cmavo.code].cmavo); english = translate(buffer); break; } if (english) { printf(" /%s*/", english); } } else { english = translate(cmavo_table[x->data.cmavo.code].cmavo); if (english) { printf(" /%s/", english); } } } break; case N_ZOI: SPACE_B4_TEXT; printf("zoi %s %s %s", x->data.zoi.term, x->data.zoi.text, x->data.zoi.term); break; case N_ZO: SPACE_B4_TEXT; printf("zo %s", x->data.zo.text); break; case N_ZEI: print_open(depth+1); *state = B_OPEN; SPACE_B4_TEXT; printf("%s\n", x->data.zei.sep_with_zei); print_close(depth+1); *state = B_CLOSE; break; case N_LOhU: if (*state == B_TEXT || *state == B_CLOSE) { printf(" "); } print_open(depth+1); *state = B_OPEN; SPACE_B4_TEXT; printf("lo'u %s le'u", x->data.lohu.text); print_close(depth+1); *state = B_CLOSE; break; case N_BU: SPACE_B4_TEXT; printf("%s bu", x->data.bu.word); break; case N_BRIVLA: SPACE_B4_TEXT; printf("%s", x->data.brivla.word); if (do_glossing) { english = NULL; if (conv == CV_NORMAL) { english = translate(x->data.brivla.word); if (!english) { english = translate_unknown(x->data.brivla.word, 1, TCX_NOUN); } if (english) { printf(" /%s/", english); } } else { switch (conv) { case CV_NORMAL: abort(); case CV_2: strcpy(buffer, x->data.brivla.word); strcat(buffer, "2"); english = translate(buffer); break; case CV_3: strcpy(buffer, x->data.brivla.word); strcat(buffer, "3"); english = translate(buffer); break; case CV_4: strcpy(buffer, x->data.brivla.word); strcat(buffer, "4"); english = translate(buffer); break; case CV_5: strcpy(buffer, x->data.brivla.word); strcat(buffer, "5"); english = translate(buffer); break; } if (english) { printf(" /%s*/", english); } else { english = translate(x->data.brivla.word); if (!english) { english = translate_unknown(x->data.brivla.word, 1, TCX_NOUN); } if (english) { printf(" /%s/", english); } } } } break; case N_CMENE: SPACE_B4_TEXT; printf("%s", x->data.cmene.word); break; default: break; } pending_eols = x->eols; } } /*++++++++++++++++++++++++++++++ Print out the text with bracketing as per the LLG version ++++++++++++++++++++++++++++++*/ void print_bracketed_text(TreeNode *top, int gloss) { State state = B_OPEN; do_glossing = gloss; print_bracketed(top, 0, &state, CV_NORMAL); printf("\n"); } /*++++++++++++++++++++++++++++++ Go through the tree and find any nodes to which a BAhE or UI-chain were attached by the lexer. Expand the node into a nonterminal and push all the things in as children. ++++++++++++++++++++++++++++++*/ static void expand_bahe_ui_internal(TreeNode *x, int pos) { TreeNode *nn, *y, *nz, *z, *c; int n, i, j, n_ui, n_b, ui_start; y = x->data.nonterm.children[pos]; if (y->type == N_NONTERM) { n = y->data.nonterm.nchildren; for (i=0; ibahe || (y->ui_next != (TreeNode *) &y->ui_next)) { nn = new_node(); nn->type = N_NONTERM; for (z = y->bahe, n_b = 0; z; z = z->bahe) { n_b++; } n_ui = 0; for (c=y->ui_next; c != (TreeNode *) &y->ui_next; c = c->next) { n_ui++; } nn->data.nonterm.type = AUGMENTED; nn->data.nonterm.brackets = BR_NONE; nn->data.nonterm.nchildren = n_b + 1 + n_ui; nn->data.nonterm.children = new_array(TreeNode *, nn->data.nonterm.nchildren); j = 0; for (z = y->bahe; z; z = nz) { nn->data.nonterm.children[n_b - ++j] = z; nz = z->bahe; z->bahe = NULL; } nn->data.nonterm.children[j++] = y; ui_start = j; for (c=y->ui_next; c != (TreeNode *) &y->ui_next; c = c->next) { nn->data.nonterm.children[j++] = c; } y->ui_next = y->ui_prev = (TreeNode *) &y->ui_next; x->data.nonterm.children[pos] = nn; /* And handle the case that the UI chain itself may have BAhE tokens in front of some of its members */ for (j=ui_start; jdata.nonterm.nchildren; j++) { expand_bahe_ui_internal(nn, j); } } } } /*++++++++++++++++++++++++++++++ Externally callable version ++++++++++++++++++++++++++++++*/ void expand_bahe_ui(TreeNode *top) { int i, n; if (top->type == N_NONTERM) { n = top->data.nonterm.nchildren; for (i=0; i\/\* {BEGIN COMMENT; depth = 1;} \/\*\ error\ \*\/ { ECHO; } \/\*\ ET\ [A-Zh]+\ \*\/ { ECHO; } \/\* {depth++;} \*\/ {depth--; if (depth==0) {BEGIN INITIAL;}} . { /* discard */ } \n { /* discard */ } . { ECHO; } \n { ECHO; } %% int main() { yylex(); return 0; } jbofihe-0.38/vlatai.1100644 765 764 2721 7350750743 13460 0ustar richardruser.TH "vlatai" 1L "December 2000" .SH NAME vlatai \- Lojban word analyzer .SH SYNOPSIS .B vlatai [ -v ] [ word ] .SH DESCRIPTION .I vlatai is a program that reads a list of Lojban words from standard input, one word per line. In its usual mode, it writes a single output line for each input line, advising of which kind of Lojban word the input line is. If the input word has cmavo prefixed onto it, vlatai shows the individual cmavo and the base word itself. .P In the verbose mode (obtained using -v), the workings of the internal state machines used for scanning the word are exposed. This may give some insight into where an error lies on words that can't be parsed, especially if the output is used in conjuction with the report files built during the compilation process. .P Note that vlatai is primarily a testbench for the word categorizer/splitter inside jbofihe. vlatai is not fully supported or documented as a stand-alone program. .SH OPTIONS .TP .B -v Verbose; show lots of information about the evolution of the internal state .TP .B word The word to check. If no 'word' argument is supplied, the program reads words from standard input, one word per line (with \fBno\fP whitespace around it.) .SH REFERENCES .TP .B http://go.to/jbofihe Home page for the jbofihe project (of which cmafihe is part) .TP .B http://www.lojban.org/ Home page of the Lojban community .TP .B http://www.rrbcurnow.freeuk.com/lojban/ My Lojban page. .SH AUTHOR Richard Curnow .B jbofihe-0.38/contrib/ 40755 765 764 0 7350750743 13457 5ustar richardruserjbofihe-0.38/contrib/emacs_functions100644 765 764 1253 7350750743 16660 0ustar richardruser;;bjoern gohla 31.03.2001 ;;attach this to your emacs init file ;;you will probably want to adjust program path and options (defun lojban-gloss () "" (interactive "_") (shell-command-on-region (region-beginning) (region-end) "~/lojban/jbofihe-0.35/cmafihe -b") ) (global-set-key "\C-x=" 'lojban-gloss) (defun lojban-parse () "" (interactive "_") (shell-command-on-region (region-beginning) (region-end) "~/lojban/jbofihe-0.35/jbofihe") ) (global-set-key "\C-x-" 'lojban-parse) jbofihe-0.38/dfasyn/ 40755 765 764 0 7350750743 13303 5ustar richardruserjbofihe-0.38/dfasyn/Makefile100644 765 764 2340 7350750743 15037 0ustar richardruser# $Header: /cvs/src/jbofihe/dfasyn/Makefile,v 1.1 2001/07/12 21:15:35 richard Exp $ # # Makefile for NFA->DFA conversion utility # # Copyright (C) Richard P. Curnow 2000-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # CC=gcc #CFLAGS=-g #CFLAGS=-O2 -pg CFLAGS=-O2 OBJ = parse.o scan.o n2d.o expr.o tabcompr.o compdfa.o all : dfasyn dfasyn : $(OBJ) $(CC) $(CFLAGS) -o dfasyn $(OBJ) parse.c parse.h : parse.y bison -v -d parse.y mv parse.tab.c parse.c mv parse.tab.h parse.h parse.o : parse.c n2d.h scan.c : scan.l flex -t -s scan.l > scan.c scan.o : scan.c parse.h n2d.h clean: rm dfasyn *.o scan.c parse.c parse.h parse.output jbofihe-0.38/dfasyn/compdfa.c100644 765 764 23633 7350750743 15204 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dfasyn/compdfa.c,v 1.1 2001/07/12 21:15:35 richard Exp $ Routines for compressing the DFA by commoning-up equivalent states ***************************************/ /* Copyright (C) Richard P. Curnow 2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ /* The input to this stage is the 'raw' DFA build from the NFA by the subset construction. Depending on the style of the NFA, there may be large chunks of the DFA that have equivalent functionality, in terms of resulting in the same exit value for the same sequence of input tokens, but which are reached by different prefixes. The idea of this stage is to common up such regions, to reduce the size of the DFA and hence the table sizes that are generated. Conceptually, the basis of the algorithm is to assign the DFA states to equivalence classes. If there are N different exit values, there are initially N+1 classes. All states that can exit with a particular value are placed in a class together, and all non-accepting states are placed together. Now, a pass is made over all pairs of states. Two states remain equivalent if for each token, their outbound transitions go to states in the same class. If the states do not stay equivalent, the class they were in is split accordingly. This is repeated again and again until no more bisections occur. The algorithm actually used is to assign an ordering to the states based on their current class and outbound transitions. The states are then sorted. This allows all checking to be done on near-neighbours in the sequence generated by the sort, which brings the execution time down to something finite. */ #include "n2d.h" static int last_eq_class; /* Next class to assign */ static int Nt; /* Number of tokens; has to be made static to be visible to comparison fn. */ /* To give 'general_compre' visibility of the current equiv. classes of the destination states */ static DFANode **local_dfas; static void calculate_signatures(DFANode **seq, DFANode **dfas, int ndfas)/*{{{*/ /**** Determine state signatures based on transitions and current classes. ****/ { unsigned long sig; int i, t; for (i=0; imap[t]; if (di >= 0) { DFANode *d = dfas[di]; int deq_class = d->eq_class; sig = increment(sig, deq_class & 0xf); /* 16 bit pairs in sig */ } } s->signature = sig; } } /*}}}*/ static int general_compare(const void *a, const void *b)/*{{{*/ /************************* Do full compare on states *************************/ { Castderef (a, const DFANode *, aa); Castderef (b, const DFANode *, bb); if (aa->eq_class < bb->eq_class) { return -1; } else if (aa->eq_class > bb->eq_class) { return +1; } else if (aa->signature < bb->signature) { return -1; } else if (aa->signature > bb->signature) { return +1; } else { /* The hard way... */ int i; for (i=0; imap[i]; int bm = bb->map[i]; /* Map transition destinations to the current equivalence class of the destination state (otherwise compressor is very pessimistic). */ am = (am>=0) ? local_dfas[am]->eq_class: -1; bm = (bm>=0) ? local_dfas[bm]->eq_class: -1; if (am < bm) return -1; else if (am > bm) return +1; } } /* If you get here, the states are still equivalent */ return 0; } /*}}}*/ static int split_classes(DFANode **seq, DFANode **dfas, int ndfas)/*{{{*/ /*********************** Do one pass of class splitting ***********************/ { int i; int had_to_split = 0; calculate_signatures(seq, dfas, ndfas); qsort(seq, ndfas, sizeof(DFANode *), general_compare); seq[0]->new_eq_class = seq[0]->eq_class; for (i=1; inew_eq_class = seq[i]->eq_class; if (seq[i]->eq_class == seq[i-1]->eq_class) { /* May need to split, otherwise states were previously separated anyway */ if (general_compare(seq+i, seq+i-1) != 0) { /* Different transition pattern, split existing equivalent class */ had_to_split = 1; seq[i]->new_eq_class = ++last_eq_class; if (verbose) fprintf(stderr, "Found %d equivalence classes\r", last_eq_class+1); } else { /* This works even if seq[i-1] was assigned a new class due to splitting from seq[i-2] etc. */ seq[i]->new_eq_class = seq[i-1]->new_eq_class; } } } /* Set classes to new class values. */ for (i=0; ieq_class = seq[i]->new_eq_class; } return had_to_split; } /*}}}*/ static int initial_compare(const void *a, const void *b)/*{{{*/ /************************** Sort based on exit value **************************/ { Castderef (a, const DFANode *, aa); Castderef (b, const DFANode *, bb); int status; int aok, bok; if (!aa->result && bb->result) { /* Put all non-accepting states first in sort order */ return -1; } else if (aa->result && !bb->result) { return +1; } else if (!aa->result && !bb->result) { return 0; } else { status = strcmp(aa->result, bb->result); if (status < 0) return -1; else if (status > 0) return +1; else { aok = (aa->attribute != 0); bok = (bb->attribute != 0); if (!aok && bok) { return -1; } else if (aok && !bok) { return +1; } else if (!aok && !bok) { return 0; } else { return strcmp(aa->attribute, bb->attribute); } } } } /*}}}*/ static void assign_initial_classes(DFANode **seq, int ndfas)/*{{{*/ /******************* Determine initial equivalence classes. *******************/ { int i; qsort(seq, ndfas, sizeof(DFANode *), initial_compare); last_eq_class = 0; seq[0]->eq_class = last_eq_class; for (i=1; ieq_class = ++last_eq_class; } else { /* Same class as last entry */ seq[i]->eq_class = last_eq_class; } } } /*}}}*/ static int compress_states(DFANode **dfas, int ndfas)/*{{{*/ /***** Compress the DFA so there is precisely one state in each eq. class *****/ { int *reps; int i, j, t; int neqc; int new_index; neqc = 1 + last_eq_class; /* Array containing which state is the representative of each eq. class. Keep the state which had the lowest array index. */ reps = new_array(int, neqc); for (i=0; ieq_class; if (reps[eqc] < 0) { reps[eqc] = i; dfas[i]->is_rep = 1; } else { dfas[i]->is_rep = 0; } } /* Go through DFA states and assign new indices. */ for (i=0, new_index=0; iis_rep) { dfas[i]->new_index = new_index++; if (report) fprintf(report, "Old DFA state %d becomes %d\n", i, dfas[i]->new_index); } else { int eqc = dfas[i]->eq_class; int rep = reps[eqc]; /* This assignment works because the representative for the class must have been done earlier in the loop. */ dfas[i]->new_index = dfas[rep]->new_index; if (report) fprintf(report, "Old DFA state %d becomes %d (formerly %d)\n", i, dfas[i]->new_index, rep); } } /* Go through all transitions and fix them up. */ for (i=0; imap[t]; if (dest >= 0) { s->map[t] = dfas[dest]->new_index; } } } /* Go through and crunch the entries in the DFA array, fixing up the indices */ for (i=j=0; iis_rep) { dfas[j] = dfas[i]; dfas[j]->index = dfas[j]->new_index; j++; } } free(reps); return neqc; } /*}}}*/ static void discard_nfa_bitmaps(DFANode **dfas, int ndfas)/*{{{*/ /********** Discard the (now inaccurate) NFA bitmaps from the states **********/ { int i; for (i=0; infas); dfas[i]->nfas = NULL; } return; } /*}}}*/ static void print_classes(DFANode **dfas, int ndfas)/*{{{*/ { int i; #if 1 /* Comment out to print this stuff for debug */ return; #endif if (!report) return; fprintf(report, "Equivalence classes are :\n"); for (i=0; ieq_class); } fprintf(report, "\n"); return; } /*}}}*/ int compress_dfa(DFANode **dfas, int ndfas, int ntokens)/*{{{*/ /************************ The main callable interface. ************************/ { DFANode **seq; /* Storage for node sequence */ int i; int last_eqc; int had_to_split; int new_ndfas; /* Safety net */ if (ndfas <= 0) return; local_dfas = dfas; Nt = ntokens; seq = new_array(DFANode *, ndfas); for (i=0; isymbols = NULL; x->results = NULL; x->n_results = x->max_results = 0; x->any_results_so_far = 0; x->name = new_string(name); x->defresult = NULL; x->result_type = NULL; return x; } /*}}}*/ void destroy_evaluator(Evaluator *x)/*{{{*/ { /* Just leak memory for now, no need to clean up. */ return; } /*}}}*/ void define_defresult(Evaluator *x, char *text)/*{{{*/ { x->defresult = new_string(text); } /*}}}*/ void define_type(Evaluator *x, char *text)/*{{{*/ { x->result_type = new_string(text); } /*}}}*/ char* get_defresult(Evaluator *x)/*{{{*/ { if (x->defresult) { return x->defresult; } else { fprintf(stderr, "WARNING: Default %s used with no definition, \"0\" assumed\n", x->name); return "0"; } } /*}}}*/ char* get_result_type(Evaluator *x)/*{{{*/ { return x->result_type ? x->result_type : "short"; } /*}}}*/ static void add_new_symbol(Evaluator *x, Symbol *s)/*{{{*/ { SymbolList *nsl = new(SymbolList); nsl->sym = s; nsl->next = x->symbols; x->symbols = nsl; } /*}}}*/ static void grow_results(Evaluator *x)/*{{{*/ { if (x->n_results == x->max_results) { x->max_results += 32; x->results = resize_array(Result, x->results, x->max_results); } } /*}}}*/ Expr * new_wild_expr(void)/*{{{*/ { Expr *r = new(Expr); r->type = E_WILD; return r; } /*}}}*/ Expr * new_not_expr(Expr *c)/*{{{*/ { Expr *r = new(Expr); r->type = E_NOT; r->data.not.c1 = c; return r; } /*}}}*/ Expr * new_and_expr(Expr *c1, Expr *c2)/*{{{*/ { Expr *r = new(Expr); r->type = E_AND; r->data.and.c1 = c1; r->data.and.c2 = c2; return r; } /*}}}*/ Expr * new_or_expr(Expr *c1, Expr *c2)/*{{{*/ { Expr *r = new(Expr); r->type = E_OR; r->data.or.c1 = c1; r->data.or.c2 = c2; return r; } /*}}}*/ Expr * new_xor_expr(Expr *c1, Expr *c2)/*{{{*/ { Expr *r = new(Expr); r->type = E_XOR; r->data.xor.c1 = c1; r->data.xor.c2 = c2; return r; } /*}}}*/ Expr * new_cond_expr(Expr *c1, Expr *c2, Expr *c3)/*{{{*/ { Expr *r = new(Expr); r->type = E_COND; r->data.cond.c1 = c1; r->data.cond.c2 = c2; r->data.cond.c3 = c3; return r; } /*}}}*/ static Symbol * find_symbol_or_create(Evaluator *x, char *sym_name)/*{{{*/ { int i; Symbol *s; SymbolList *sl; for (sl=x->symbols; sl; sl=sl->next) { s = sl->sym; if (!strcmp(s->name, sym_name)) { return s; } } s = new(Symbol); add_new_symbol(x,s); s->is_expr = 0; /* Until proven otherwise */ s->name = new_string(sym_name); return s; } /*}}}*/ Expr * new_sym_expr(char *sym_name)/*{{{*/ /* Return expr for symbol name if it already exist, else create. Don't bind to actual symbol instance yet. At the stage of parsing where this function is used, we don't know yet which symbol table the symbol has to exist in. */ { Expr *r; r = new(Expr); r->type = E_SYMBOL; r->data.symbol.name = new_string(sym_name); r->data.symbol.s = NULL; /* Force binding at first use */ return r; } /*}}}*/ void define_result(Evaluator *x, char *string, Expr *e, int early)/*{{{*/ /*++++++++++++++++++++ Add a result defn. If the expr is null, it means build a single expr corr. to the value of the symbol with the same name as the result string. ++++++++++++++++++++*/ { int i; Result *r; grow_results(x); r = &(x->results[x->n_results++]); r->result = new_string(string); r->early = early; if (e) { r->e = e; } else { Expr *ne; ne = new_sym_expr(string); r->e = ne; } return; } /*}}}*/ void define_symbol(Evaluator *x, char *name, Expr *e)/*{{{*/ /*++++++++++++++++++++ Define an entry in the symbol table. ++++++++++++++++++++*/ { Symbol *s; s = find_symbol_or_create(x, name); s->data.e = e; s->is_expr = 1; return; } /*}}}*/ void define_symresult(Evaluator *x, char *name, Expr *e, int early)/*{{{*/ /*++++++++++++++++++++ Define an entry in the symbol table, and a result with the same name. ++++++++++++++++++++*/ { define_symbol(x, name, e); define_result(x, name, e, early); return; } /*}}}*/ void clear_symbol_values(Evaluator *x)/*{{{*/ { SymbolList *sl; for (sl=x->symbols; sl; sl=sl->next) { Symbol *s = sl->sym; if (0 == s->is_expr) { s->data.val = 0; } } x->any_results_so_far = 0; } /*}}}*/ void set_symbol_value(Evaluator *x, char *sym_name)/*{{{*/ { Symbol *s; s = find_symbol_or_create(x, sym_name); if (s->is_expr) { fprintf(stderr, "Cannot set value for symbol '%s', it is defined by an expression\n"); exit(2); } else { s->data.val = 1; } } /*}}}*/ static int eval(Evaluator *x, Expr *e)/*{{{*/ /*++++++++++++++++++++ Evaluate the value of an expr ++++++++++++++++++++*/ { switch (e->type) { case E_AND: return eval(x, e->data.and.c1) && eval(x, e->data.and.c2); case E_OR: return eval(x, e->data.or.c1) || eval(x, e->data.or.c2); case E_XOR: return eval(x, e->data.xor.c1) ^ eval(x, e->data.xor.c2); case E_COND: return eval(x, e->data.cond.c1) ? eval(x, e->data.cond.c2) : eval(x, e->data.cond.c3); case E_NOT: return !eval(x, e->data.not.c1); case E_WILD: return x->any_results_so_far; case E_SYMBOL: { Symbol *s = e->data.symbol.s; if (!s) { /* Not bound yet */ e->data.symbol.s = s = find_symbol_or_create(x, e->data.symbol.name); } if (s->is_expr) { return eval(x, s->data.e); } else { return s->data.val; } } default: fprintf(stderr, "Interal error : Can't get here!\n"); exit(2); } } /*}}}*/ int evaluate_result(Evaluator *x, char **result, int *result_early)/*{{{*/ /*++++++++++++++++++++ Evaluate the result which holds given the symbols that are set ++++++++++++++++++++*/ { int i; int matched = -1; for (i=0; in_results; i++) { if (eval(x, x->results[i].e)) { if (x->any_results_so_far) { *result = NULL; return 0; } else { x->any_results_so_far = 1; matched = i; } } } if (matched < 0) { *result = NULL; if (result_early) *result_early = 0; return 1; } else { *result = x->results[matched].result; if (result_early) *result_early = x->results[matched].early; return 1; } } /*}}}*/ /* Initialisation */ void eval_initialise(void)/*{{{*/ { exit_evaluator = create_evaluator("result"); attr_evaluator = create_evaluator("attribute"); } /*}}}*/ jbofihe-0.38/dfasyn/n2d.c100644 765 764 121300 7350750743 14264 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dfasyn/n2d.c,v 1.1 2001/07/12 21:15:35 richard Exp $ Main program for NFA to DFA table builder program. ***************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ /* {{{ General comments Convert a nondeterminstic finite automaton (NFA) into a deterministic finite automaton (DFA). The NFA is defined in terms of a set of states, with transitions between the states. The transitions may occur on any one of a set of symbols (specified with | characters between the options), or may be 'epsilon' transitions, i.e. occurring without consumption of any input. A state may have multiple transitions for the same input symbol (hence 'nondeterministic'). The final state encountered within the final block defined in the input file is taken to be the start state of the whole NFA. A state may be entered more than once in the file; the transitions in the multiple definitions are combined to give the complete transition set. A state may have an exit value assigned (with =); this is the return value of the automaton if the end of string is encountered when in that state. (If the resulting DFA can be in multiple exiting NFA states when the end of string is reached, the result is all the associated NFA exit values or'd together, so it is best to use distinct bits for NFA exit values unless it is known that is safe not to in a particular case.) The input grammar allows a BLOCK ... ENDBLOCK construction + block instantiation. This allows common parts of the NFA state machine to be reused in multiple places as well as aiding structuring and readability. See morf_nfa.in for an example of the input grammar, and morf.c for a (non-trivial) example of how to build the automaton around the tables that this script generates. }}} */ #include #include "n2d.h" /* Globally visible options to control reporting */ FILE *report; FILE *input; FILE *output; extern FILE *yyin; extern FILE *yyout; int verbose; static Block **blocks = NULL; static int nblocks = 0; static int maxblocks = 0; static char **toktable=NULL; static int ntokens = 0; static int maxtokens = 0; struct Abbrev { char *lhs; /* Defined name */ char **rhs; /* Token/define */ int nrhs; int maxrhs; }; static struct Abbrev *abbrevtable=NULL; static int nabbrevs = 0; static int maxabbrevs = 0; /* ================================================================= */ static void grow_tokens(void)/*{{{*/ { maxtokens += 32; toktable = resize_array(char *, toktable, maxtokens); } /*}}}*/ static int create_token(char *name)/*{{{*/ { int result; if (ntokens == maxtokens) { grow_tokens(); } result = ntokens++; toktable[result] = new_string(name); return result; } /*}}}*/ int lookup_token(char *name, int create)/*{{{*/ { int found = -1; int i; for (i=0; i= 0) { fprintf(stderr, "Token '%s' already declared\n", name); exit(1); } else { found = create_token(name); } break; case CREATE_OR_USE_OLD: if (found < 0) { found = create_token(name); } break; } return found; } /*}}}*/ /* ================================================================= */ static void grow_abbrevs(void)/*{{{*/ { maxabbrevs += 32; abbrevtable = resize_array(struct Abbrev, abbrevtable, maxabbrevs); } /*}}}*/ struct Abbrev * create_abbrev(char *name)/*{{{*/ { struct Abbrev *result; if (nabbrevs == maxabbrevs) { grow_abbrevs(); } result = abbrevtable + (nabbrevs++); result->lhs = new_string(name); result->nrhs = result->maxrhs = 0; result->rhs = 0; return result; } /*}}}*/ void add_tok_to_abbrev(struct Abbrev *abbrev, char *tok)/*{{{*/ { if (abbrev->nrhs == abbrev->maxrhs) { abbrev->maxrhs += 8; abbrev->rhs = resize_array(char *, abbrev->rhs, abbrev->maxrhs); } abbrev->rhs[abbrev->nrhs++] = new_string(tok); } /*}}}*/ static struct Abbrev * lookup_abbrev(char *name, int create)/*{{{*/ { int found = -1; int i; struct Abbrev *result = NULL; /* Scan table in reverse order. If a name has been redefined, make sure the most recent definition is picked up. */ for (i=nabbrevs-1; i>=0; i--) { if (!strcmp(abbrevtable[i].lhs, name)) { found = i; result = abbrevtable + found; break; } } switch (create) { case CREATE_MUST_NOT_EXIST: if (found >= 0) { fprintf(stderr, "Abbreviation '%s' already declared\n", name); exit(1); } else { result = create_abbrev(name); } break; case CREATE_OR_USE_OLD: if (found < 0) { result = create_abbrev(name); } break; } return result; } /*}}}*/ /* ================================================================= */ struct Attribute { char *name; }; static struct Attribute *attributes = NULL; static int n_attributes = 0; static int max_attributes = 0; static void grow_attributes(void)/*{{{*/ { max_attributes += 16; attributes = resize_array(struct Attribute, attributes, max_attributes); } /*}}}*/ static int create_attribute(char *name)/*{{{*/ { int n; if (n_attributes == max_attributes) { grow_attributes(); } n = n_attributes; attributes[n].name = new_string(name); n_attributes++; return n; } /*}}}*/ static int lookup_attribute(char *name)/*{{{*/ /* Always create if not found */ { int i; for (i=0; iname = new_string(name); for (i=0; istate_hash[i].states = NULL; result->state_hash[i].nstates = 0; result->state_hash[i].maxstates = 0; } result->states = NULL; result->nstates = result->maxstates = 0; result->subcount = 1; return result; } /*}}}*/ Block * lookup_block(char *name, int create)/*{{{*/ { Block *found = NULL; int i; for (i=0; iname, name)) { found = blocks[i]; break; } } switch (create) { case USE_OLD_MUST_EXIST: if (!found) { fprintf(stderr, "Could not find block '%s' to instantiate\n", name); exit(1); } break; case CREATE_MUST_NOT_EXIST: if (found) { fprintf(stderr, "Already have a block called '%s', cannot redefine\n", name); exit(1); } else { found = create_block(name); } break; case CREATE_OR_USE_OLD: if (!found) { found = create_block(name); } break; } return found; } /*}}}*/ /* ================================================================= */ static void maybe_grow_states(Block *b, int hash)/*{{{*/ { Stateset *ss = b->state_hash + hash; if (ss->nstates == ss->maxstates) { ss->maxstates += 8; ss->states = resize_array(State*, ss->states, ss->maxstates); } if (b->nstates == b->maxstates) { b->maxstates += 32; b->states = resize_array(State*, b->states, b->maxstates); } } /*}}}*/ /* ================================================================= */ static unsigned long hashfn(const char *s)/*{{{*/ { unsigned long y = 0UL, v, w, x, k; unsigned long yl, yh; const char *t = s; while (1) { k = (unsigned long) *(unsigned char *)(t++); if (!k) break; v = ~y; w = y<<13; x = v>>6; y = w ^ x; y += k; } y ^= (y>>13); y &= HASH_MASK; return y; } /*}}}*/ static State * create_state(Block *b, char *name)/*{{{*/ { State *result; int hash; Stateset *ss; hash = hashfn(name); maybe_grow_states(b, hash); ss = b->state_hash + hash; result = b->states[b->nstates++] = ss->states[ss->nstates++] = new(State); result->name = new_string(name); result->parent = b; result->index = b->nstates - 1; result->transitions = NULL; result->exitvals = NULL; result->attributes = NULL; result->ordered_trans = NULL; result->n_transitions = 0; result->removed = 0; return result; } /*}}}*/ State * lookup_state(Block *b, char *name, int create)/*{{{*/ { State *found = NULL; int i; int hash; Stateset *ss; hash = hashfn(name); ss = b->state_hash + hash; for (i=0; instates; i++) { if (!strcmp(ss->states[i]->name, name)) { found = ss->states[i]; break; } } switch (create) { case USE_OLD_MUST_EXIST: if (!found) { fprintf(stderr, "Could not find a state '%s' in block '%s' to transition to\n", name, b->name); exit(1); } break; case CREATE_MUST_NOT_EXIST: if (found) { fprintf(stderr, "Warning : already have a state '%s' in block '%s'\n", name, b->name); } else { found = create_state(b, name); } break; case CREATE_OR_USE_OLD: if (!found) { found = create_state(b, name); } break; } return found; } /*}}}*/ /* ================================================================= */ Stringlist * add_token(Stringlist *existing, char *token)/*{{{*/ { Stringlist *result = new(Stringlist); if (token) { result->string = new_string(token); } else { result->string = NULL; } result->next = existing; return result; } /*}}}*/ static void add_transition(State *curstate, char *str, char *destination)/*{{{*/ /* Add a single transition to the state. Allow definitions to be recursive */ { struct Abbrev *abbrev; abbrev = (str) ? lookup_abbrev(str, USE_OLD_MUST_EXIST) : NULL; if (abbrev) { int i; for (i=0; inrhs; i++) { add_transition(curstate, abbrev->rhs[i], destination); } } else { Translist *tl; tl = new(Translist); tl->next = curstate->transitions; /* No problem with aliasing, these strings are read-only and have lifetime = until end of program */ tl->token = (str) ? lookup_token(str, USE_OLD_MUST_EXIST) : -1; tl->ds_name = destination; curstate->transitions = tl; } } /*}}}*/ void add_transitions(State *curstate, Stringlist *tokens, char *destination)/*{{{*/ { Stringlist *sl; struct Abbrev *abbrev; for (sl=tokens; sl; sl=sl->next) { add_transition(curstate, sl->string, destination); } } /*}}}*/ State * add_transitions_to_internal(Block *curblock, State *addtostate, Stringlist *tokens)/*{{{*/ { char buffer[1024]; State *result; sprintf(buffer, "#%d", curblock->subcount++); result = lookup_state(curblock, buffer, CREATE_MUST_NOT_EXIST); add_transitions(addtostate, tokens, result->name); return result; } /*}}}*/ void add_exit_value(State *curstate, char *value)/*{{{*/ { Stringlist *sl; sl = new(Stringlist); sl->string = value; sl->next = curstate->exitvals; curstate->exitvals = sl; } /*}}}*/ void set_state_attribute(State *curstate, char *name)/*{{{*/ { Stringlist *sl; sl = new(Stringlist); sl->string = name; sl->next = curstate->attributes; curstate->attributes = sl; } /*}}}*/ /* ================================================================= */ void instantiate_block(Block *curblock, char *block_name, char *instance_name)/*{{{*/ { Block *master = lookup_block(block_name, USE_OLD_MUST_EXIST); char namebuf[1024]; int i; for (i=0; instates; i++) { State *s = master->states[i]; State *new_state; Translist *tl; Stringlist *sl, *ex; strcpy(namebuf, instance_name); strcat(namebuf, "."); strcat(namebuf, s->name); /* In perverse circumstances, we might already have a state called this */ new_state = lookup_state(curblock, namebuf, CREATE_OR_USE_OLD); for (tl=s->transitions; tl; tl=tl->next) { Translist *new_tl = new(Translist); new_tl->token = tl->token; strcpy(namebuf, instance_name); strcat(namebuf, "."); strcat(namebuf, tl->ds_name); new_tl->ds_name = new_string(namebuf); new_tl->ds_ref = NULL; new_tl->next = new_state->transitions; new_state->transitions = new_tl; } /*{{{ Copy state exit values*/ ex = NULL; for (sl=s->exitvals; sl; sl=sl->next) { Stringlist *new_sl = new(Stringlist); new_sl->string = sl->string; new_sl->next = ex; ex = new_sl; } new_state->exitvals = ex; /*}}}*/ /*{{{ Copy state attributes */ ex = NULL; for (sl=s->attributes; sl; sl=sl->next) { Stringlist *new_sl = new(Stringlist); new_sl->string = sl->string; new_sl->next = ex; ex = new_sl; } new_state->attributes = ex; /*}}}*/ } } /*}}}*/ void fixup_state_refs(Block *b)/*{{{*/ { int i; for (i=0; instates; i++) { State *s = b->states[i]; Translist *tl; for (tl=s->transitions; tl; tl=tl->next) { tl->ds_ref = lookup_state(b, tl->ds_name, CREATE_OR_USE_OLD); } } } /*}}}*/ /* ================================================================= */ /* Bitmap to contain epsilon closure for NFA */ static unsigned long **eclo; /* ================================================================= */ static inline const int round_up(const int x) {/*{{{*/ return (x+31)>>5; } /*}}}*/ static inline void set_bit(unsigned long *x, int n)/*{{{*/ { int r = n>>5; unsigned long m = 1UL<<(n&31); x[r] |= m; } /*}}}*/ static inline int is_set(unsigned long *x, int n)/*{{{*/ { int r = n>>5; unsigned long m = 1UL<<(n&31); return !!(x[r] & m); } /*}}}*/ /* ================================================================= */ /* During the algorithm to transitively close the epsilon closure table, maintain a stack of indices that have to be rescanned. This avoids the slow approach of repeatedly rescanning the whole table until no changes are found. */ typedef struct IntPair { struct IntPair *next; int i; int j; } IntPair; static IntPair *freelist=NULL; static IntPair *stack=NULL; /* ================================================================= */ static void push_pair(int i, int j)/*{{{*/ { static const int grow_by = 32; IntPair *np; if (!freelist) { IntPair *ip = new_array(IntPair, grow_by); int x; for (x=1; xnext; np->next = stack; stack = np; np->i = i; np->j = j; } /*}}}*/ static int pop_pair(int *i, int *j) {/*{{{*/ IntPair *ip; if (!stack) { return 0; } else { ip = stack; *i = ip->i; *j = ip->j; stack = ip->next; ip->next = freelist; freelist = ip; return 1; } } /*}}}*/ static void generate_epsilon_closure(Block *b)/*{{{*/ { int i, j, N; N = b->nstates; eclo = new_array(unsigned long*, N); for (i=0; istates[i]; Translist *tl; int from_state = s->index; set_bit(eclo[from_state], from_state); /* Always reflexive */ for (tl=s->transitions; tl; tl=tl->next) { if (tl->token < 0) { /* epsilon trans */ int to_state = tl->ds_ref->index; set_bit(eclo[from_state], to_state); push_pair(from_state, to_state); } } } /* Now keep on processing until the table is transitively closed */ while (pop_pair(&i, &j)) { int k; for (k=0; knstates; if (!report) return; for (i=0; istates[i]; Translist *tl; Stringlist *sl; fprintf(report, "NFA state %d = %s\n", i, s->name); for (tl=s->transitions; tl; tl=tl->next) { fprintf(report, " [%s] -> %s\n", (tl->token >= 0) ? toktable[tl->token] : "(epsilon)", tl->ds_name); } if (s->exitvals) { int first = 1; fprintf(report, " Exit value : "); for (sl=s->exitvals; sl; sl=sl->next) { fprintf(report, "%s%s", first ? "" : "|", sl->string); } fprintf(report, "\n"); } if (s->attributes) { int first = 1; fprintf(report, " Attributes : "); for (sl=s->attributes; sl; sl=sl->next) { fprintf(report, "%s%s", first ? "" : "|", sl->string); } fprintf(report, "\n"); } fprintf(report, " Epsilon closure :\n (self)\n"); for (j=0; jstates[j]->name); } } fprintf(report, "\n"); } } /*}}}*/ /* ================================================================= */ /* Indexed [from_state][token][to_state], flag set if there is a transition from from_state to to_state, via token then zero or more epsilon transitions */ static unsigned long ***transmap; /* Index [from_nfa_state][token], flag set if there is a transition to any destination nfa state for that token. */ static unsigned long **anytrans; /* ================================================================= */ static void build_transmap(Block *b)/*{{{*/ { int N = b->nstates; int Nt = ntokens; int i, j, k, m; transmap = new_array(unsigned long **, N); anytrans = new_array(unsigned long *, N); for (i=0; istates[i]; Translist *tl; for (tl=s->transitions; tl; tl=tl->next) { if (tl->token >= 0) { int dest = tl->ds_ref->index; for (m=0; mtoken][m] |= x; if (!!x) set_bit(anytrans[i], tl->token); } } } } } /*}}}*/ /* ================================================================= */ static DFANode **dfas; static int ndfa=0; static int maxdfa=0; static int had_ambiguous_result = 0; /* ================================================================= */ /* Implement an array of linked lists to access DFA states directly. The * hashes are given by folding the signatures down to single bytes. */ struct DFAList { struct DFAList *next; DFANode *dfa; }; #define DFA_HASHSIZE 256 static struct DFAList *dfa_hashtable[DFA_HASHSIZE]; /* ================================================================= */ static void grow_dfa(void)/*{{{*/ { maxdfa += 32; dfas = resize_array(DFANode*, dfas, maxdfa); } /*}}}*/ static unsigned long fold_signature(unsigned long sig)/*{{{*/ { unsigned long folded; folded = sig ^ (sig >> 16); folded ^= (folded >> 8); folded &= 0xff; return folded; } /*}}}*/ /* ================================================================= */ static int find_dfa(unsigned long *nfas, int N)/*{{{*/ /* Simple linear search. Use 'signatures' to get rapid rejection of any DFA state that can't possibly match */ { int res=-1; int i, j; unsigned long signature = 0UL; unsigned long folded_signature; struct DFAList *dfal; for (j=0; jnext) { DFANode *dfa = dfal->dfa; int matched; if (signature != dfa->signature) continue; matched=1; for (j=0; jnfas[j]) { matched = 0; break; } } if (matched) { return dfa->index; } } return -1; } /*}}}*/ static int add_dfa(Block *b, unsigned long *nfas, int N, int Nt, int from_state, int via_token)/*{{{*/ { int j; int result = ndfa; int had_exitvals; int this_result_unambiguous; Stringlist *ex; unsigned long signature = 0UL, folded_signature; struct DFAList *dfal; if (verbose) { fprintf(stderr, "Adding DFA state %d\r", ndfa); fflush(stderr); } if (maxdfa == ndfa) { grow_dfa(); } dfas[ndfa] = new(DFANode); dfas[ndfa]->nfas = new_array(unsigned long, round_up(N)); dfas[ndfa]->map = new_array(int, Nt); for (j=0; jmap[j] = -1; dfas[ndfa]->index = ndfa; dfas[ndfa]->defstate = -1; dfas[ndfa]->from_state = from_state; dfas[ndfa]->via_token = via_token; for (j=0; jnfas[j] = x; } dfas[ndfa]->signature = signature; folded_signature = fold_signature(signature); dfal = new(struct DFAList); dfal->dfa = dfas[ndfa]; dfal->next = dfa_hashtable[folded_signature]; dfa_hashtable[folded_signature] = dfal; /* {{{ Boolean reduction for result */ ex = NULL; had_exitvals = 0; clear_symbol_values(exit_evaluator); for (j=0; jnfas, j)) { Stringlist *sl; State *s = b->states[j]; for (sl = s->exitvals; sl; sl = sl->next) { Stringlist *new_sl; new_sl = new(Stringlist); new_sl->string = sl->string; new_sl->next = ex; ex = new_sl; set_symbol_value(exit_evaluator, sl->string); had_exitvals = 1; } } } this_result_unambiguous = evaluate_result(exit_evaluator, &dfas[ndfa]->result, &dfas[ndfa]->result_early); dfas[ndfa]->nfa_exit_sl = ex; if (!this_result_unambiguous) { Stringlist *sl; fprintf(stderr, "WARNING : Ambiguous exit state abandoned for DFA state %d\n", ndfa); fprintf(stderr, "NFA exit tags applying in this stage :\n"); for (sl = ex; sl; sl = sl->next) { fprintf(stderr, " %s\n", sl->string); } had_ambiguous_result = 1; } /*}}}*/ /* {{{ Boolean reduction for attributes */ ex = NULL; had_exitvals = 0; clear_symbol_values(attr_evaluator); for (j=0; jnfas, j)) { Stringlist *sl; State *s = b->states[j]; for (sl = s->attributes; sl; sl = sl->next) { Stringlist *new_sl; new_sl = new(Stringlist); new_sl->string = sl->string; new_sl->next = ex; ex = new_sl; set_symbol_value(attr_evaluator, sl->string); had_exitvals = 1; } } } this_result_unambiguous = evaluate_result(attr_evaluator, &dfas[ndfa]->attribute, NULL); dfas[ndfa]->nfa_attr_sl = ex; if (!this_result_unambiguous) { Stringlist *sl; fprintf(stderr, "WARNING : Ambiguous attribute abandoned for DFA state %d\n", ndfa); fprintf(stderr, "NFA attribute tags applying in this stage :\n"); for (sl = ex; sl; sl = sl->next) { fprintf(stderr, " %s\n", sl->string); } had_ambiguous_result = 1; } /*}}}*/ ndfa++; return result; } /*}}}*/ static void clear_nfas(unsigned long *nfas, int N)/*{{{*/ { int i; for (i=0; instates; rup_N = round_up(N); Nt = ntokens; /* Add initial state */ nfas = new_array(unsigned long *, Nt); for (i=0; iresult_early) { next_to_do++; continue; } for (j=0; jnfas; for (j0=0; j0map[t] = idx; } next_to_do++; } free(found_any); for (i=0; instates; int Nt = ntokens; int i, j, j0, j0_5, j1, t; unsigned long mask; unsigned long current_nfas; int rup_N = round_up(N); Stringlist *ex; int from_state, this_state, via_token, maxtrace; if (!report) return; for (i=0; infas) { fprintf(report, " NFA states :\n"); for (j0=0; j0nfas[j0]; if (!current_nfas) continue; j0_5 = j0<<5; for (j1=0, mask=1UL; j1<32; mask<<=1, j1++) { if (current_nfas & mask) { fprintf(report, " %s\n", b->states[j0_5 + j1]->name); } } } fprintf(report, "\n"); } fprintf(report, " Reverse route :\n HERE"); this_state = i; from_state = dfas[i]->from_state; maxtrace=0; while (from_state >= 0) { via_token = dfas[this_state]->via_token; fprintf(report, "<-%s", toktable[via_token]); this_state = from_state; from_state = dfas[this_state]->from_state; maxtrace++; if (maxtrace>100) break; } fprintf(report, "\n"); fprintf(report, " Transitions :\n"); for (t=0; tmap[t]; if (dest >= 0) { fprintf(report, " %s -> %d\n", toktable[t], dest); } } if (dfas[i]->defstate >= 0) { fprintf(report, " Use state %d as basis (%d fixups)\n", dfas[i]->defstate, dfas[i]->best_diff); } if (dfas[i]->nfa_exit_sl) { Stringlist *sl; fprintf(report, " NFA exit tags applying :\n"); for (sl=dfas[i]->nfa_exit_sl; sl; sl = sl->next) { fprintf(report, " %s\n", sl->string); } } if (dfas[i]->result) { fprintf(report, " Exit value : %s\n", dfas[i]->result); } if (dfas[i]->attribute) { fprintf(report, " Attribute : %s\n", dfas[i]->attribute); } fprintf(report, "\n"); } } /*}}}*/ /* ================================================================= */ static void print_exitval_table(Block *b)/*{{{*/ { int N = b->nstates; int Nt = ntokens; int n, i, j; extern char *prefix; char ucprefix[1024]; char *defresult = get_defresult(exit_evaluator); if (prefix) { fprintf(output, "%s %s_exitval[] = {\n", get_result_type(exit_evaluator), prefix); } else { fprintf(output, "%s exitval[] = {\n", get_result_type(exit_evaluator)); } for (i=0; iresult) ? dfas[i]->result : defresult); fputc ((i<(ndfa-1)) ? ',' : ' ', output); fprintf(output, " /* State %d */\n", i); } fprintf(output, "};\n\n"); } /*}}}*/ static void print_attribute_table(void)/*{{{*/ { int i; extern char *prefix; char *defattr = get_defresult(attr_evaluator); if (prefix) { fprintf(output, "%s %s_attribute[] = {\n", get_result_type(attr_evaluator), prefix); } else { fprintf(output, "%s attribute[] = {\n", get_result_type(attr_evaluator)); } for (i=0; iattribute; fprintf(output, "%s", av ? av : defattr); fputc ((i<(ndfa-1)) ? ',' : ' ', output); fprintf(output, " /* State %d */\n", i); } fprintf(output, "};\n\n"); } /*}}}*/ static void write_next_state_function_uncompressed(int Nt)/*{{{*/ { extern char *prefix; if (prefix) { fprintf(output, "int %s_next_state(int current_state, int next_token) {\n", prefix); fprintf(output, " if (next_token < 0 || next_token >= %d) return -1;\n", Nt); fprintf(output, " return %s_trans[%d*current_state + next_token];\n", prefix, Nt); fprintf(output, "}\n"); } else { fprintf(output, "int next_state(int current_state, int token) {\n"); fprintf(output, " if (next_token < 0 || next_token >= %d) return -1;\n", Nt); fprintf(output, " return trans[%d*current_state + next_token];\n", Nt); fprintf(output, "}\n"); } } /*}}}*/ static void print_uncompressed_tables(Block *b)/*{{{*/ /* Print out the state/transition table uncompressed, i.e. every token has an array entry in every state. This is fast to access but quite wasteful on memory with many states and many tokens. */ { int N = b->nstates; int Nt = ntokens; int n, i, j; extern char *prefix; char ucprefix[1024]; n = 0; if (prefix) { fprintf(output, "static short %s_trans[] = {", prefix); } else { fprintf(output, "static short trans[] = {"); } for (i=0; i0) fputc (',', output); if (n%8 == 0) { fprintf(output, "\n "); } else { fputc(' ', output); } n++; fprintf(output, "%4d", dfas[i]->map[j]); } } fprintf(output, "\n};\n\n"); write_next_state_function_uncompressed(Nt); } /*}}}*/ static int check_include_char(int this_state, int token)/*{{{*/ { if (dfas[this_state]->defstate >= 0) { return (dfas[this_state]->map[token] != dfas[dfas[this_state]->defstate]->map[token]); } else { return (dfas[this_state]->map[token] >= 0); } } /*}}}*/ static void write_next_state_function_compressed(void)/*{{{*/ /* Write the next_state function for traversing compressed tables into the output file. */ { extern char *prefix; if (prefix) { fprintf(output, "int %s_next_state(int current_state, int next_token) {\n", prefix); fprintf(output, "int h, l, m, xm;\n"); fprintf(output, "while (current_state >= 0) {\n"); fprintf(output, " l = %s_base[current_state], h = %s_base[current_state+1];\n", prefix, prefix); fprintf(output, " while (h > l) {\n"); fprintf(output, " m = (h + l) >> 1; xm = %s_token[m];\n", prefix); fprintf(output, " if (xm == next_token) goto done;\n"); fprintf(output, " if (m == l) break;\n"); fprintf(output, " if (xm > next_token) h = m;\n"); fprintf(output, " else l = m;\n"); fprintf(output, " }\n"); fprintf(output, " current_state = %s_defstate[current_state];\n", prefix); fprintf(output, "}\n"); fprintf(output, "return -1;\n"); fprintf(output, "done:\n"); fprintf(output, "return %s_nextstate[m];\n", prefix); fprintf(output, "}\n"); } else { fprintf(output, "int next_state(int current_state, int token) {\n"); fprintf(output, "int h, l, m, xm;\n"); fprintf(output, "while (current_state >= 0) {\n"); fprintf(output, " l = base[current_state], h = base[current_state+1];\n"); fprintf(output, " while (h > l) {\n"); fprintf(output, " m = (h + l) >> 1; xm = token[m];\n"); fprintf(output, " if (xm == next_token) goto done;\n"); fprintf(output, " if (m == l) break;\n"); fprintf(output, " if (xm > next_token) h = m;\n"); fprintf(output, " else l = m;\n"); fprintf(output, " }\n"); fprintf(output, " current_state = defstate[current_state];\n"); fprintf(output, "}\n"); fprintf(output, "return -1;\n"); fprintf(output, "done:\n"); fprintf(output, "return nextstate[m];\n"); fprintf(output, "}\n"); } } /*}}}*/ static void print_compressed_tables(Block *b)/*{{{*/ /* Print state/transition table in compressed form. This is more economical on storage, but requires a bisection search to find the next state for a given current state & token */ { int N = b->nstates; int *basetab = new_array(int, ndfa+1); int Nt = ntokens; int n, i, j; extern char *prefix; n = 0; if (prefix) { fprintf(output, "static unsigned char %s_token[] = {", prefix); } else { fprintf(output, "static unsigned char token[] = {"); } for (i=0; i0) fputc (',', output); if (n%8 == 0) { fprintf(output, "\n "); } else { fputc(' ', output); } n++; fprintf(output, "%3d", j); } } } fprintf(output, "\n};\n\n"); n = 0; if (prefix) { fprintf(output, "static short %s_nextstate[] = {", prefix); } else { fprintf(output, "static short nextstate[] = {"); } for (i=0; i0) fputc (',', output); if (n%8 == 0) { fprintf(output, "\n "); } else { fputc(' ', output); } n++; fprintf(output, "%5d", dfas[i]->map[j]); } } } fprintf(output, "\n};\n\n"); basetab[ndfa] = n; n = 0; if (prefix) { fprintf(output, "static unsigned short %s_base[] = {", prefix); } else { fprintf(output, "static unsigned short base[] = {"); } for (i=0; i<=ndfa; i++) { if (n>0) fputc (',', output); if (n%8 == 0) { fprintf(output, "\n "); } else { fputc(' ', output); } n++; fprintf(output, "%5d", basetab[i]); } fprintf(output, "\n};\n\n"); n = 0; if (prefix) { fprintf(output, "static short %s_defstate[] = {", prefix); } else { fprintf(output, "static short defstate[] = {"); } for (i=0; i0) fputc (',', output); if (n%8 == 0) { fprintf(output, "\n "); } else { fputc(' ', output); } n++; fprintf(output, "%5d", dfas[i]->defstate); } fprintf(output, "\n};\n\n"); free(basetab); write_next_state_function_compressed(); } /*}}}*/ /* ================================================================= */ void yyerror (char *s)/*{{{*/ { extern int lineno; fprintf(stderr, "%s at line %d\n", s, lineno); } /*}}}*/ int yywrap(void) /*{{{*/ { return -1; } /*}}}*/ /* ================================================================= */ int main (int argc, char **argv) { int result; State *start_state; Block *main_block; char *input_name = NULL; char *output_name = NULL; char *report_name = NULL; int uncompressed_tables = 0; int uncompressed_dfa = 0; /* Useful for debug */ verbose = 0; report = NULL; /*{{{ Parse cmd line arguments */ while (++argv, --argc) { if (!strcmp(*argv, "-v") || !strcmp(*argv, "--verbose")) { verbose = 1; } else if (!strcmp(*argv, "-o") || !strcmp(*argv, "--output")) { ++argv, --argc; output_name = *argv; } else if (!strcmp(*argv, "-r") || !strcmp(*argv, "--report")) { ++argv, --argc; report_name = *argv; } else if (!strcmp(*argv, "-u") || !strcmp(*argv, "--uncompressed-tables")) { uncompressed_tables = 1; } else if (!strcmp(*argv, "-ud") || !strcmp(*argv, "--uncompressed-dfa")) { uncompressed_dfa = 1; } else if ((*argv)[0] == '-') { fprintf(stderr, "Unrecognized command line option %s\n", *argv); } else { input_name = *argv; } } /*}}}*/ if (input_name) {/*{{{*/ input = fopen(input_name, "r"); if (!input) { fprintf(stderr, "Can't open %s for input, exiting\n", input_name); exit(1); } } else { input = stdin; } /*}}}*/ if (output_name) {/*{{{*/ output = fopen(output_name, "w"); if (!output) { fprintf(stderr, "Can't open %s for writing, exiting\n", output_name); exit(1); } } else { output = stdout; } /*}}}*/ if (report_name) {/*{{{*/ report = fopen(report_name, "w"); if (!report) { fprintf(stderr, "Can't open %s for writing, no report will be created\n", report_name); } } /*}}}*/ if (verbose) { fprintf(stderr, "General-purpose automaton builder\n"); fprintf(stderr, "Copyright (C) Richard P. Curnow 2000-2001\n"); } eval_initialise(); if (verbose) fprintf(stderr, "Parsing input..."); yyin = input; /* Set yyout. This means that if anything leaks from the scanner, or appears in a %{ .. %} block, it goes to the right place. */ yyout = output; result = yyparse(); if (result > 0) exit(1); if (verbose) fprintf(stderr, "\n"); start_state = get_curstate(); /* The last state to be current in the input file is the entry state of the NFA */ main_block = start_state->parent; if (verbose) fprintf(stderr, "Computing epsilon closure...\n"); generate_epsilon_closure(main_block); print_nfa(main_block); #if 0 if (verbose) fprintf(stderr, "Compressing NFA...\n"); compress_nfa(main_block); #endif build_transmap(main_block); if (verbose) fprintf(stderr, "Building DFA...\n"); build_dfa(main_block, start_state->index); if (report) { fprintf(report, "--------------------------------\n" "DFA structure before compression\n" "--------------------------------\n"); } print_dfa(main_block); if (had_ambiguous_result) { fprintf(stderr, "No output written, there were ambiguous exit values for accepting states\n"); exit(2); } if (!uncompressed_dfa) { if (verbose) fprintf(stderr, "\nCompressing DFA...\n"); ndfa = compress_dfa(dfas, ndfa, ntokens); } if (verbose) fprintf(stderr, "\nCompressing transition tables...\n"); compress_transition_table(dfas, ndfa, ntokens); if (report) { fprintf(report, "-------------------------------\n" "DFA structure after compression\n" "-------------------------------\n"); } if (verbose) fprintf(stderr, "Writing outputs...\n"); print_dfa(main_block); print_exitval_table(main_block); print_attribute_table(); if (uncompressed_tables) { print_uncompressed_tables(main_block); } else { print_compressed_tables(main_block); } if (report) { fclose(report); report = NULL; } return result; } jbofihe-0.38/dfasyn/n2d.h100644 765 764 15120 7350750743 14253 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dfasyn/n2d.h,v 1.1 2001/07/12 21:15:35 richard Exp $ Header file for NFA->DFA conversion utility. ***************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #ifndef N2D_H #define N2D_H #include #include #include #define new(T) ((T *) malloc(sizeof(T))) #define new_array(T,N) ((T *) malloc((N) * sizeof(T))) #define resize_array(T,arr,newN) ((T *) ((arr) ? realloc(arr,(newN)*sizeof(T)) : malloc((newN)*sizeof(T)))) #define new_string(s) strcpy((char *)malloc((strlen(s)+1)*sizeof(char)),s) /* For typecasting, especially useful for declarations of local ptrs to args of a qsort comparison fn */ #define Castdecl(x, T, nx) T nx = (T) x #define Castderef(x, T, nx) T nx = *(T*) x /* Globally visible options to control reporting */ extern FILE *report; extern int verbose; struct State; struct Block; typedef struct Translist { struct Translist *next; int token; char *ds_name; struct State *ds_ref; } Translist; typedef struct Stringlist { struct Stringlist *next; char *string; } Stringlist; typedef struct State { char *name; int index; /* Array index in containing block */ struct Block *parent; Translist *transitions; Stringlist *exitvals; Stringlist *attributes; /* Pointers to the nodes in the 'transitions' list, sorted into canonical order */ Translist **ordered_trans; int n_transitions; unsigned char removed; /* Flag indicating state has been pruned by compression stage */ } State; typedef struct S_Stateset { State **states; int nstates; int maxstates; } Stateset; #define HASH_BUCKETS 64 #define HASH_MASK (HASH_BUCKETS-1) typedef struct Block { char *name; /* The master table of states within this block. This has to be in a flat array because we have to work with respect to state indices when doing the 2D bitmap stuff for the subset construction. */ State **states; int nstates; int maxstates; /* Hash table for getting rapid access to a state within the block, given its name */ Stateset state_hash[HASH_BUCKETS]; int subcount; /* Number for generating substates */ } Block; typedef struct { unsigned long *nfas; unsigned long signature; /* All the longwords in the nfas array xor'ed together */ int index; /* Entry's own index in the array */ int *map; /* index by token code */ int from_state; /* the state which provided the first transition to this one (leading to its creation) */ int via_token; /* the token through which we got to this state the first time. */ Stringlist *nfa_exit_sl; /* NFA exit values */ Stringlist *nfa_attr_sl; /* NFA exit values */ char *result; /* Result token, computed by boolean expressions defined in input text */ int result_early; /* If !=0, the scanner is expected to exit immediately this DFA state is entered. It means that no out-bound transitions have to be created. */ char *attribute; /* Attribute token, computed by boolean expressions defined in input text */ /* Fields calculated in compdfa.c */ /* The equivalence class the state is in. */ int eq_class; /* Temp. storage for the new eq. class within a single pass of the splitting alg. */ int new_eq_class; /* Signature field from above is also re-used. */ int is_rep; /* Set if state is chosen as the representative of its equivalence class. */ int new_index; /* New index assigned to the state. */ /* Fields calculated in tabcompr.c */ unsigned long transition_sig; /* Default state, i.e. the one that supplies transitions for tokens not explicitly listed for this one. */ int defstate; /* Number of transitions that this state has different to those in the default state. */ int best_diff; } DFANode; /* Constants for 'create' args */ #define USE_OLD_MUST_EXIST 0 #define CREATE_MUST_NOT_EXIST 1 #define CREATE_OR_USE_OLD 2 State *get_curstate(void); struct Abbrev; extern struct Abbrev * create_abbrev(char *name); extern void add_tok_to_abbrev(struct Abbrev *abbrev, char *tok); int lookup_token(char *name, int create); Block *lookup_block(char *name, int create); State *lookup_state(Block *in_block, char *name, int create); Stringlist * add_token(Stringlist *existing, char *token); void add_transitions(State *curstate, Stringlist *tokens, char *destination); State * add_transitions_to_internal(Block *curblock, State *addtostate, Stringlist *tokens); void add_exit_value(State *curstate, char *value); void set_state_attribute(State *curstate, char *name); void instantiate_block(Block *curblock, char *block_name, char *instance_name); void fixup_state_refs(Block *b); void compress_nfa(Block *b); /* In expr.c */ typedef struct Expr Expr; typedef struct evaluator Evaluator; extern Evaluator *exit_evaluator; extern Evaluator *attr_evaluator; Expr * new_wild_expr(void); Expr * new_not_expr(Expr *c); Expr * new_and_expr(Expr *c1, Expr *c2); Expr * new_or_expr(Expr *c1, Expr *c2); Expr * new_xor_expr(Expr *c1, Expr *c2); Expr * new_cond_expr(Expr *c1, Expr *c2, Expr *c3); Expr * new_sym_expr(char *sym_name); void define_symbol(Evaluator *x, char *name, Expr *e); void define_result(Evaluator *x, char *string, Expr *e, int early); void define_symresult(Evaluator *x, char *string, Expr *e, int early); void define_defresult(Evaluator *x, char *string); void clear_symbol_values(Evaluator *x); void set_symbol_value(Evaluator *x, char *sym_name); int evaluate_result(Evaluator *x, char **, int *); void define_defresult(Evaluator *x, char *text); void define_type(Evaluator *x, char *text); char* get_defresult(Evaluator *x); char* get_result_type(Evaluator *x); void eval_initialise(void); void compress_transition_table(DFANode **dfas, int ndfas, int ntokens); unsigned long increment(unsigned long x, int field); unsigned long count_bits_set(unsigned long x); /* Return new number of DFA states */ int compress_dfa(DFANode **dfas, int ndfas, int ntokens); #endif /* N2D_H */ jbofihe-0.38/dfasyn/parse.y100644 765 764 14646 7350750743 14737 0ustar richardruser/********************************************************************** $Header: /cvs/src/jbofihe/dfasyn/parse.y,v 1.1 2001/07/12 21:15:35 richard Exp $ Grammar definition for input files defining an NFA *********************************************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ %{ #include "n2d.h" static Block *curblock = NULL; /* Current block being built */ static State *curstate = NULL; /* Current state being worked on */ static State *addtostate = NULL; /* Current state (incl ext) to which transitions are added */ static struct Abbrev *curabbrev = NULL; /* Current definition being worked on */ static Stringlist *curtranslist = NULL; /* Transition list prior to ARROW */ /* Prefix set by prefix command */ char *prefix = NULL; State *get_curstate(void) { return curstate; } %} %union { char *s; int i; Stringlist *sl; Expr *e; } %token STRING STATE TOKENS PREFIX ARROW BLOCK ENDBLOCK COLON EQUAL SEMICOLON COMMA %token ABBREV DEFINE %type STRING option %type option_seq transition_seq %type expr %token RESULT SYMBOL SYMRESULT DEFRESULT %token EARLYRESULT EARLYSYMRESULT %token TYPE %token ATTR DEFATTR %token STAR %right QUERY COLON %left PIPE %left XOR %left AND %left NOT %left LPAREN RPAREN %% all : decl_seq ; decl_seq : /* empty */ | decl_seq decl ; decl : block_decl | tokens_decl | prefix_decl | abbrev_decl | result_decl | attr_decl ; /* Don't invalidate curstate at the end, this is the means of working out the starting state of the NFA */ block_decl : block1 block2 { fixup_state_refs(curblock); curblock = NULL; } ; block1 : BLOCK STRING { curblock = lookup_block($2, CREATE_MUST_NOT_EXIST); addtostate = curstate = NULL; } ; block2 : instance_decl_seq state_decl_seq ENDBLOCK ; prefix_decl : PREFIX STRING { prefix = $2; }; tokens_decl : TOKENS token_seq ; abbrev_decl : ABBREV STRING { curabbrev = create_abbrev($2); } EQUAL string_pipe_seq ; token_seq : token_seq token | token ; string_pipe_seq : string_pipe_seq PIPE STRING { add_tok_to_abbrev(curabbrev, $3); } | STRING { add_tok_to_abbrev(curabbrev, $1); } ; token : STRING { (void) lookup_token($1, CREATE_MUST_NOT_EXIST); } instance_decl_seq : /* empty */ | instance_decl_seq instance_decl ; state_decl_seq : /* empty */ | state_decl_seq state_decl ; state_decl : STATE STRING { addtostate = curstate = lookup_state(curblock, $2, CREATE_OR_USE_OLD); } opt_state_attribute sdecl_seq ; opt_state_attribute : LPAREN STRING RPAREN { set_state_attribute(curstate, $2); } | /* empty */ ; sdecl_seq : /* empty */ | sdecl_seq sdecl ; sdecl : transition_decl ; instance_decl : STRING COLON STRING { instantiate_block(curblock, $3 /* master_block_name */, $1 /* instance_name */ ); } ; transition_decl : transition_seq ARROW { curtranslist = $1; } destination_seq { addtostate = curstate; } | transition_seq EQUAL STRING { addtostate = add_transitions_to_internal(curblock, addtostate, $1); add_exit_value(addtostate, $3); addtostate = curstate; } ; destination_seq : STRING { add_transitions(addtostate, curtranslist, $1); } | destination_seq COMMA STRING { add_transitions(addtostate, curtranslist, $3); } ; transition_seq : option_seq { $$ = $1; } | transition_seq SEMICOLON option_seq { addtostate = add_transitions_to_internal(curblock, addtostate, $1); $$ = $3; } ; option_seq : option { $$ = add_token(NULL, $1); } | option_seq PIPE option { $$ = add_token($1, $3); } ; option : STRING | /* empty */ { $$ = NULL; } ; result_decl : RESULT STRING { define_result(exit_evaluator, $2, NULL, 0); } | RESULT expr ARROW STRING { define_result(exit_evaluator, $4, $2, 0); } | EARLYRESULT STRING { define_result(exit_evaluator, $2, NULL, 1); } | EARLYRESULT expr ARROW STRING { define_result(exit_evaluator, $4, $2, 1); } | SYMRESULT expr ARROW STRING { define_symresult(exit_evaluator, $4, $2, 0); } | EARLYSYMRESULT expr ARROW STRING { define_symresult(exit_evaluator, $4, $2, 1); } | SYMBOL STRING EQUAL expr { define_symbol(exit_evaluator, $2, $4); } | DEFRESULT STRING { define_defresult(exit_evaluator, $2); } | TYPE STRING { define_type(exit_evaluator, $2); } ; /* No 'early exit' form for attributes. They are supposed to be actions that are done en-route to the final exit condition. */ attr_decl : ATTR RESULT STRING { define_result(attr_evaluator, $3, NULL, 0); } | ATTR RESULT expr ARROW STRING { define_result(attr_evaluator, $5, $3, 0); } | ATTR SYMRESULT expr ARROW STRING { define_symresult(attr_evaluator, $5, $3, 0); } | ATTR SYMBOL STRING EQUAL expr { define_symbol(attr_evaluator, $3, $5); } | ATTR DEFRESULT STRING { define_defresult(attr_evaluator, $3); } | DEFATTR STRING { define_defresult(attr_evaluator, $2); } | ATTR TYPE STRING { define_type(attr_evaluator, $3); } ; expr : NOT expr { $$ = new_not_expr($2); } | expr AND expr { $$ = new_and_expr($1, $3); } | expr PIPE /* OR */ expr { $$ = new_or_expr($1, $3); } | expr XOR expr { $$ = new_xor_expr($1, $3); } | expr QUERY expr COLON expr { $$ = new_cond_expr($1, $3, $5); } | LPAREN expr RPAREN { $$ = $2; } | STRING { $$ = new_sym_expr($1); } | STAR { $$ = new_wild_expr(); } ; jbofihe-0.38/dfasyn/scan.l100644 765 764 7300 7350750743 14501 0ustar richardruser/********************************************************************** $Header: /cvs/src/jbofihe/dfasyn/scan.l,v 1.1 2001/07/12 21:15:35 richard Exp $ Lexical analyser definition for input files defining an NFA *********************************************************************/ /* Copyright (C) Richard P. Curnow 2000-2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ %{ #include "n2d.h" #include "parse.h" int lineno = 1; %} %x PASSTHRU %x STR %% STATE|State|state { return STATE; } ABBREV|Abbrev|abbrev { return ABBREV; } DEFINE|Define|define { return DEFINE; } TOKENS|Tokens|tokens { return TOKENS; } PREFIX|Prefix|prefix { return PREFIX; } BLOCK|Block|block { return BLOCK; } ENDBLOCK|EndBlock { return ENDBLOCK; } Endblock|endblock { return ENDBLOCK; } TYPE|Type|type { return TYPE; } RESULT|Result|result { return RESULT; } EARLYRESULT { return EARLYRESULT; } EarlyResult { return EARLYRESULT; } Earlyresult { return EARLYRESULT; } earlyresult { return EARLYRESULT; } ATTRIBUTE|ATTR { return ATTR; } Attribute|Attr { return ATTR; } attribute|attr { return ATTR; } DEFATTR|DefAttr { return DEFATTR; } Defattr|defattr { return DEFATTR; } DEFRESULT|DefResult { return DEFRESULT; } Defresult|defresult { return DEFRESULT; } SYMBOL|Symbol|symbol { return SYMBOL; } SYMRESULT|SymResult { return SYMRESULT; } Symresult|symresult { return SYMRESULT; } EARLYSYMRESULT { return EARLYSYMRESULT; } EarlySymResult { return EARLYSYMRESULT; } EarlySymresult { return EARLYSYMRESULT; } Earlysymresult { return EARLYSYMRESULT; } earlysymresult { return EARLYSYMRESULT; } [A-Za-z0-9_.]+ { yylval.s = new_string(yytext); return STRING; } \#.*$ { /* strip comments */ } \-\> { return ARROW; } = { return EQUAL; } \| { return PIPE; /* OR */ } \& { return AND; } \~ { return NOT; } \! { return NOT; } \^ { return XOR; } \* { return STAR; } \? { return QUERY; } \: { return COLON; } \; { return SEMICOLON; } \( { return LPAREN; } \) { return RPAREN; } \, { return COMMA; } \n { lineno++; } [ \t]+ { /* ignore */ } ^\%\{[ \t]*\n { BEGIN PASSTHRU; } \" { BEGIN STR; } ^\%\}[ \t]*\n { BEGIN INITIAL; } \n { fputs(yytext, yyout); lineno++; } .+ { fputs(yytext, yyout); } \" { BEGIN INITIAL; } [^"]* { yylval.s = new_string(yytext); return STRING; } jbofihe-0.38/dfasyn/tabcompr.c100644 765 764 12711 7350750743 15375 0ustar richardruser/*************************************** $Header: /cvs/src/jbofihe/dfasyn/tabcompr.c,v 1.1 2001/07/12 21:15:35 richard Exp $ Routines to compress the DFA transition tables, by identifying where two DFA states have a lot of transitions the same. ***************************************/ /* Copyright (C) Richard P. Curnow 2001 */ /* * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ #include "n2d.h" /* ================================================================= */ /* Treat 'x' as a set of 16 bit pairs, with field (0..15) specifying which. Increment the field'th bit pair as a gray code, in the pattern 00->01->11->10->00 */ unsigned long increment(unsigned long x, int field) { int f2 = field + field; static unsigned char transxor[4] = {1, 2, 2, 1}; unsigned long g = x >> f2; unsigned long h = transxor[g&3]; return x ^ (h<>1) & c) + (y & c); c = 0x33333333UL; y = ((y>>2) & c) + (y & c); y = (y>>4) + y; c = 0x0f0f0f0fUL; y &= c; y = (y>>8) + y; y = (y>>16) + y; return y & 0x1f; } /* ================================================================= */ /* Compute 'signatures' of the transitions out of a particular state. The signature is given by considering the destination state numbers mod 16, and counting how many transitions there are in each resulting equivalence class. The number is encoded using the gray code implied by the increment fn. */ static void compute_transition_sigs(DFANode **dfas, int ndfas, int ntokens) { int i, j; for (i=0; imap[j]; dest &= 0xf; /* 16 bit pairs in 'ts' */ ts = increment(ts, dest); } dfas[i]->transition_sig = ts; } } /* ================================================================= */ #define REQUIRED_BENEFIT 2 static void find_default_states(DFANode **dfas, int ndfas, int ntokens) { int i, j, t; int best_index; int best_diff; int trans_count; /* Number of transitions in working state */ unsigned long tsi; for (i=0; imap[t] >= 0) trans_count++; } dfas[i]->defstate = -1; /* not defaulted */ best_index = -1; best_diff = ntokens + 1; /* Worse than any computed value */ tsi = dfas[i]->transition_sig; for (j=0; jdefstate >= 0) continue; /* Avoid chains of defstates */ tsj = dfas[j]->transition_sig; /* This is the heart of the technique : if we xor two vectors of bit pairs encoded with the gray code above, and count the number of bits set in the result, we get the sum of absolute differences of the bit pairs. The number of outgoing transitions that differ between the states must be _at_least_ this value. It may in fact be much greater (i.e. we may get 'false matches'). However, this algorithm is a quick way of filtering most of the useless potential default states out. */ sigdiff = tsi ^ tsj; diffsize = count_bits_set(sigdiff); if (diffsize >= best_diff) continue; if (diffsize >= trans_count) continue; /* Else pointless! */ /* Otherwise, do an exact check (i.e. see how much false matching we suffered). */ diffsize = 0; for (t=0; tmap[t] != dfas[j]->map[t]) { diffsize++; } } if (((best_index < 0) || (diffsize < best_diff)) && (diffsize < (trans_count - REQUIRED_BENEFIT))) { best_index = j; best_diff = diffsize; } } dfas[i]->defstate = best_index; dfas[i]->best_diff = best_diff; } } /* ================================================================= */ void compress_transition_table(DFANode **dfas, int ndfas, int ntokens) { compute_transition_sigs(dfas, ndfas, ntokens); find_default_states(dfas, ndfas, ntokens); } /* ================================================================= */ #ifdef TEST int main () { unsigned long x = 0; unsigned long x1, x2, x3, x4; x1 = increment(x, 2); x2 = increment(x1, 2); x3 = increment(x2, 2); x4 = increment(x3, 2); printf("%d %d %d %d %d\n", x, x1, x2, x3, x4); printf("1=%d\n", count_bits_set(0x00000001)); printf("2=%d\n", count_bits_set(0x00000003)); printf("3=%d\n", count_bits_set(0x00000007)); printf("4=%d\n", count_bits_set(0x0000000f)); printf("4=%d\n", count_bits_set(0xf0000000)); return 0; } #endif jbofihe-0.38/testing/ 40755 765 764 0 7350750744 13475 5ustar richardruserjbofihe-0.38/testing/jvocipra.pl100644 765 764 6574 7350750743 15757 0ustar richardruser#!/usr/bin/env perl # # $Header: /cvs/src/jbofihe/testing/jvocipra.pl,v 1.2 2001/07/10 22:18:06 richard Exp $ # Perl script for chaining jvocu'adju and vlatai together to look for failures on random input. # Copyright 2001 Richard P. Curnow # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # @gc = (); $| = 1; # autoflush open (IN, "<../reduced_gismu"); while () { chomp; m{^([^ \t]+)[ \t]}o; $word = $1; $word =~ s/\'/\\'/o; push (@gc, $word); } close (IN); srand; $ngc = 1 + $#gc; $kk = 0; main_loop: while (1) { ++$kk; if (($kk%500) == 0) { print "$kk\n"; } @args = (); $shown_args = 0; $n = 2 + int (6 * &Rng::rng()); for $i (1 .. $n) { while (1) { # For final component, can't have a cmavo, unless that cmavo has a # rafsi ending in a vowel. Don't know that in here, so be # pessimistic. $e = int(&Rng::rng() * $ngc); $w = $gc[$e]; # Lujvo canonicaliser in vlatai reverses brody to brodu always, so # lots of bogus failures will occur unless the other four are avoided. next if ($w =~ /brod[aeio]/o); if (($i < $n) || (length ($w) == 5)) { push (@args, $gc[$e]); last; } } } @lujvo = (); # alleged lujvo for this tanru $args = join(" ", @args); # print $args."\n"; open (IN, "../jvocuhadju -l -a $args 2>&1 |"); while () { chomp; if (/unmatched/io) { # Due to picking a cmavo as the last tanru component where that cmavo # has no rafsi ending in a vowel. next main_loop; } if (/^[ \t]+[0-9]+[ \t]+([^ \t]+)/) { push (@lujvo, $1); } } close (IN); open (OUT, ">temp_vt.in"); for $i (@lujvo) { print OUT "$i\n"; } close (OUT); open (IN, "../vlatai -el < temp_vt.in |"); while () { chomp; m{^([^:]+):([^:]+):(.+[^\s])\s+\[([^]]+)\]\s*$}o or die "Unmatched $_"; $a = $1; $b = $2; $c = $3; $d = $4; $b =~ s/^ +//o; $b =~ s/ +$//o; $c =~ s/^ +//o; $c =~ s/ +$//o; $d =~ s/\+/ /go; $d =~ s/\'/\\'/go; if (($b ne "lujvo") || ($c =~ / /) || ($d ne $args)) { print "$args\n" unless ($shown_args); $shown_args = 1; print "###$b:$c\n"; } } close(IN); } package Rng; BEGIN { $rng_open = 0; } sub rng { if (!$rng_open) { open (RNG, ""jbofihe -x -b", stdin => "mi klama le zdani"; # # Multiple &test lines can appear. # # The specified program will be run with the specified arguments and text on # its standard input. The results (exit status + data written to stdout and # stder) will be gathered in a file with the .out suffix replacing .in. If a # file with the .ref suffix exists, .out and .ref are compared to determine # whether the test has passed. The first time a new test is run, the .out file # is manually checked and moved to the .ref file if acceptable. This way, # regression failures can be detected. ####################################################################### $| = 1; # Autoflush stdout $here = $0; $here =~ s=/[^/]+$==; $ENV{JBOFIHE_DICTIONARY} = "$here/../smujmaji.dat"; $ENV{PATH} = "$here/..:".$ENV{PATH}; while ($test = shift @ARGV) { unless (-r $test) { print "No such test [$test]\n"; next; } $base = $test; $base =~ s/\.in$//o; $out = $base.".out"; $ref = $base.".ref"; print "Running $base .. "; $cmd = "perl -I$here $test $out"; system ($cmd); if (-r "$ref") { system ("diff $out $ref > /dev/null"); $status = $? >> 8; if ($status == 0) { print "passed\n"; unlink $out; # No need to keep this if all is OK } elsif ($status == 1) { print "FAILED\n"; } elsif ($status == 2) { print "COULD NOT DIFF RESULTS\n"; } } else { system ("egrep '###FAILURE###' $out > /dev/null"); $status = $? >> 8; if ($status == 0) { print "NO REFERENCE, SOME CASES FAILED\n"; } else { print "NO REFERENCE RESULT\n"; } } } jbofihe-0.38/testing/testpak.pl100644 765 764 10253 7350750744 15623 0ustar richardruser#!/usr/bin/env perl # $Header: /cvs/src/jbofihe/testing/testpak.pl,v 1.4 2001/01/14 14:07:14 richard Exp $ # Perl package for supporting regression tests. # # Copyright (C) Richard P. Curnow 1998-2001 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # local *LOG; my $inited = 0; ####################################################################### sub putfile { my ($text, $name) = @_; open (OUT, ">$name") || die "Can't open $name for output"; print OUT $text; close(OUT); } ####################################################################### sub copy { my ($from, $log) = @_; open (IN, "<$from") || die "Can't open $from for input"; while () { print $log $_; } close (IN); } ####################################################################### sub preen { my ($x) = @_; $x =~ s/\t/ /go; $x =~ s/^ +//o; $x =~ s/ +$//o; return $x; } ####################################################################### sub openlog { my $name = $ARGV[0]; if (defined $name) { open (LOG, ">$name"); } else { open (LOG, ">&STDOUT"); } } ####################################################################### sub test { local %_ = @_; if (!$inited) { $inited = 1; &openlog(); } my ($program, $stdin, $inputs, $outputs, $notes, $expect, $pid); $program = $_{prog}; $program = $_{program} unless (defined $program); $program = $prog unless (defined $program); die "No program defined" unless (defined $program); $stdin = $_{stdin}; $stdin = $_{text} unless (defined $stdin); $stdin = $_{in} unless (defined $stdin); $inputs = $_{inputs}; $outputs = $_{outputs}; $expect = $_{expect}; $notes = $_{notes}; $notes = $_{note} unless (defined $notes); if (defined $stdin) { &putfile($stdin, "__STDIN"); } my $testsep = ('#' x 60)."\n"; my $bigsep = ('=' x 40)."\n"; my $medsep = ('-' x 25)."\n"; my $sep = ('-' x 10)."\n"; print LOG $testsep; print LOG "PROGRAM : $program\n"; print LOG $bigsep; if (defined $stdin) { print LOG "STDIN :\n"; print LOG $sep; print LOG $stdin."\n"; print LOG $medsep; } if (defined $inputs) { $inputs = &preen($inputs); my @inputs = split / +/, $inputs; foreach my $x (@inputs) { print LOG "$x\n"; print LOG $sep; ©($x, *LOG); print $medsep; } } print LOG $bigsep; if (defined $notes) { print LOG "NOTE : "; print LOG $notes."\n"; print LOG $bigsep; } # Now actually do the run if (defined $stdin) { open (STDIN, "<__STDIN"); } open (STDOUT, ">__STDOUT"); open (STDERR, ">__STDERR"); $program =~ s/\'/\\'/go; my $cmd = "/bin/sh -c \"$program\""; system ($cmd); my $status = $? >> 8; my $dumped_core = $? & 128; my $signal = $? & 127; print LOG "Exit status : $status\n"; if (defined $expect && $status != $expect) { print LOG " ###FAILURE### ---> EXPECTED STATUS WAS $expect\n"; } print LOG "Core dumped : ", ($dumped_core ? "YES" : "NO"), "\n"; print LOG "Signal : $signal\n"; print LOG $bigsep; foreach my $x ("__STDOUT", "__STDERR", @outputs) { print LOG "$x\n"; print LOG $sep; ©($x, *LOG); print LOG $medsep; } unlink("__STDIN"); unlink("__STDOUT"); unlink("__STDERR"); } ####################################################################### 1;