Kevin Hu commited on
Commit
7fcb06c
·
1 Parent(s): 17b116d

fix bug of regx (#1703)

Browse files

### What problem does this PR solve?

#1689

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Files changed (1) hide show
  1. rag/nlp/__init__.py +1 -1
rag/nlp/__init__.py CHANGED
@@ -344,7 +344,7 @@ def make_colon_as_title(sections):
344
  if txt[-1] not in "::":
345
  continue
346
  txt = txt[::-1]
347
- arr = re.split(r"([。?!!?;;]| .)", txt)
348
  if len(arr) < 2 or len(arr[1]) < 32:
349
  continue
350
  sections.insert(i - 1, (arr[0][::-1], "title"))
 
344
  if txt[-1] not in "::":
345
  continue
346
  txt = txt[::-1]
347
+ arr = re.split(r"([。?!!?;;]| \.)", txt)
348
  if len(arr) < 2 or len(arr[1]) < 32:
349
  continue
350
  sections.insert(i - 1, (arr[0][::-1], "title"))