From cf37d13cb4fbfe8ba3fd4cea925ee79cfcf3b968 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 2 Feb 2023 04:18:46 +0100 Subject: [PATCH] Remove `__main__` --- unimore_bda_6/vendor/potts.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/unimore_bda_6/vendor/potts.py b/unimore_bda_6/vendor/potts.py index ff98e12..c953e1b 100644 --- a/unimore_bda_6/vendor/potts.py +++ b/unimore_bda_6/vendor/potts.py @@ -186,19 +186,3 @@ class Tokenizer: pass s = s.replace(amp, " and ") return s - -############################################################################### - -if __name__ == '__main__': - tok = Tokenizer(preserve_case=False) - samples = ( - u"RT @ #happyfuncoding: this is a typical Twitter tweet :-)", - u"HTML entities & other Web oddities can be an ácute pain >:(", - u"It's perhaps noteworthy that phone numbers like +1 (800) 123-4567, (800) 123-4567, and 123-4567 are treated as words despite their whitespace." - ) - - for s in samples: - print "======================================================================" - print s - tokenized = tok.tokenize(s) - print "\n".join(tokenized) \ No newline at end of file