preprocessing test done
This commit is contained in:
parent
6416bcd075
commit
a1230b8c00
1 changed files with 3 additions and 11 deletions
|
|
@ -11,26 +11,18 @@ def test_preprocess_tweet_removes_hashtags():
|
||||||
Just flew w/ @AirParadis 🚀 & I’m in LOVE! Épic service, comfy seats.
|
Just flew w/ @AirParadis 🚀 & I’m in LOVE! Épic service, comfy seats.
|
||||||
#bestflight #AirParadis
|
#bestflight #AirParadis
|
||||||
"""
|
"""
|
||||||
assert preprocess_tweet(tweet) == """"
|
assert preprocess_tweet(tweet) == "flew w < MENTION > im love ! épic service comfy seat # bestflight # airparadis"
|
||||||
aze
|
|
||||||
"""
|
|
||||||
|
|
||||||
def test_preprocess_tweet_removes_mentions():
|
def test_preprocess_tweet_removes_mentions():
|
||||||
tweet = """
|
tweet = """
|
||||||
"Flight of dreams" w/ @AirParadis! Got food, space & smiles 😄 I’ll book again!
|
"Flight of dreams" w/ @AirParadis! Got food, space & smiles 😄 I’ll book again!
|
||||||
#AirParadis
|
#AirParadis
|
||||||
"""
|
"""
|
||||||
assert preprocess_tweet(tweet) == "merci"
|
assert preprocess_tweet(tweet) == 'flight dream w < MENTION > ! got food space smile ill book ! # airparadis'
|
||||||
|
|
||||||
def test_preprocess_tweet_lowercases_text():
|
def test_preprocess_tweet_lowercases_text():
|
||||||
tweet = """
|
tweet = """
|
||||||
My 3rd time w/ @AirParadis & still amazed 😍 Crew = lovely à every step!
|
My 3rd time w/ @AirParadis & still amazed 😍 Crew = lovely à every step!
|
||||||
#flyhappy #AirParadis
|
#flyhappy #AirParadis
|
||||||
"""
|
"""
|
||||||
assert preprocess_tweet(tweet) == "je suis content"
|
assert preprocess_tweet(tweet) == '3rd time w < MENTION > still amazed crew lovely à every step ! # flyhappy # airparadis'
|
||||||
|
|
||||||
tweet = """
|
|
||||||
Just flew w/ @AirParadis 🚀 & I’m in LOVE! Épic service, comfy seats.
|
|
||||||
#bestflight #AirParadis
|
|
||||||
"""
|
|
||||||
preprocess_tweet(tweet)
|
|
||||||
Loading…
Add table
Reference in a new issue