Changeset 268

Show
Ignore:
Timestamp:
01/06/08 00:14:24 (1 year ago)
Author:
chris
Message:

Add graphical pronominal suffix to all object types, optional on
all but verbs and nouns, and gloss from suffix fields.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lex/trunk/jsp/clause.jsp

    r263 r268  
    113113                "                    graphical_nominal_ending, " + 
    114114                "                    person, number, gender, state, " + 
    115                 "                    surface_consonants " + 
     115                "                    surface_consonants, " + 
     116                "                    suffix_person, suffix_number, suffix_gender " + 
    116117                "          ]"+ 
    117118                "        ]"+ 
     
    11581159                        EmdrosChange ch = (EmdrosChange)( 
    11591160                                emdros.createChange(EmdrosChange.CREATE, 
    1160                                         "note", null)); 
     1161                                        "note", new int[]{selClauseId})); 
    11611162                        ch.setString("text", newNoteText); 
    1162                         ch.setMonadsFromObjects(new int[]{selClauseId}); 
    11631163                        ch.execute(); 
    11641164                } 
  • lex/trunk/jsp/gen-export.jsp

    r263 r268  
    3737            "            graphical_preformative, graphical_root_formation, " + 
    3838            "            graphical_lexeme, graphical_verbal_ending, " + 
    39             "            graphical_nominal_ending, graphical_pron_suffix]" + 
     39            "            graphical_nominal_ending, graphical_pron_suffix, " + 
     40                    "            suffix_person, suffix_number, suffix_gender] " + 
    4041            " ]"+ 
    4142            "]" 
  • lex/trunk/jsp/parse.jsp

    r259 r268  
    271271                "                    graphical_root_formation, " + 
    272272                "                    graphical_nominal_ending, " + 
    273                 "                    person, number, gender, state " + 
     273                "                    person, number, gender, state, " + 
     274                "                    suffix_person, suffix_number, suffix_gender " + 
    274275                "          ]"+ 
    275276                "        ]"+ 
  • lex/trunk/src/com/qwirx/lex/morph/HebrewMorphemeGenerator.java

    r259 r268  
    6565                "tense", 
    6666                "stem", 
     67                "suffix_gender", 
     68                "suffix_number", 
     69                "suffix_person" 
    6770            })); 
    6871        } 
     
    8285        
    8386        String verbEnding = null; 
    84         String nounEnding = null;  
     87        String nounEnding = null; 
     88 
     89        String suffixText =  
     90            word.getEMdFValue("graphical_pron_suffix").getString(); 
     91        String suffixGloss = null; 
    8592         
    8693        if (generateGloss) 
     
    121128            verbEnding = person + gender + number; 
    122129            nounEnding = gender + number + state; 
     130             
     131            if (suffixText.equals("")) 
     132            { 
     133                suffixGloss = "SUFF"; 
     134            } 
     135            else 
     136            { 
     137                String suffixGender = word.getFeatureAsString( 
     138                    word.getEMdFValueIndex("suffix_gender")); 
     139                if      (suffixGender.equals("masculine")) { suffixGender = "M"; } 
     140                else if (suffixGender.equals("feminine"))  { suffixGender = "F"; } 
     141                else if (suffixGender.equals("common"))    { suffixGender = "="; } 
     142 
     143                String suffixNumber = word.getFeatureAsString( 
     144                    word.getEMdFValueIndex("suffix_number")); 
     145                if      (suffixNumber.equals("singular")) { suffixNumber = "sg"; } 
     146                else if (suffixNumber.equals("plural"))   { suffixNumber = "pl"; } 
     147 
     148                String suffixPerson = word.getFeatureAsString( 
     149                    word.getEMdFValueIndex("suffix_person")); 
     150                if      (suffixPerson.equals("first_person"))  { suffixPerson = "1"; } 
     151                else if (suffixPerson.equals("second_person")) { suffixPerson = "2"; } 
     152                else if (suffixPerson.equals("third_person"))  { suffixPerson = "3"; } 
     153                 
     154                suffixGloss = suffixPerson + suffixGender + suffixNumber; 
     155            } 
    123156        } 
    124157         
     
    160193                verbEnding, "V/PGN"); 
    161194 
    162             handler.convert("graphical_pron_suffix", true, "SUFF", "V/SFX"); 
     195            handler.convert("graphical_pron_suffix", true, suffixGloss, "V/SFX"); 
    163196        } 
    164197        else if (psp.equals("noun") 
     
    175208            handler.convert("graphical_nominal_ending", false, 
    176209                nounEnding, "MARK/N"); 
    177             handler.convert("graphical_pron_suffix", true, "SUFF", "SFX/N"); 
     210            handler.convert("graphical_pron_suffix", true, suffixGloss, "SFX/N"); 
    178211        } 
    179212        else 
     
    234267                    "part of speech: " + psp); 
    235268            } 
    236              
    237             handler.convert("graphical_lexeme", true, type, type); 
     269 
     270            boolean hasSuffix = !(suffixText.equals("")); 
     271            handler.convert("graphical_lexeme", !hasSuffix, type, type); 
     272             
     273            if (hasSuffix) 
     274            { 
     275                handler.convert("graphical_pron_suffix", true, 
     276                    suffixGloss, type + "/SFX"); 
     277            } 
    238278        }    
    239279