percyliang / sempre

Semantic Parser with Execution
Other
828 stars 301 forks source link

How to handle disambiguity in lexicon file? #205

Closed mr-asleep closed 4 years ago

mr-asleep commented 4 years ago

Hi, I have a lexicon file which contains different mapping for a same lexeme, for example, lexeme: Obama formula: fb:en.Obama lexeme: Obama formula: fb:en.Obama(city) How to assign different probabilities to the predicted derivations while training. This command doesn't seem to work:

./run @mode=simple -Grammar.inPaths data/tutorial-freebase.grammar -SimpleLexicon.inPaths data/tutorial-freebase.lexicon -FeatureExtractor.featureDomains rule -Dataset.inPaths train:data/tutorial-freebase.examples -Learner.maxTrainIters 3

Even after training, equal probabilities are assigned to both the derivations. In the tutorial they allowed disambiguation in grammar file, but my problem is disambiguation in the lexeme file. Do we have any command for that? Or any modification that needs to be done in the lexeme file, like assign any feature to the lexeme? Thanks in advance!!