Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.

Overview

TextBlob: Simplified Text Processing

Latest version Travis-CI

Homepage: https://textblob.readthedocs.io/

TextBlob is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

from textblob import TextBlob

text = '''
The titular threat of The Blob has always struck me as the ultimate movie
monster: an insatiably hungry, amoeba-like mass able to penetrate
virtually any safeguard, capable of--as a doomed doctor chillingly
describes it--"assimilating flesh on contact.
Snide comparisons to gelatin be damned, it's a concept with the most
devastating of potential consequences, not unlike the grey goo scenario
proposed by technological theorists fearful of
artificial intelligence run rampant.
'''

blob = TextBlob(text)
blob.tags           # [('The', 'DT'), ('titular', 'JJ'),
                    #  ('threat', 'NN'), ('of', 'IN'), ...]

blob.noun_phrases   # WordList(['titular threat', 'blob',
                    #            'ultimate movie monster',
                    #            'amoeba-like mass', ...])

for sentence in blob.sentences:
    print(sentence.sentiment.polarity)
# 0.060
# -0.341

TextBlob stands on the giant shoulders of NLTK and pattern, and plays nicely with both.

Features

  • Noun phrase extraction
  • Part-of-speech tagging
  • Sentiment analysis
  • Classification (Naive Bayes, Decision Tree)
  • Tokenization (splitting text into words and sentences)
  • Word and phrase frequencies
  • Parsing
  • n-grams
  • Word inflection (pluralization and singularization) and lemmatization
  • Spelling correction
  • Add new models or languages through extensions
  • WordNet integration

Get it now

$ pip install -U textblob
$ python -m textblob.download_corpora

Examples

See more examples at the Quickstart guide.

Documentation

Full documentation is available at https://textblob.readthedocs.io/.

Requirements

  • Python >= 2.7 or >= 3.5

Project Links

License

MIT licensed. See the bundled LICENSE file for more details.

Comments
  • HTTP Error 503: Service Unavailable while using detect_language() and translate() from textblob

    HTTP Error 503: Service Unavailable while using detect_language() and translate() from textblob

    python:3.5 textblob:0.15.1

    seems it happened before and fixed in #148

    the detail logs File "/usr/local/lib/python3.5/site-packages/textblob/blob.py", line 562, in detect_language return self.translator.detect(self.raw) File "/usr/local/lib/python3.5/site-packages/textblob/translate.py", line 72, in detect response = self._request(url, host=host, type_=type_, data=data) File "/usr/local/lib/python3.5/site-packages/textblob/translate.py", line 92, in _request resp = request.urlopen(req) File "/usr/local/lib/python3.5/urllib/request.py", line 163, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.5/urllib/request.py", line 472, in open response = meth(req, response) File "/usr/local/lib/python3.5/urllib/request.py", line 582, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/lib/python3.5/urllib/request.py", line 504, in error result = self._call_chain(*args) File "/usr/local/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(*args) File "/usr/local/lib/python3.5/urllib/request.py", line 696, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/local/lib/python3.5/urllib/request.py", line 472, in open response = meth(req, response) File "/usr/local/lib/python3.5/urllib/request.py", line 582, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/lib/python3.5/urllib/request.py", line 510, in error return self._call_chain(*args) File "/usr/local/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(*args) File "/usr/local/lib/python3.5/urllib/request.py", line 590, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)

    bug please-help 
    opened by craigchen1990 21
  • Language Detection Not Working (HTTP Error 503: Service Unavailable)

    Language Detection Not Working (HTTP Error 503: Service Unavailable)

    from textblob import TextBlob txt = u"Test Language Detection" b = TextBlob(txt) b.detect_language()

    It is giving "HTTPError: HTTP Error 503: Service Unavailable"

    Python Version: 2.7.6 TextBlob Version: 0.11.1 OS: Ubuntu 14.04 LTS & CentOS 6.8

    opened by manurajhada 20
  • ModuleNotFoundError: No module named '_sqlite3'

    ModuleNotFoundError: No module named '_sqlite3'

    Hello,

    I'm migrating my script from my Mac to a AWS Linux instance. I upgraded the AWS instance to Python 3.6 before importing packages, including textbook. Now I get this error and cannot find where it's coming from. I'm not the greatest python programmer, but I did have it running perfectly on my Mac before installing it on AWS.

    Here's the entire Traceback:

    Traceback (most recent call last): File "wikiparser20170801.py", line 8, in from textblob import TextBlob File "/usr/local/lib/python3.6/site-packages/textblob/init.py", line 9, in from .blob import TextBlob, Word, Sentence, Blobber, WordList File "/usr/local/lib/python3.6/site-packages/textblob/blob.py", line 28, in import nltk File "/usr/local/lib/python3.6/site-packages/nltk/init.py", line 137, in from nltk.stem import * File "/usr/local/lib/python3.6/site-packages/nltk/stem/init.py", line 29, in from nltk.stem.snowball import SnowballStemmer File "/usr/local/lib/python3.6/site-packages/nltk/stem/snowball.py", line 26, in from nltk.corpus import stopwords File "/usr/local/lib/python3.6/site-packages/nltk/corpus/init.py", line 66, in from nltk.corpus.reader import * File "/usr/local/lib/python3.6/site-packages/nltk/corpus/reader/init.py", line 105, in from nltk.corpus.reader.panlex_lite import * File "/usr/local/lib/python3.6/site-packages/nltk/corpus/reader/panlex_lite.py", line 15, in import sqlite3 File "/usr/local/lib/python3.6/sqlite3/init.py", line 23, in from sqlite3.dbapi2 import * File "/usr/local/lib/python3.6/sqlite3/dbapi2.py", line 27, in from _sqlite3 import * ModuleNotFoundError: No module named '_sqlite3

    opened by arnieadm35 17
  • correct() returns empty object

    correct() returns empty object

    I tried using spell checking but correct() method returns an empty object. Following shows the method call on a terminal:

    >>> from textblob import TextBlob
    >>> b = TextBlob("I havv goood speling!")
    >>> b.correct()
    TextBlob("")
    >>> print(b.correct())
    
    >>> 
    

    I couldn't find a fix to this. I'm running Python 2.7.6 on Linux.

    opened by shubhams 14
  • Translation not working - NotTranslated: Translation API returned the input string unchanged.

    Translation not working - NotTranslated: Translation API returned the input string unchanged.

    Hi, The translation is not working. thanks in advance,

    In [1]: from textblob import TextBlob

    In [2]: en_blob = TextBlob(u'Simple is better than complex.')

    In [3]: en_blob.translate(to='es')

    NotTranslated Traceback (most recent call last) in () ----> 1 en_blob.translate(to='es')

    /usr/local/lib/python2.7/dist-packages/textblob-0.11.0-py2.7.egg/textblob/blob.pyc in translate(self, from_lang, to) 507 from_lang = self.translator.detect(self.string) 508 return self.class(self.translator.translate(self.raw, --> 509 from_lang=from_lang, to_lang=to)) 510 511 def detect_language(self):

    /usr/local/lib/python2.7/dist-packages/textblob-0.11.0-py2.7.egg/textblob/translate.pyc in translate(self, source, from_lang, to_lang, host, type_) 43 return self.get_translation_from_json5(json5) 44 else: ---> 45 raise NotTranslated('Translation API returned the input string unchanged.') 46 47 def detect(self, source, host=None, type=None):

    NotTranslated: Translation API returned the input string unchanged.

    opened by edgaralts 13
  • Add Greedy Average Perceptron POS tagger

    Add Greedy Average Perceptron POS tagger

    Hi,

    I'm preparing a pull request for you, for a new POS tagger. This is the first time I've tried to contribute to someone else's project, so probably there'll be some weird teething pain stuff. Also I spend all day writing research code, so maybe parts of my style are atrocious :p.

    The two main files are:

    https://github.com/syllog1sm/TextBlob/blob/feature/greedy_ap_tagger/text/taggers.py https://github.com/syllog1sm/TextBlob/blob/feature/greedy_ap_tagger/text/_perceptron.py

    I'm not quite done, but it's passing tests and its numbers are much better than the taggers you currently have hooks for:

    NLTKTagger: 94.0 / 3m52 PatternTagger: 93.5 / 26s PerceptronTagger: 96.8 / 16s

    Accuracy figures refer to sections 22-24 of the Wall Street Journal, a common English evaluation. There's a table of some accuracies from the literature here: http://aclweb.org/aclwiki/index.php?title=POS_Tagging_(State_of_the_art) . Speeds refer to time taken to tag the 129,654 words of input, including initialisation, on my Macbook Air.

    If you check out that link, you'll see that the tagger's about 1% short of the pace for state-of-the-art accuracy. My Cython implementation has slightly better results, about 97.1, and it's a fair bit faster too. It's not very difficult to add some of the extra features to the Python implementation, or to improve its efficiency. Or we could hook in the Cython implementation, although that comes with much more baggage.

    I think it's nice having the tagger in ~200 lines of pure Python though, with no dependencies. It should be fairly language independent too --- I'll run some tests to see how it does.

    opened by syllog1sm 13
  • error intranslation

    error intranslation

    url not found error sometime:

    File "/usr/local/lib/python3.8/dist-packages/textblob/blob.py", line 546, in translate return self.class(self.translator.translate(self.raw, File "/usr/local/lib/python3.8/dist-packages/textblob/translate.py", line 54, in translate response = self.request(url, host=host, type=type_, data=data) File "/usr/local/lib/python3.8/dist-packages/textblob/translate.py", line 92, in _request resp = request.urlopen(req) File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 569, in error return self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

    opened by mannan291 12
  • NaiveBayesClassifier taking too long

    NaiveBayesClassifier taking too long

    Hi, I've a small dataset of 1000 tweets which I've classify in pos/neg for training. When I tried to use it at the NaiveBayesClassifier() it tooks like 10-15min to return a result... Is there a way to save the result of the classifier like a dump and reuse that for further classifications ?

    Thanks

    opened by canivel 12
  • Deploying TextBlob on remote server

    Deploying TextBlob on remote server

    Hi,

    I am trying to deploy TextBlob on remote server hosted on heroku. Heroku to my knowledge uses pip freeze > requirements.txt to understand the dependencies and install them on the remote server.

    The code works perfectly on my local machine, but on the remote server looks for the NLTK corpus and throws an exception.

    How do I install TextBlob dependencies on remote server?

    I am using virtualenv

    opened by seekshreyas 11
  • since 0.7.1 having trouble with the package

    since 0.7.1 having trouble with the package

    On both my mac and linux machines I have the same problem with 0.7.1

    from text.blob import TextBlob Traceback (most recent call last): File "", line 1, in File "text.py", line 5, in from text.blob import TextBlob ImportError: No module named blob

    my sys.path does not contain the textblob module

    import sys for p in sys.path: ... print p ...

    /Library/Python/2.7/site-packages/ipython-2.0.0_dev-py2.7.egg /Library/Python/2.7/site-packages/matplotlib-1.3.0-py2.7-macosx-10.8-intel.egg /Library/Python/2.7/site-packages/numpy-1.9.0.dev_fde3dee-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/pandas-0.12.0_485_g02612c3-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/pymc-2.3a-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/scikit_learn-0.14_git-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/scipy-0.14.0.dev_4938da3-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/statsmodels-0.6.0-py2.7-macosx-10.8-x86_64.egg /Library/Python/2.7/site-packages/readline-6.2.4.1-py2.7-macosx-10.7-intel.egg /Library/Python/2.7/site-packages/nose-1.3.0-py2.7.egg /Library/Python/2.7/site-packages/six-1.4.1-py2.7.egg /Library/Python/2.7/site-packages/pyparsing-1.5.7-py2.7.egg /Library/Python/2.7/site-packages/pytz-2013.7-py2.7.egg /Library/Python/2.7/site-packages/pyzmq-13.1.0-py2.7-macosx-10.6-intel.egg /Library/Python/2.7/site-packages/pika-0.9.13-py2.7.egg /Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg /Library/Python/2.7/site-packages/MarkupSafe-0.18-py2.7-macosx-10.8-intel.egg /Library/Python/2.7/site-packages/patsy-0.2.1-py2.7.egg /Library/Python/2.7/site-packages/Pygments-1.6-py2.7.egg /Library/Python/2.7/site-packages/Sphinx-1.2b3-py2.7.egg /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC /Library/Python/2.7/site-packages

    despite it being there. I have uninstalled and reinstalled and tried all sorts of things:

    mbpdar:deaas daren$ ls /Library/Python/2.7/site-packages/te* /Library/Python/2.7/site-packages/text: /Library/Python/2.7/site-packages/textblob-0.7.1-py2.7.egg-info:

    I've verified the init.py doesn't have odd characters. if I change to the /Library/Python/2.7/site-packages/text folder I am able to import:

    mbpdar:deaas daren$ cd /Library/Python/2.7/site-packages/text mbpdar:text daren$ python Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information.

    from text.blob import TextBlob

    I cannot figure out what changed that might cause this.

    Thanks in advance Daren

    opened by darenr 11
  • (after 0.5.1) - AttributeError: 'module' object has no attribute 'compat'

    (after 0.5.1) - AttributeError: 'module' object has no attribute 'compat'

    Traceback (most recent call last): File "sentiment.py", line 1, in from text.blob import TextBlob File "/usr/local/lib/python2.7/dist-packages/text/blob.py", line 149, in @nltk.compat.python_2_unicode_compatible AttributeError: 'module' object has no attribute 'compat'

    bug 
    opened by ghost 11
  • Getting wrong value

    Getting wrong value

    from textblob import TextBlob
    
    text = "Hi, I'm from Canada"
    text2 = TextBlob(text)
    Correct = text2.correct()
    print(Correct)
    

    Hi when I run the above code I get output I, I"m from Canada

    which is wrong, am I doing something wrong here? please help

    opened by Mank0o 0
  • Joining TextBlobs / Sentence

    Joining TextBlobs / Sentence

    Not sure if this is a bug or feature request, I do enjoy that I can concentrate your Objects like strings. Now I wanted to concentrate a list, but ran into the following:

    " ".join(storedSentences)
    

    Getting: TypeError: sequence item 0: expected str instance, Sentence found

    Unfortunately, the other way does not work either:

    Sentence(" ").join(storedSentences)
    

    TypeError: sequence item 0: expected str instance, Sentence found

    Maybe I am doing it wrong?

    PS: Great library! Especially the TextBlobs Are Like Python Strings! makes things really easy, thanks for implementing that :)

    opened by thomasf1 0
  • Modify TextBlob sentiment prediction algorithm

    Modify TextBlob sentiment prediction algorithm

    I am trying to work on a use-case which requires predicting the polarity but the result is not accurate. Our main focus is on the -ve inputs but it is unable to find it with confidence. I tried to go through the github code base and understand how exactly the sentiment is predicted by the algo but was unable to get a clear picture.

    So I have 3 questions:

    1. Can we modify and retrain the the algorithm by passing more training data? If YES, then how can we do that?

    2. Textblob sentiment analysis using Naive Bayes but what I want to understand is what steps are happening after passing the data to tb = TextBlob(data) and then calling tb.sentiment on it. I would really appreciate if I can have a detailed steps including preprocessing, etc.

    3. I am performing the following preprocessing steps before passing the data to TextBlob:

      • removing numbers, dates, months, urls, hashtags, mentions, etc
      • lowercasing,
      • removing punctuation marks
      • stop word removal and converting -ve words like don't to just not as do is a stop word, etc

      Can you suggest if removing/ adding any of the above steps will lead to grater confidence & accuracy in polarity prediction?

    opened by Deepankar-98 0
  • Errors occurred when using Naive Bayes for sentiment classification

    Errors occurred when using Naive Bayes for sentiment classification

    1. As the question, when I use the Bayesian classifier for emotion classification, due to the excessive amount of data, when the amount of data exceeds 10,000, it will be automatically killed by the system, and there is no problem when the amount of data is not large image

    2. How do you save a trained naïve Bayes model?

    opened by yaoysyao 0
  • Detecting language  / get HTTP Error 400?

    Detecting language / get HTTP Error 400?

    Hello - i try to detect a language from a word with this code:

    from textblob import TextBlob
    b = TextBlob("bonjour")
    print(b.detect_language())
    

    But unfortunately i get this error:

    $ python exmplTextBlob.py
    Traceback (most recent call last):
      File "C:\Users\Polzi\Documents\DEV\Python-Diverses\Textblob\exmplTextBlob.py", line 4, in <module>
        print(b.detect_language())
      File "C:\Users\Polzi\Documents\DEV\.venv\test\lib\site-packages\textblob\blob.py", line 597, in detect_language
        return self.translator.detect(self.raw)
      File "C:\Users\Polzi\Documents\DEV\.venv\test\lib\site-packages\textblob\translate.py", line 76, in detect
        response = self._request(url, host=host, type_=type_, data=data)
      File "C:\Users\Polzi\Documents\DEV\.venv\test\lib\site-packages\textblob\translate.py", line 96, in _request
        resp = request.urlopen(req)
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen
        return opener.open(url, data, timeout)
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 523, in open
        response = meth(req, response)
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 632, in http_response
        response = self.parent.error(
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 561, in error
        return self._call_chain(*args)
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain
        result = func(*args)
      File "C:\Users\Polzi\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 400: Bad Request
    
    

    Why is that - am i doing anything wrong?

    opened by Rapid1898-code 2
  • Python 3.9 compatibility

    Python 3.9 compatibility

    Hello I want to thank you for the project and comment that checking in PyPi I found that it was compatible up to Python 3.8, however I am in 3.9 and it works properly, I would like to know how it can be updated in PyPi. I take this opportunity to ask you if Textblob will have support for 3.11, which will be out soon? Thanks.

    opened by xasg 0
Owner
Steven Loria
Always a student, forever a junior developer
Steven Loria
vits chinese, tts chinese, tts mandarin

vits chinese, tts chinese, tts mandarin 史上训练最简单,音质最好的语音合成系统

AmorTX 12 Dec 14, 2022
simpleT5 is built on top of PyTorch-lightning⚡️ and Transformers🤗 that lets you quickly train your T5 models.

Quickly train T5 models in just 3 lines of code + ONNX support simpleT5 is built on top of PyTorch-lightning ⚡️ and Transformers 🤗 that lets you quic

Shivanand Roy 220 Dec 30, 2022
fastai ulmfit - Pretraining the Language Model, Fine-Tuning and training a Classifier

fast.ai ULMFiT with SentencePiece from pretraining to deployment Motivation: Why even bother with a non-BERT / Transformer language model? Short answe

Florian Leuerer 26 May 27, 2022
Poetry PEP 517 Build Backend & Core Utilities

Poetry Core A PEP 517 build backend implementation developed for Poetry. This project is intended to be a light weight, fully compliant, self-containe

Poetry 293 Jan 02, 2023
PyABSA - Open & Efficient for Framework for Aspect-based Sentiment Analysis

PyABSA - Open & Efficient for Framework for Aspect-based Sentiment Analysis

YangHeng 567 Jan 07, 2023
تولید اسم های رندوم فینگیلیش

karafs کرفس تولید اسم های رندوم فینگیلیش installation ➜ pip install karafs usage دو زبانه ➜ karafs -n 10 توت فرنگی بی ناموس toot farangi-ye bi_namoos

Vaheed NÆINI (9E) 36 Nov 24, 2022
Lingtrain Aligner — ML powered library for the accurate texts alignment.

Lingtrain Aligner ML powered library for the accurate texts alignment in different languages. Purpose Main purpose of this alignment tool is to build

Sergei Averkiev 76 Dec 14, 2022
Official PyTorch implementation of SegFormer

SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers Figure 1: Performance of SegFormer-B0 to SegFormer-B5. Project page

NVIDIA Research Projects 1.4k Dec 29, 2022
This repository serves as a place to document a toy attempt on how to create a generative text model in Catalan, based on GPT-2

GPT-2 Catalan playground and scripts to train a GPT-2 model either from scrath or from another pretrained model.

Laura 1 Jan 28, 2022
An assignment on creating a minimalist neural network toolkit for CS11-747

minnn by Graham Neubig, Zhisong Zhang, and Divyansh Kaushik This is an exercise in developing a minimalist neural network toolkit for NLP, part of Car

Graham Neubig 63 Dec 29, 2022
A toolkit for document-level event extraction, containing some SOTA model implementations

Document-level Event Extraction via Heterogeneous Graph-based Interaction Model with a Tracker Source code for ACL-IJCNLP 2021 Long paper: Document-le

84 Dec 15, 2022
Graph Coloring - Weighted Vertex Coloring Problem

Graph Coloring - Weighted Vertex Coloring Problem This project proposes several local searches and an MCTS algorithm for the weighted vertex coloring

Cyril 1 Jul 08, 2022
Artificial Conversational Entity for queries in Eulogio "Amang" Rodriguez Institute of Science and Technology (EARIST)

🤖 Coeus - EARIST A.C.E 💬 Coeus is an Artificial Conversational Entity for queries in Eulogio "Amang" Rodriguez Institute of Science and Technology,

Dids Irwyn Reyes 3 Oct 14, 2022
基于pytorch_rnn的古诗词生成

pytorch_peot_rnn 基于pytorch_rnn的古诗词生成 说明 config.py里面含有训练、测试、预测的参数,更改后运行: python main.py 预测结果 if config.do_predict: result = trainer.generate('丽日照残春')

西西嘛呦 3 May 26, 2022
Multilingual Emotion classification using BERT (fine-tuning). Published at the WASSA workshop (ACL2022).

XLM-EMO: Multilingual Emotion Prediction in Social Media Text Abstract Detecting emotion in text allows social and computational scientists to study h

MilaNLP 35 Sep 17, 2022
Help you discover excellent English projects and get rid of disturbing by other spoken language

GitHub English Top Charts 「Help you discover excellent English projects and get

GrowingGit 544 Jan 09, 2023
🤗Transformers: State-of-the-art Natural Language Processing for Pytorch and TensorFlow 2.0.

State-of-the-art Natural Language Processing for PyTorch and TensorFlow 2.0 🤗 Transformers provides thousands of pretrained models to perform tasks o

Hugging Face 77.3k Jan 03, 2023
PyTorch implementation of "data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language" from Meta AI

data2vec-pytorch PyTorch implementation of "data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language" from Meta AI (F

Aryan Shekarlaban 105 Jan 04, 2023
The FinQA dataset from paper: FinQA: A Dataset of Numerical Reasoning over Financial Data

Data and code for EMNLP 2021 paper "FinQA: A Dataset of Numerical Reasoning over Financial Data"

Zhiyu Chen 114 Dec 29, 2022
Code for Findings of ACL 2022 Paper "Sentiment Word Aware Multimodal Refinement for Multimodal Sentiment Analysis with ASR Errors"

SWRM Code for Findings of ACL 2022 Paper "Sentiment Word Aware Multimodal Refinement for Multimodal Sentiment Analysis with ASR Errors" Clone Clone th

14 Jan 03, 2023