How can I analyze pieces of text for positive or negative words?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I'm looking for some sort of module (preferably for python) that would allow me to give that module a string about 200 characters long. The module should then return how many positive or negative words that string had. (e.g. love, like, enjoy vs. hate, dislike, bad)



I'd really like to avoid having to reinvent the wheel in natural language processing, so if there is anything you guys know of that would allow me to do what I described above, it'd be a huge time-saver if you could share.



Thanks for the help!










share|improve this question





























    1















    I'm looking for some sort of module (preferably for python) that would allow me to give that module a string about 200 characters long. The module should then return how many positive or negative words that string had. (e.g. love, like, enjoy vs. hate, dislike, bad)



    I'd really like to avoid having to reinvent the wheel in natural language processing, so if there is anything you guys know of that would allow me to do what I described above, it'd be a huge time-saver if you could share.



    Thanks for the help!










    share|improve this question

























      1












      1








      1


      1






      I'm looking for some sort of module (preferably for python) that would allow me to give that module a string about 200 characters long. The module should then return how many positive or negative words that string had. (e.g. love, like, enjoy vs. hate, dislike, bad)



      I'd really like to avoid having to reinvent the wheel in natural language processing, so if there is anything you guys know of that would allow me to do what I described above, it'd be a huge time-saver if you could share.



      Thanks for the help!










      share|improve this question














      I'm looking for some sort of module (preferably for python) that would allow me to give that module a string about 200 characters long. The module should then return how many positive or negative words that string had. (e.g. love, like, enjoy vs. hate, dislike, bad)



      I'd really like to avoid having to reinvent the wheel in natural language processing, so if there is anything you guys know of that would allow me to do what I described above, it'd be a huge time-saver if you could share.



      Thanks for the help!







      nlp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 13 '11 at 1:00









      AndrewAndrew

      1,736133962




      1,736133962
























          3 Answers
          3






          active

          oldest

          votes


















          2














          I think you're looking for sentiment analysis. Here's a Twitter sentiment app.



          Here's a question about sentiment analysis using Python.






          share|improve this answer


























          • That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

            – Andrew
            Jan 13 '11 at 3:04



















          1














          Before you analyse pieces of text you need to preprocess given text by striping punctuation, repair language, split spaces,lower the whole text and store the words in an iterable data structure.



          For some basic sentiment analysis, following techniques can be used:



          Bag of words



          In bag of words technique we basically go through a bag(file) of words and check if the iterable made by us contains these. If it does then we assign some value to each word's presence in order to weigh the total sentiment of the text.
          This link should help you understand more about this
          https://en.wikipedia.org/wiki/Bag-of-words_model



          Keyword Extraction and Tagging



          Keywords and important information can be extracted from the input text by tagging the elements and then removing unwanted data.
          For example:
          My name is John.
          Here John, name are the information and "is" isn't really needed.
          Similarly verbs and other unimportant things can be removed in order to retain only the main information.
          Chunking and Chinking helps.
          This link must be of help.
          http://nltk.org/book/ch07.html






          share|improve this answer































            0














            You can tokenize your text and get the sentiment using existing sentiment analysis tools. The most comprehensive sentiment analysis tool that I know is SentiBench. This is basically a survey study of all sentiment analysis tools. As well as the code and examples on how to use the code.






            share|improve this answer
























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4675785%2fhow-can-i-analyze-pieces-of-text-for-positive-or-negative-words%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              I think you're looking for sentiment analysis. Here's a Twitter sentiment app.



              Here's a question about sentiment analysis using Python.






              share|improve this answer


























              • That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

                – Andrew
                Jan 13 '11 at 3:04
















              2














              I think you're looking for sentiment analysis. Here's a Twitter sentiment app.



              Here's a question about sentiment analysis using Python.






              share|improve this answer


























              • That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

                – Andrew
                Jan 13 '11 at 3:04














              2












              2








              2







              I think you're looking for sentiment analysis. Here's a Twitter sentiment app.



              Here's a question about sentiment analysis using Python.






              share|improve this answer















              I think you're looking for sentiment analysis. Here's a Twitter sentiment app.



              Here's a question about sentiment analysis using Python.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 23 '17 at 10:27









              Community

              11




              11










              answered Jan 13 '11 at 1:07









              SkilldrickSkilldrick

              52k31159222




              52k31159222













              • That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

                – Andrew
                Jan 13 '11 at 3:04



















              • That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

                – Andrew
                Jan 13 '11 at 3:04

















              That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

              – Andrew
              Jan 13 '11 at 3:04





              That's exactly what I was looking for; thanks. If no one else replies, I'll give you the check.

              – Andrew
              Jan 13 '11 at 3:04













              1














              Before you analyse pieces of text you need to preprocess given text by striping punctuation, repair language, split spaces,lower the whole text and store the words in an iterable data structure.



              For some basic sentiment analysis, following techniques can be used:



              Bag of words



              In bag of words technique we basically go through a bag(file) of words and check if the iterable made by us contains these. If it does then we assign some value to each word's presence in order to weigh the total sentiment of the text.
              This link should help you understand more about this
              https://en.wikipedia.org/wiki/Bag-of-words_model



              Keyword Extraction and Tagging



              Keywords and important information can be extracted from the input text by tagging the elements and then removing unwanted data.
              For example:
              My name is John.
              Here John, name are the information and "is" isn't really needed.
              Similarly verbs and other unimportant things can be removed in order to retain only the main information.
              Chunking and Chinking helps.
              This link must be of help.
              http://nltk.org/book/ch07.html






              share|improve this answer




























                1














                Before you analyse pieces of text you need to preprocess given text by striping punctuation, repair language, split spaces,lower the whole text and store the words in an iterable data structure.



                For some basic sentiment analysis, following techniques can be used:



                Bag of words



                In bag of words technique we basically go through a bag(file) of words and check if the iterable made by us contains these. If it does then we assign some value to each word's presence in order to weigh the total sentiment of the text.
                This link should help you understand more about this
                https://en.wikipedia.org/wiki/Bag-of-words_model



                Keyword Extraction and Tagging



                Keywords and important information can be extracted from the input text by tagging the elements and then removing unwanted data.
                For example:
                My name is John.
                Here John, name are the information and "is" isn't really needed.
                Similarly verbs and other unimportant things can be removed in order to retain only the main information.
                Chunking and Chinking helps.
                This link must be of help.
                http://nltk.org/book/ch07.html






                share|improve this answer


























                  1












                  1








                  1







                  Before you analyse pieces of text you need to preprocess given text by striping punctuation, repair language, split spaces,lower the whole text and store the words in an iterable data structure.



                  For some basic sentiment analysis, following techniques can be used:



                  Bag of words



                  In bag of words technique we basically go through a bag(file) of words and check if the iterable made by us contains these. If it does then we assign some value to each word's presence in order to weigh the total sentiment of the text.
                  This link should help you understand more about this
                  https://en.wikipedia.org/wiki/Bag-of-words_model



                  Keyword Extraction and Tagging



                  Keywords and important information can be extracted from the input text by tagging the elements and then removing unwanted data.
                  For example:
                  My name is John.
                  Here John, name are the information and "is" isn't really needed.
                  Similarly verbs and other unimportant things can be removed in order to retain only the main information.
                  Chunking and Chinking helps.
                  This link must be of help.
                  http://nltk.org/book/ch07.html






                  share|improve this answer













                  Before you analyse pieces of text you need to preprocess given text by striping punctuation, repair language, split spaces,lower the whole text and store the words in an iterable data structure.



                  For some basic sentiment analysis, following techniques can be used:



                  Bag of words



                  In bag of words technique we basically go through a bag(file) of words and check if the iterable made by us contains these. If it does then we assign some value to each word's presence in order to weigh the total sentiment of the text.
                  This link should help you understand more about this
                  https://en.wikipedia.org/wiki/Bag-of-words_model



                  Keyword Extraction and Tagging



                  Keywords and important information can be extracted from the input text by tagging the elements and then removing unwanted data.
                  For example:
                  My name is John.
                  Here John, name are the information and "is" isn't really needed.
                  Similarly verbs and other unimportant things can be removed in order to retain only the main information.
                  Chunking and Chinking helps.
                  This link must be of help.
                  http://nltk.org/book/ch07.html







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 10 '13 at 21:05









                  AmanAman

                  6510




                  6510























                      0














                      You can tokenize your text and get the sentiment using existing sentiment analysis tools. The most comprehensive sentiment analysis tool that I know is SentiBench. This is basically a survey study of all sentiment analysis tools. As well as the code and examples on how to use the code.






                      share|improve this answer




























                        0














                        You can tokenize your text and get the sentiment using existing sentiment analysis tools. The most comprehensive sentiment analysis tool that I know is SentiBench. This is basically a survey study of all sentiment analysis tools. As well as the code and examples on how to use the code.






                        share|improve this answer


























                          0












                          0








                          0







                          You can tokenize your text and get the sentiment using existing sentiment analysis tools. The most comprehensive sentiment analysis tool that I know is SentiBench. This is basically a survey study of all sentiment analysis tools. As well as the code and examples on how to use the code.






                          share|improve this answer













                          You can tokenize your text and get the sentiment using existing sentiment analysis tools. The most comprehensive sentiment analysis tool that I know is SentiBench. This is basically a survey study of all sentiment analysis tools. As well as the code and examples on how to use the code.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 24 '18 at 7:03









                          MonibaMoniba

                          697




                          697






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4675785%2fhow-can-i-analyze-pieces-of-text-for-positive-or-negative-words%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              這個網誌中的熱門文章

                              Tangent Lines Diagram Along Smooth Curve

                              Yusuf al-Mu'taman ibn Hud

                              Zucchini