Old code of splitting sentences had same caveats, which include.
If the input text was a single really really long sentence it wouldn't get split
It could shuffle the order of the sentences, I had an instance where it would just return the same array but with the first sentence being the last.
Data in case you want to replicate the bug. Data is in Spanish but it should be the same regardless the language if you manage to get sentences this long:
sentences =
['Absolutamente todos los profesores de informática que he tenido:', '¿', 'Oye sabéis que se ha detectado que los hombres que compran pañales también compran cerveza?']
This code has however, one problem as well:
It only merges up to two small sentences even while more small sentences may be merged
Feel free to comment, change/review the code, accept or reject this PR.
Thanks
Old code of splitting sentences had same caveats, which include.
This code has however, one problem as well:
Feel free to comment, change/review the code, accept or reject this PR. Thanks