Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:45:26+00:00 2026-06-17T17:45:26+00:00

I am trying to figure out how to train the stanford LexicalizedParser ( edu.stanford.nlp.parser.lexparser.LexicalizedParser

  • 0

I am trying to figure out how to train the stanford LexicalizedParser
( edu.stanford.nlp.parser.lexparser.LexicalizedParser ) to incorporate new nouns into its lexicon.

At first my goal was to take take an existing model and tweak it slightly, rather than creating a brand new model
from a vast set of training examples.

the answer to this question suggests that is not possible >
How can I add more tagged words to the Stanford POS-Tagger's trained models?

Hopefully someone out there can put me on the right track as to how to do this.

As a concrete example of what i want to do, say i have the word ‘researchgate’ which i want to be treated as a noun when i parse
sentences. Currently, ‘researchgate’ is getting treated as different parts of speech, depending on its
position.. but i want it identified as an ‘NN’ (noun).

Examples…

instead of this:

      (NP
        (NP (JJ recent) (NN activity))
        (PP (IN in)
          (NP (PRP$ your) (JJ researchgate) (NNS topics)))))

i want this:

      (NP
        (NP (JJ recent) (NN activity))
        (PP (IN in)
          (NP (PRP$ your) (NN researchgate) (NNS topics)))))

and instead of this:

    (ROOT
      (FRAG
        (NP (NN subscription))
        (S
          (VP (TO to)
            (VP (VB researchgate))))))

i want this:

    (ROOT
      (NP
        (NP (NN subscription))
        (PP (TO to)
          (NP (NN researchgate)))))

I am currently using this model: models/edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz

I tried doing this >

    java -cp  stanford-parser.jar        
            edu.stanford.nlp.parser.lexparser.LexicalizedParser   -train  /tmp/train.txt

with the contensts of /tmp/train.txt as follows >

              (NP
                (NP (JJ recent) (NN activity))
                (PP (IN in)
                  (NP (PRP$ your) (JJ researchgate) (NNS topics)))))

I got a bunch of promising output, but then got this error >

    Error. Can't parse test sentence: [This, is, just, a, test, .]

So clearly i need to supply more examples than just the one i have in /tmp/train.txt.

Looking at the documentation there seems to be one promising method on
LexicalizedParser that I am considering trying… >

    public static LexicalizedParser getParserFromTreebank(Treebank trainTreebank,
                                                          Treebank secondaryTrainTreebank,
                                                          double weight,
                                                          GrammarCompactor compactor,
                                                          Options op,
                                                          Treebank tuneTreebank,
                                                          List<List<TaggedWord>> extraTaggedWords)

i am hesitant to jump in and try this because it seems tricky to get the Options right.
The doco says:
options to the parser which MUST be the SAME at both training and testing (parsing) time in
order for the parser to work properly

so i might need guidance on how to extract the options used for
edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz perhaps it is

        edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams  ?

Also, maybe i want to add researchgate in as one of my extraTaggedWords ?

I have the feeling i am on the right track but was hoping to get some advice before descending
into a rat hole.

Thanks in advance !

chris
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:45:27+00:00Added an answer on June 17, 2026 at 5:45 pm

    I posted to stanford parser mailing list and I received an answer from John Bauer (thanks, John !)

    John Bauer
    2:09 PM (39 minutes ago)
    to me, parser-user
    Unfortunately, you would need to start training from the beginning. There is no way to extend a current parser model.
    That feature is on “the list”, but it’s somewhere near the back, so don’t hold your breath…
    John

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Folks, I'm new to Scala and am trying to figure something out. I've been
I'm very new to an Android platform and currently trying figure out why things
I have got myself into a bit of a mess trying figure out the
Trying to figure out how to hook into some web part verb events; specifically,
I am currently trying figure out how to load an external script into tinymce.
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
Trying to figure out why my silverlight app suddenly just displays nothing (right click
Trying to figure out how to type (via events not set the value) on
Trying to figure out a regex for validating a network path ie: \\comp\xyz or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.