omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    linguistictagger tag_string no longer returns parts of speech

    Pythonista
    3
    5
    2745
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chuckles
      chuckles last edited by

      linguistictagger.tag_string with SCHEME_LEXICAL_CLASS no longer returns parts of speech. Instead of noun, verb, etc being returned it returns OtherWord. Does anyone know of a workaround for this?

      import linguistictagger as lt
      text = 'Python is pretty awesome.'
      results = lt.tag_string(text, lt.SCHEME_LEXICAL_CLASS)
      for tag, substring, range in results:
      if tag != 'Whitespace':
      print(substring + ": " + tag)

      Output:
      Python: OtherWord
      is: OtherWord
      pretty: OtherWord
      awesome: OtherWord
      .: SentenceTerminator

      1 Reply Last reply Reply Quote 0
      • DaveClark
        DaveClark last edited by

        Hello

        I just tried your program and it seems to work. iphone 6 plus, ios 11.4, pythonista 3.2

        I didn't know about your lexical stuff, it looks pretty cool

        1 Reply Last reply Reply Quote 0
        • chuckles
          chuckles last edited by

          So when you ran the program instead of getting OtherWord it returned the corresponding part of speech (noun, verb, etc)?
          I am running it on iPad with Python 3, IOS 10.3.3, pythonista 3.2.

          1 Reply Last reply Reply Quote 0
          • johnridesabike
            johnridesabike last edited by

            It seems to work as expected for me too. Here’s the output:

            Python: Noun
            is: Verb
            pretty: Adverb
            awesome: Adjective
            .: SentenceTerminator
            

            Pythonista 3.2, Default interpreter 3.6.1, iOS 11.4, iPad

            1 Reply Last reply Reply Quote 0
            • chuckles
              chuckles last edited by

              Thanks for the information. Based on this it appears to be an issue with Pythonista running on IOS 10.3.3.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors