Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
### Features

### Fixes
- Improved clean_bullets in order to remove en-dashes if they are used as bullets

## 0.18.15

Expand Down
1 change: 1 addition & 0 deletions test_unstructured/cleaners/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_clean_non_ascii_chars(text, expected):
("● An excellent point! ●●●", "An excellent point! ●●●"),
("An excellent point!", "An excellent point!"),
("Morse code! ●●●", "Morse code! ●●●"),
("– An excellent point!", "An excellent point!")
],
)
def test_clean_bullets(text, expected):
Expand Down
1 change: 1 addition & 0 deletions unstructured/nlp/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
r"\*",
"\x95",
"·",
"\u2013",
]
BULLETS_PATTERN = "|".join(UNICODE_BULLETS)
UNICODE_BULLETS_RE = re.compile(f"(?:{BULLETS_PATTERN})(?!{BULLETS_PATTERN})")
Expand Down