def print_GF(lemma,surface): token_id=createGFToken(lemma,u"Adv") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : Adv ;") else: uniprint(u"lin "+token_id+u" = mkAdv \""+surface+u"\" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF(token,ms,mp,fs,fp): token_id=createGFToken(token,u"A") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : A ;") else: uniprint(u"lin "+token_id+u" = mk4A "+u" ".join([ u"\""+form+u"\"" for form in [ms,fs,mp,fp] ])+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF_genitive( token, sgForm,plForm, sgGenForm, plGenForm): token_id=createGFToken(token,u"N") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : N ;") else: uniprint(u"lin "+token_id+u" = mkN "+u" ".join([ u"\""+form+u"\"" for form in [sgForm,plForm, sgGenForm, plGenForm] ])+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF_synthetic(lemma,baseform,comparativeForm): token_id=createGFToken(lemma,u"A") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : A ;") else: uniprint(u"lin "+token_id+" = mkA \""+baseform+"\" \""+comparativeForm+"\" ;") #don't print an entry with the same token again ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF(token,gender,sgForm,plForm): genderDict= {u"m":u"masculine", u"f":u"feminine" } token_id=createGFToken(token,u"N") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : N ;") else: uniprint(u"lin "+token_id+u" = mkN "+u" ".join([ u"\""+form+u"\"" for form in [sgForm, plForm] ] + [genderDict[gender]])+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF(token,gender,surfaceForm): genderDict= {u"m":u"masculine", u"f":u"feminine" } token_id=createGFToken(token,u"PN") if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : PN ;") else: uniprint(u"lin "+token_id+u" = mkPN \""+surfaceForm+u"\" "+genderDict[gender]+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF(lemma, forms, valency=u"V"): if not valency in [u"V",u"V2",u"V3",u"VS",u"VV",u"VA",u"VQ"]: uniprint(u"unknown valency: "+valency,True) return token_id=createGFToken(lemma,valency) if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : "+valency+" ;") else: uniprint(u"lin "+token_id+u" = "+ ( u"mk"+valency+u" (" if valency != u"V" else u"" ) +u" mkV "+u" ".join([ u"\""+form+u"\"" for form in forms ])+u" "+( u")" if valency != u"V" else u"" )+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)
def print_GF(token,forms,valency=u"V"): if not valency in [u"V",u"V2",u"V3",u"VS",u"VV",u"VA",u"VQ"]: uniprint(u"unknown valency: "+valency,True) return token_id=createGFToken(token,valency) if ApertiumLexformGroupProcessor.can_print(token_id): if ApertiumLexformGroupProcessor.printOnlyTokens: uniprint(token_id+u" : "+valency+" ;") else: addValencyStart=u"" addValencyEnd=u"" if valency != u"V": addValencyEnd=u")" if valency == u"V3": addValencyStart= u"dirdirV3 (" else: addValencyStart= u"mk"+valency+u" (" uniprint(u"lin "+token_id+u" = "+addValencyStart+u" verboV (allforms_67 "+u" ".join([ u"\""+form+u"\"" for form in forms ])+u" ) "+addValencyEnd+u" ;") ApertiumLexformGroupProcessor.add_to_blacklist(token_id)