Closed lopezjuanma96 closed 2 years ago
the solution, for now, is to add exception to the infinitivation process depending on the word situation, for example "ganas" is not turned into "ganar" if "de" folllows it. we'll test it and see if it's necessary to do something else.
{ "words": ["yo", "tener", "ganas de", "comer", "una", "hamburguesa"], "types": ["SUBJ", "VERB", "PREP", "VERB", "PREP", "NOUN"], "language": "es", "props": {} }
results in
{ "sentence": [ { "words": [ "yo" ], "types": [ "SUBJ" ], "composed": false, "type": "SUBJ", "children": [], "meta": { "PERSON": "yo", "GENDER": "él" }, "props": {}, "position": 0, "headless": false }, { "words": [ "tengo gano de", "y", "como" ], "types": [ "CON", "VERB" ], "composed": true, "type": "VERB", "children": [ { "position": 0, "type": "SUBJ" } ], "meta": { "PERSON": "yo", "TIME": "presente" }, "props": {}, "position": 1, "headless": true }, { "words": [ "una", "hamburguesa" ], "types": [ "PREP", "NOUN" ], "composed": true, "type": "OBJ", "children": [], "meta": {}, "props": {}, "position": 2, "headless": true } ] }
because sequences are search while doing infinitives after joining verbs, then "tener ganas" is transformed into "tener ganar" even when "ganas de" is set up as a "PREP".
ALSO should look into the types of that verb token which are "CON" and "VERB"