1
0
forked from GitHub/gf-rgl
This commit is contained in:
Ayberk Tosun
2017-08-22 17:49:59 +03:00
2 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
Library browser grammars
AR
22 August 2017
Grammars for finding LGR API terms by parsing strings.
Two versions:
LibraryBrowser*.gf -- uses Grammar + Lexicon (the RGL test lexicon)
LargeLibraryBrowser*.gf -- uses Grammar + Dictionary (the wide-coverage translation dictionary)
Two "user interfaces":
GF cloud minibar: select grammar LibraryBrowser.pgf
GF shell parsing in Eng and linearizing to API; reranking to get the "best" syntactic combinations
> i LargeLibraryBrowserEng.gf
> i LargeLibraryBrowserAPI.gf
> p -lang=Eng "the agreement will be valid notwithstanding the previous agreement" | rt -probs=../../translator/translate.probs | pt -number=1 | l -lang=API
mkUtt ( mkS futureTense ( mkCl ( mkNP the_Quant agreement_N ) ( mkVP ( mkVP valid_A ) ( mkAdv notwithstanding_Prep ( mkNP the_Quant ( mkCN ( mkAP previous_A ) ( mkCN agreement_N ) ) ) ) ) ) )
The resulting expression can be used in any concrete syntax that imports a Syntax and Dictionary implementation.
By changing the content words (e.g. agreement_N --> (mkN "agreement")) one can import Paradigms instead of Dictionary.

View File

@@ -16556,7 +16556,7 @@ lin kirkintilloch_PN = mkPN "Kirkintilloch" ; -- status=guess src=geonames
lin kirkwall_PN = mkPN "Kirkwall" ; -- status=guess src=geonames lin kirkwall_PN = mkPN "Kirkwall" ; -- status=guess src=geonames
lin kirsch_N = mkN "kirsch" masculine ; -- status=guess lin kirsch_N = mkN "kirsch" masculine ; -- status=guess
lin kiss_N = mkN "beso" ; -- status=guess lin kiss_N = mkN "beso" ; -- status=guess
lin kiss_V2 = mkV2 (mkV "besarse") ; -- status=guess lin kiss_V2 = mkV2 (mkV "besar") ; -- status=guess
lin kiss_off_V = advV (lin V OP_kiss_V2) OP_off_Adv ; -- guess-p-verb lin kiss_off_V = advV (lin V OP_kiss_V2) OP_off_Adv ; -- guess-p-verb
lin kiss_off_V2 = prepV2 (lin V OP_kiss_V2) OP_off_Prep ; -- guess-p-verb lin kiss_off_V2 = prepV2 (lin V OP_kiss_V2) OP_off_Prep ; -- guess-p-verb
lin kiss_up_to_V2 = prepV2 (advV (lin V OP_kiss_V2) OP_up_Adv ) OP_to_Prep ; -- guess-p-verb lin kiss_up_to_V2 = prepV2 (advV (lin V OP_kiss_V2) OP_up_Adv ) OP_to_Prep ; -- guess-p-verb