You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve encountered some problem with the usage of previous() in Folia
As far as I see if the token is the first word of the sentence, and doesn’t return None, instead, it returns the last word of the previous sentence and sometimes even a word before that
and by the way, I explicitly define the sentence as a constraint like this : token.previous(folia.Word, [folia.Sentence])
This works well for the next, it returns None for the next token if the current token is the last word of a sentence. So “token.next(folia.Word, [folia.Sentence])“ works well
here are my observations:
flooding . None
--------------------
Prev | Token | Next
--------------------
flooding There was
here ‘flooding’ is the last word in the first sentence, and ‘There’ is the first word in the second sentence)
and for your information, previous() sometimes returns even before than the last word of the previous sentence
Here is the exapmle I’ve seen;
two days of
days of intense
of intense rainfall
intense rainfall .
rainfall . None
--------------------
Prev | Token | Next
--------------------
days A very
A very slow-moving
very slow-moving lo
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: