コード例 #1
0
ファイル: preprocessor.py プロジェクト: mikaelbr/tweetsa
def remove_all(text):
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.no_hash(text)
  text = f.no_emoticons(text)
  text = f.no_rt_tag(text)
  return text
コード例 #2
0
def remove_all(text):
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.no_hash(text)
    text = f.no_emoticons(text)
    text = f.no_rt_tag(text)
    return text
コード例 #3
0
ファイル: preprocessor.py プロジェクト: mikaelbr/tweetsa
def remove_noise(text):
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.no_hash(text)
  text = f.no_rt_tag(text)
  text = f.reduce_letter_duplicates(text)
  return text
コード例 #4
0
ファイル: preprocessor.py プロジェクト: mikaelbr/tweetsa
def remove_noise(text):
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.no_hash(text)
    text = f.no_rt_tag(text)
    text = f.reduce_letter_duplicates(text)
    return text
コード例 #5
0
    def filter(tweet):
        tweet = filt.no_url(tweet)
        tweet = filt.no_rt_tag(tweet)
        tweet = filt.no_emoticons(tweet)
        tweet = filt.no_usernames(tweet)
        tweet = filt.no_hash(tweet)

        logging.debug("--- FINISHED FILTERING: %s" % tweet)

        return tweet
コード例 #6
0
ファイル: afinn.py プロジェクト: mikaelbr/tweetsa
    def filter(tweet):
        tweet = filt.no_url(tweet)
        tweet = filt.no_rt_tag(tweet)
        tweet = filt.no_emoticons(tweet)
        tweet = filt.no_usernames(tweet)
        tweet = filt.no_hash(tweet)

        logging.debug("--- FINISHED FILTERING: %s" % tweet)

        return tweet
コード例 #7
0
def all(text):
  text = text.lower()
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.no_emoticons(text)
  text = f.no_hash(text)
  text = f.no_rt_tag(text)
  text = f.reduce_letter_duplicates(text)
  text = p.negation_attachment(text)

  return text
コード例 #8
0
def all(text):
    text = text.lower()
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.no_emoticons(text)
    text = f.no_hash(text)
    text = f.no_rt_tag(text)
    text = f.reduce_letter_duplicates(text)
    text = p.negation_attachment(text)

    return text
コード例 #9
0
ファイル: example.py プロジェクト: mikaelbr/tweetsa
def add_filters (text):
  text = f.no_url(text)
  # text = f.username_placeholder(text)
  text = f.no_usernames(text)
  # text = f.no_emoticons(text)
  text = f.no_hash(text)
  # text = f.no_rt_tag(text)
  text = f.reduce_letter_duplicates(text)
  # text = p.remove_stopwords(text, ['not'])
  text = p.negation_attachment(text)

  return text
コード例 #10
0
ファイル: example.py プロジェクト: mikaelbr/tweetsa
def add_filters(text):
    text = f.no_url(text)
    # text = f.username_placeholder(text)
    text = f.no_usernames(text)
    # text = f.no_emoticons(text)
    text = f.no_hash(text)
    # text = f.no_rt_tag(text)
    text = f.reduce_letter_duplicates(text)
    # text = p.remove_stopwords(text, ['not'])
    text = p.negation_attachment(text)

    return text
コード例 #11
0
 def test_no_hash(self):
     tmp = f.no_hash(self.text)
     self.assertEqual(tmp, "Ooooh myyy gooooooood, @username!!!! :D :) This is : http://someurl.com/fdhsiufds?dsads=dsa".lower())