@@ -43,8 +43,8 @@ bool IsPeriodSeparatedAcronym(const Token &token) {
43
43
44
44
// Returns true iff the token can appear after a space in a sentence-terminal
45
45
// token sequence.
46
- Status SpaceAllowedBeforeToken (const UnicodeUtil *util, const Token &token ,
47
- bool *result) {
46
+ absl:: Status SpaceAllowedBeforeToken (const UnicodeUtil *util,
47
+ const Token &token, bool *result) {
48
48
const tstring &word = token.word ();
49
49
bool is_ellipsis = false ;
50
50
TF_RETURN_IF_ERROR (util->IsEllipsis (word, &is_ellipsis));
@@ -77,8 +77,8 @@ class SentenceFragmenter::FragmentBoundaryMatch {
77
77
78
78
// Follows the state transition for the token at the given index. Returns
79
79
// true for success, or false if there was no valid transition.
80
- Status Advance (const UnicodeUtil *util, const Document &document, int index ,
81
- bool *result) {
80
+ absl:: Status Advance (const UnicodeUtil *util, const Document &document,
81
+ int index, bool *result) {
82
82
const Token &token = document.tokens ()[index ];
83
83
const tstring &word = token.word ();
84
84
bool no_transition = false ;
@@ -176,7 +176,7 @@ class SentenceFragmenter::FragmentBoundaryMatch {
176
176
int limit_index_ = -1 ;
177
177
};
178
178
179
- Status SentenceFragmenter::FindFragments (
179
+ absl:: Status SentenceFragmenter::FindFragments (
180
180
std::vector<SentenceFragment> *result) {
181
181
// Partition tokens into sentence fragments.
182
182
for (int i_start = 0 ; i_start < document_->tokens ().size ();) {
@@ -215,7 +215,7 @@ Status SentenceFragmenter::FindFragments(
215
215
// scan "!!!" looking for a fragment boundary. Since we failed to find one last
216
216
// time, we'll fail again this time and therefore continue past "y" to find the
217
217
// next boundary. We will not try to scan "!!!" a third time.
218
- Status SentenceFragmenter::FindNextFragmentBoundary (
218
+ absl:: Status SentenceFragmenter::FindNextFragmentBoundary (
219
219
int i_start, SentenceFragmenter::FragmentBoundaryMatch *result) const {
220
220
FragmentBoundaryMatch current_match;
221
221
FragmentBoundaryMatch previous_match;
@@ -276,8 +276,8 @@ Status SentenceFragmenter::FindNextFragmentBoundary(
276
276
// punctuation that turns out not to be a sentence boundary, e.g.,
277
277
// "Yahoo! (known for search, etc.) blah", but this is not expected to happen
278
278
// often.
279
- Status SentenceFragmenter::UpdateLatestOpenParenForFragment (int i_start,
280
- int i_end) {
279
+ absl:: Status SentenceFragmenter::UpdateLatestOpenParenForFragment (int i_start,
280
+ int i_end) {
281
281
for (int i = i_end; i > i_start; --i) {
282
282
const auto &token = document_->tokens ()[i - 1 ];
283
283
bool is_open_paren = false ;
@@ -293,7 +293,7 @@ Status SentenceFragmenter::UpdateLatestOpenParenForFragment(int i_start,
293
293
return absl::OkStatus ();
294
294
}
295
295
296
- Status SentenceFragmenter::FillInFragmentFields (
296
+ absl:: Status SentenceFragmenter::FillInFragmentFields (
297
297
int i_start, const FragmentBoundaryMatch &match,
298
298
SentenceFragment *fragment) const {
299
299
// Set the fragment's boundaries.
@@ -343,7 +343,7 @@ Status SentenceFragmenter::FillInFragmentFields(
343
343
//
344
344
// We treat "!" as the first terminal punctuation mark; the ellipsis acts as
345
345
// left context.
346
- Status SentenceFragmenter::GetAdjustedFirstTerminalPuncIndex (
346
+ absl:: Status SentenceFragmenter::GetAdjustedFirstTerminalPuncIndex (
347
347
const FragmentBoundaryMatch &match, int *result) const {
348
348
// Get terminal punctuation span.
349
349
int i1 = match.first_terminal_punc_index ();
@@ -385,7 +385,7 @@ Status SentenceFragmenter::GetAdjustedFirstTerminalPuncIndex(
385
385
// true sentence boundary. The terminal punctuation mark must be unambiguous
386
386
// (.!?), as ambiguous ones (ellipsis/emoticon) do not necessarily imply a
387
387
// sentence boundary.
388
- Status SentenceFragmenter::HasUnattachableTerminalPunc (
388
+ absl:: Status SentenceFragmenter::HasUnattachableTerminalPunc (
389
389
const FragmentBoundaryMatch &match, bool *result) const {
390
390
*result = false ;
391
391
// Get terminal punctuation span.
@@ -415,8 +415,8 @@ Status SentenceFragmenter::HasUnattachableTerminalPunc(
415
415
return absl::OkStatus ();
416
416
}
417
417
418
- Status SentenceFragmenter::HasCloseParen (const FragmentBoundaryMatch &match,
419
- bool *result) const {
418
+ absl:: Status SentenceFragmenter::HasCloseParen (
419
+ const FragmentBoundaryMatch &match, bool *result) const {
420
420
*result = false ;
421
421
// Get close punctuation span.
422
422
int i1 = match.first_close_punc_index ();
0 commit comments