示例#1
0
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
示例#2
0
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
示例#3
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
示例#4
0
def method2(text):
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.reduce_letter_duplicates(text)
  # text = p.remove_stopwords(text, ['not'])
  text = p.negation_attachment(text)
  return text
示例#5
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
示例#6
0
def method2(text):
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.reduce_letter_duplicates(text)
    # text = p.remove_stopwords(text, ['not'])
    text = p.negation_attachment(text)
    return text
示例#7
0
def remove_noise(text):
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.hash_as_normal(text)
  text = f.no_rt_tag(text)
  text = f.reduce_letter_duplicates(text)
  # text = p.negation_attachment(text)
  return text
示例#8
0
def remove_noise(text):
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.hash_as_normal(text)
    text = f.no_rt_tag(text)
    text = f.reduce_letter_duplicates(text)
    # text = p.negation_attachment(text)
    return text
示例#9
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
示例#10
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
示例#11
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
示例#12
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
示例#13
0
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
示例#14
0
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
示例#15
0
 def test_no_usernames(self):
     tmp = f.no_usernames(self.text)
     self.assertEqual(tmp, 'Ooooh myyy gooooooood, !!!! :D :) This is #amazing: http://someurl.com/fdhsiufds?dsads=dsa'.lower())
示例#16
0
def no_usernames(text):
  return f.no_usernames(text)
示例#17
0
def no_usernames(text):
    return f.no_usernames(text)
示例#18
0
def no_url_usernames_reduced_attached(text):
    text = f.no_url(text)
    text = f.no_usernames(text)
    text = f.reduce_letter_duplicates(text)
    text = p.negation_attachment(text)
    return text
示例#19
0
def no_url_usernames_reduced_attached(text):
  text = f.no_url(text)
  text = f.no_usernames(text)
  text = f.reduce_letter_duplicates(text)
  text = p.negation_attachment(text)
  return text