python-3.xfreeling

Use Freeling with sentences without full stop at the end?


I have just started using Freeling, and I am using it to obtain the lemma form (get_lemma() ) and saving it on a string of some Spanish reviews I get from Google Maps API. Freeling works well with sentences that have full stop at the end (for example, “Buen lugar, comodo y agradable."), but it does not when the review doesn’t have full stop (for example, Buen lugar. Trato amigable). In that case, Freeling won’t return the lemma form of each one of the words in the sentence, so the string remains empty.

Is there any way of making Freeling return the lemma form of sentences that doesn’t have a full stop, other than adding it manually to the sentence?

I’m writting the code in Python, using the example from sample.py.

Thanks in advance.


Solution

  • You can add the option "flush=true" to the splitter.

    Please check the user manual, this is described there.

    If you ask your questions in FreeLing forum, answers may come faster...