CogComp / cogcomp-nlpy

CogComp's light-weight Python NLP annotators
http://nlp.cogcomp.org/
Other
116 stars 26 forks source link

method to return sent boundaries #108

Closed shyamupa closed 6 years ago

shyamupa commented 6 years ago

solving #72.

nitishgupta commented 6 years ago

I see @danyaljj has merged, but i had a comment: TA class already consists of self.sentence_end_position -- which is the end token index of each sentence. So I don't see the use case of this function. Also, you can simply make a new list with starting from '0' and end at the second-last element of this list. That won't require you to traverse through the sentences or sort a list. Maybe you can change the function to do that.

Apart from that some minor comments:

  1. The formatting of line 82 is very weird. Can you take the full message in a new line
  2. Can you please add a test case

@danyaljj can we make sure that tests are written before merging any new code. And for major changes we require to check that compatibility with Java is not broken?