What is the difference between * and * in NLTK regex pattern?What is the difference between old style and new style classes in Python?What are metaclasses in Python?What is the difference between @staticmethod and @classmethod?What does the “yield” keyword do?Difference between append vs. extend list methods in PythonWhat does if __name__ == “__main__”: do?What is __init__.py for?What's the difference between lists and tuples?Difference between __str__ and __repr__?What are the differences between type() and isinstance()?

It grows, but water kills it

How to follow the Halacha?

How do I color the graph in datavisualization?

Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]

Aragorn's "guise" in the Orthanc Stone

C++ debug/print custom type with GDB : the case of nlohmann json library

How did Rebekah know that Esau was planning to kill his brother in Genesis 27:42?

Has any country ever had 2 former presidents in jail simultaneously?

The IT department bottlenecks progress. How should I handle this?

Travelling outside the UK without a passport

What if a revenant (monster) gains fire resistance?

Multiplicative persistence

Loading commands from file

Why Shazam when there is already Superman?

Why electric field inside a cavity of a non-conducting sphere not zero?

If magnesium reacts with oxygen to produce magnesium oxide only on the application of heat, then why isn't it categorised as an endothermic reaction?

Which one is correct as adjective “protruding” or “protruded”?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Is it safe to use olive oil to clean the ear wax?

How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?

When were female captains banned from Starfleet?

Freedom of speech and where it applies

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Yosemite Fire Rings - What to Expect?



What is the difference between * and * in NLTK regex pattern?


What is the difference between old style and new style classes in Python?What are metaclasses in Python?What is the difference between @staticmethod and @classmethod?What does the “yield” keyword do?Difference between append vs. extend list methods in PythonWhat does if __name__ == “__main__”: do?What is __init__.py for?What's the difference between lists and tuples?Difference between __str__ and __repr__?What are the differences between type() and isinstance()?













1















I went through chapter 7 of the NLTK book looking for a solution to this but so far it unclear to me.




  1. <NN>* means 0 or more of Nouns


  2. <NN.*>* as explained by the book means 0 or more nouns of any type

In NLTK are NN, NNS, NNP, NNPS exclusive of each other ? (I might be wrong in thinking that NN is an umbrella for the rest)



In that case does <NN.*>* mean that 0 or more of any of NN, NNS, NNP, NNPS which itself can be repeated 0 or more times(that outer *)? Or does it simply mean NN repeated 0 or more times which again repeats 0 or more times?
Or am I completely mistaken ?










share|improve this question


























    1















    I went through chapter 7 of the NLTK book looking for a solution to this but so far it unclear to me.




    1. <NN>* means 0 or more of Nouns


    2. <NN.*>* as explained by the book means 0 or more nouns of any type

    In NLTK are NN, NNS, NNP, NNPS exclusive of each other ? (I might be wrong in thinking that NN is an umbrella for the rest)



    In that case does <NN.*>* mean that 0 or more of any of NN, NNS, NNP, NNPS which itself can be repeated 0 or more times(that outer *)? Or does it simply mean NN repeated 0 or more times which again repeats 0 or more times?
    Or am I completely mistaken ?










    share|improve this question
























      1












      1








      1








      I went through chapter 7 of the NLTK book looking for a solution to this but so far it unclear to me.




      1. <NN>* means 0 or more of Nouns


      2. <NN.*>* as explained by the book means 0 or more nouns of any type

      In NLTK are NN, NNS, NNP, NNPS exclusive of each other ? (I might be wrong in thinking that NN is an umbrella for the rest)



      In that case does <NN.*>* mean that 0 or more of any of NN, NNS, NNP, NNPS which itself can be repeated 0 or more times(that outer *)? Or does it simply mean NN repeated 0 or more times which again repeats 0 or more times?
      Or am I completely mistaken ?










      share|improve this question














      I went through chapter 7 of the NLTK book looking for a solution to this but so far it unclear to me.




      1. <NN>* means 0 or more of Nouns


      2. <NN.*>* as explained by the book means 0 or more nouns of any type

      In NLTK are NN, NNS, NNP, NNPS exclusive of each other ? (I might be wrong in thinking that NN is an umbrella for the rest)



      In that case does <NN.*>* mean that 0 or more of any of NN, NNS, NNP, NNPS which itself can be repeated 0 or more times(that outer *)? Or does it simply mean NN repeated 0 or more times which again repeats 0 or more times?
      Or am I completely mistaken ?







      python python-3.x nlp nltk






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 7:34









      jarjar

      743420




      743420






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Here's a list of the Penn treebank POS tags. As you'll see, NN does not encompass NNS, NNP, and NNPS; it only represents singular and mass nouns.




          NN - Noun, singular or mass

          NNS - Noun, plural

          NNP - Proper noun, singular

          NNPS - Proper noun, plural




          <NN.*>* means any of NN, NNS, NNP, NNPS repeated 0 or more times (from the outer *), whereas <NN>* would mean only <NN> repeated 0 or more times.






          share|improve this answer























          • Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

            – jar
            Mar 7 at 9:07







          • 1





            Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

            – Proyag
            Mar 7 at 9:22











          • Aah, its so clear now. Thank you so much !

            – jar
            Mar 7 at 9:25










          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%2f55038360%2fwhat-is-the-difference-between-nn-and-nn-in-nltk-regex-pattern%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Here's a list of the Penn treebank POS tags. As you'll see, NN does not encompass NNS, NNP, and NNPS; it only represents singular and mass nouns.




          NN - Noun, singular or mass

          NNS - Noun, plural

          NNP - Proper noun, singular

          NNPS - Proper noun, plural




          <NN.*>* means any of NN, NNS, NNP, NNPS repeated 0 or more times (from the outer *), whereas <NN>* would mean only <NN> repeated 0 or more times.






          share|improve this answer























          • Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

            – jar
            Mar 7 at 9:07







          • 1





            Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

            – Proyag
            Mar 7 at 9:22











          • Aah, its so clear now. Thank you so much !

            – jar
            Mar 7 at 9:25















          1














          Here's a list of the Penn treebank POS tags. As you'll see, NN does not encompass NNS, NNP, and NNPS; it only represents singular and mass nouns.




          NN - Noun, singular or mass

          NNS - Noun, plural

          NNP - Proper noun, singular

          NNPS - Proper noun, plural




          <NN.*>* means any of NN, NNS, NNP, NNPS repeated 0 or more times (from the outer *), whereas <NN>* would mean only <NN> repeated 0 or more times.






          share|improve this answer























          • Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

            – jar
            Mar 7 at 9:07







          • 1





            Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

            – Proyag
            Mar 7 at 9:22











          • Aah, its so clear now. Thank you so much !

            – jar
            Mar 7 at 9:25













          1












          1








          1







          Here's a list of the Penn treebank POS tags. As you'll see, NN does not encompass NNS, NNP, and NNPS; it only represents singular and mass nouns.




          NN - Noun, singular or mass

          NNS - Noun, plural

          NNP - Proper noun, singular

          NNPS - Proper noun, plural




          <NN.*>* means any of NN, NNS, NNP, NNPS repeated 0 or more times (from the outer *), whereas <NN>* would mean only <NN> repeated 0 or more times.






          share|improve this answer













          Here's a list of the Penn treebank POS tags. As you'll see, NN does not encompass NNS, NNP, and NNPS; it only represents singular and mass nouns.




          NN - Noun, singular or mass

          NNS - Noun, plural

          NNP - Proper noun, singular

          NNPS - Proper noun, plural




          <NN.*>* means any of NN, NNS, NNP, NNPS repeated 0 or more times (from the outer *), whereas <NN>* would mean only <NN> repeated 0 or more times.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 9:00









          ProyagProyag

          351112




          351112












          • Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

            – jar
            Mar 7 at 9:07







          • 1





            Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

            – Proyag
            Mar 7 at 9:22











          • Aah, its so clear now. Thank you so much !

            – jar
            Mar 7 at 9:25

















          • Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

            – jar
            Mar 7 at 9:07







          • 1





            Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

            – Proyag
            Mar 7 at 9:22











          • Aah, its so clear now. Thank you so much !

            – jar
            Mar 7 at 9:25
















          Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

          – jar
          Mar 7 at 9:07






          Okay, so the internal NN.* in <NN.*>* just means one NN or NNS or NNP or NNPS, not many and then the outer * has the usual meaning. Is that correct? I mean the internal *, it is just a representative, it doesn't actually mean that something repeats 0 or more times (unlike the outer *). Is that correct?

          – jar
          Mar 7 at 9:07





          1




          1





          Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

          – Proyag
          Mar 7 at 9:22





          Correct. The inner * is for repetitions of the .. Thus, that .* could match nothing, S, P, or PS, resulting in NN, NNS, NNP, and NNPS tags respectively. The outer * is responsible for repetitions of the entire tag.

          – Proyag
          Mar 7 at 9:22













          Aah, its so clear now. Thank you so much !

          – jar
          Mar 7 at 9:25





          Aah, its so clear now. Thank you so much !

          – jar
          Mar 7 at 9:25



















          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%2f55038360%2fwhat-is-the-difference-between-nn-and-nn-in-nltk-regex-pattern%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







          Popular posts from this blog

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

          Захаров Федір Захарович