diff --git a/instant-segment-py/src/lib.rs b/instant-segment-py/src/lib.rs index 4a00b39..50f431c 100644 --- a/instant-segment-py/src/lib.rs +++ b/instant-segment-py/src/lib.rs @@ -95,11 +95,11 @@ impl Segmenter { /// /// Returns the relative probability for the given sentence in the the corpus represented by /// this `Segmenter`. Will return `None` iff given an empty iterator argument. - fn sentence_score(&self, words: &PyIterator) -> PyResult> { + fn score_sentence(&self, words: &PyIterator) -> PyResult> { let words = words .map(|s| s?.extract::<&str>()) .collect::, _>>()?; - Ok(self.inner.sentence_score(words.into_iter())) + Ok(self.inner.score_sentence(words.into_iter())) } } diff --git a/instant-segment/src/lib.rs b/instant-segment/src/lib.rs index 0d1da88..e2e3184 100644 --- a/instant-segment/src/lib.rs +++ b/instant-segment/src/lib.rs @@ -70,7 +70,7 @@ impl Segmenter { /// /// Returns the relative probability for the given sentence in the the corpus represented by /// this `Segmenter`. Will return `None` iff given an empty iterator argument. - pub fn sentence_score<'a>(&self, mut words: impl Iterator) -> Option { + pub fn score_sentence<'a>(&self, mut words: impl Iterator) -> Option { let mut prev = words.next()?; let mut score = self.score(prev, None); while let Some(word) = words.next() {