29d9d12a26718405763103e997285026f8fd4563,pysbd/segmenter.py,Segmenter,sentences_with_char_spans,#Segmenter#Any#,50

Before Change


        // since SENTENCE_BOUNDARY_REGEX doesnt account
        // for trailing whitespaces \s* is used as suffix
        // to keep non-destructive text after segments joins
        return [TextSpan(m.group(), m.start(), m.end()) for sent in sentences
                for m in re.finditer("{0}\s*".format(re.escape(sent)),
                self.original_text)]

    def segment(self, text):
        self.original_text = text
        if not text:

After Change


        // since SENTENCE_BOUNDARY_REGEX doesnt account
        // for trailing whitespaces \s* is used as suffix
        // to keep non-destructive text after segments joins
        sent_spans = set((match.group(), match.start(), match.end()) for sent in sentences
                for match in re.finditer("{0}\s*".format(re.escape(sent)),
                self.original_text))
        sorted_spans = sorted(sent_spans, key=lambda x: x[1])
        return [TextSpan(sent, start, end) for sent, start, end in sorted_spans]

    def segment(self, text):
        self.original_text = text
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nipunsadvilkar/pySBD
Commit Name: 29d9d12a26718405763103e997285026f8fd4563
Time: 2020-07-21
Author: nipunsadvilkar@gmail.com
File Name: pysbd/segmenter.py
Class Name: Segmenter
Method Name: sentences_with_char_spans


Project Name: mariogeiger/se3cnn
Commit Name: de2a2e1f27f270b68f91e2c0f1477d5a2b15f08f
Time: 2017-08-11
Author: geiger.mario@gmail.com
File Name: se3_cnn/non_linearities/norm_activation.py
Class Name: NormReluFunction
Method Name: forward


Project Name: reinforceio/tensorforce
Commit Name: 603026f0325339c6412e5c045b5149f351bd1778
Time: 2019-02-06
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/optimizers/solvers/iterative.py
Class Name: Iterative
Method Name: tf_solve