Skip to content
Merged
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
2 changes: 2 additions & 0 deletions ppcomp/ppcomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def load(self, filename):
if not filename.lower().endswith('.txt'):
raise SyntaxError("Not a text file: " + filename)
super().load(filename)
self.from_pgdp_rounds = self.basename.startswith('projectID')

def strip_pg_boilerplate(self):
"""Remove the PG header and footer from the text if present."""
Expand Down Expand Up @@ -593,6 +594,7 @@ def remove_wordjoin(self):
"""Remove word join (NoBreak) (U+2060)."""
if self.args.suppress_word_join:
self.text = re.sub(r"\u2060", r"", self.text)
self.text = re.sub(r"⁠", r"", self.text)

def remove_soft_hyphen(self):
"""Suppress shy (soft hyphen)"""
Expand Down