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
The Sentence object has .previous_sentence() and .next_sentence() methods to point to the previous and next sentence in the same document respectively. However, our sentence splitters currently do not set these fields.
To Reproduce
fromflair.splitterimportSegtokSentenceSplittertext="This is a text. I am happy."splitter=SegtokSentenceSplitter()
sentences=splitter.split(text)
forsentenceinsentences:
print("--")
print(sentence)
print(sentence.previous_sentence())
print(sentence.next_sentence())
Expected behavior
The printouts for previous and next sentence should be set where appropriate.
Logs and Stack traces
No response
Screenshots
No response
Additional Context
No response
Environment
Versions:
Flair
0.13.1
Pytorch
2.0.0+cu117
Transformers
4.31.0
GPU
False
The text was updated successfully, but these errors were encountered:
Describe the bug
The
Sentence
object has.previous_sentence()
and.next_sentence()
methods to point to the previous and next sentence in the same document respectively. However, our sentence splitters currently do not set these fields.To Reproduce
Expected behavior
The printouts for previous and next sentence should be set where appropriate.
Logs and Stack traces
No response
Screenshots
No response
Additional Context
No response
Environment
Versions:
Flair
0.13.1
Pytorch
2.0.0+cu117
Transformers
4.31.0
GPU
False
The text was updated successfully, but these errors were encountered: