How to find possible subjects for given verb in everyday object domain Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsNamed Entity Recognition: NLTK using Regular ExpressionDocument Categorization ProblemHow to automatically find the sentiment?Determining usage/context of terms/acronyms/abbreviations in pythonProper/Possible methods for extracting unstructured data from websitesWhere can I find a dataset for long sequence text chunking?What is in-domain and out-domain exactly in language model and How can we distinguish in-domain and out-of-domain data?Automating scoring of answers for a given questionTraining NLP with multiple text input featuresHow to calculate which word fits the best given a context and possible words?

What is "gratricide"?

File name problem(?)

Is it possible to force a specific program to remain in memory after closing it?

What do you call the main part of a joke?

Co-worker has annoying ringtone

What is the difference between globalisation and imperialism?

Is there any word for a place full of confusion?

How could we fake a moon landing now?

Google .dev domain strangely redirects to https

Is CEO the "profession" with the most psychopaths?

How would a mousetrap for use in space work?

Is it fair for a professor to grade us on the possession of past papers?

A term for a woman complaining about things/begging in a cute/childish way

How many time has Arya actually used Needle?

How to draw/optimize this graph with tikz

How to run automated tests after each commit?

Converted a Scalar function to a TVF function for parallel execution-Still running in Serial mode

An adverb for when you're not exaggerating

How to compare two different files line by line in unix?

Did any compiler fully use 80-bit floating point?

Electrolysis of water: Which equations to use? (IB Chem)

What order were files/directories output in dir?

"Lost his faith in humanity in the trenches of Verdun" — last line of an SF story

What does the distribution of bootstrapped values in this Cullen and Frey Graph tell me?



How to find possible subjects for given verb in everyday object domain



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsNamed Entity Recognition: NLTK using Regular ExpressionDocument Categorization ProblemHow to automatically find the sentiment?Determining usage/context of terms/acronyms/abbreviations in pythonProper/Possible methods for extracting unstructured data from websitesWhere can I find a dataset for long sequence text chunking?What is in-domain and out-domain exactly in language model and How can we distinguish in-domain and out-of-domain data?Automating scoring of answers for a given questionTraining NLP with multiple text input featuresHow to calculate which word fits the best given a context and possible words?










1












$begingroup$


I am asking for tools (possibly in NLTK) or papers that talk about the following:



e.g. Input: Vase(Subject1) put(verb)



Ans I am looking for: flower, water



Is there a tool that can output subjects (objects) that can be associated to this verb? (I was going through VerbNet but didn't find anything)










share|improve this question









$endgroup$







  • 2




    $begingroup$
    It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
    $endgroup$
    – Neil Slater
    Apr 2 at 17:21











  • $begingroup$
    If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
    $endgroup$
    – Neil Slater
    Apr 2 at 17:34
















1












$begingroup$


I am asking for tools (possibly in NLTK) or papers that talk about the following:



e.g. Input: Vase(Subject1) put(verb)



Ans I am looking for: flower, water



Is there a tool that can output subjects (objects) that can be associated to this verb? (I was going through VerbNet but didn't find anything)










share|improve this question









$endgroup$







  • 2




    $begingroup$
    It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
    $endgroup$
    – Neil Slater
    Apr 2 at 17:21











  • $begingroup$
    If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
    $endgroup$
    – Neil Slater
    Apr 2 at 17:34














1












1








1





$begingroup$


I am asking for tools (possibly in NLTK) or papers that talk about the following:



e.g. Input: Vase(Subject1) put(verb)



Ans I am looking for: flower, water



Is there a tool that can output subjects (objects) that can be associated to this verb? (I was going through VerbNet but didn't find anything)










share|improve this question









$endgroup$




I am asking for tools (possibly in NLTK) or papers that talk about the following:



e.g. Input: Vase(Subject1) put(verb)



Ans I am looking for: flower, water



Is there a tool that can output subjects (objects) that can be associated to this verb? (I was going through VerbNet but didn't find anything)







nlp nltk






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 2 at 16:25









ARPIT PRASHANT BAHETYARPIT PRASHANT BAHETY

61




61







  • 2




    $begingroup$
    It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
    $endgroup$
    – Neil Slater
    Apr 2 at 17:21











  • $begingroup$
    If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
    $endgroup$
    – Neil Slater
    Apr 2 at 17:34













  • 2




    $begingroup$
    It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
    $endgroup$
    – Neil Slater
    Apr 2 at 17:21











  • $begingroup$
    If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
    $endgroup$
    – Neil Slater
    Apr 2 at 17:34








2




2




$begingroup$
It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
$endgroup$
– Neil Slater
Apr 2 at 17:21





$begingroup$
It is not natural English to say "Vase put ...". A speaker might say "I put water in the vase" or as a request (to un-mentioned listener) "Put water in the vase". In both cases the vase here would be a referred object and not the subject (compared to "The vase is green" or "The glass vase broke" where the vase is the subject). I don't think that changes the question substantially, but you may want to work on a clearer example
$endgroup$
– Neil Slater
Apr 2 at 17:21













$begingroup$
If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
$endgroup$
– Neil Slater
Apr 2 at 17:34





$begingroup$
If you want Subject, Verb, Object for your vase example, you might simply change it to "Vase (subject) contains (verb)" or "Vase (subject) holds (verb)" - but if you really want to parse a request for putting something in a vase, then that would be different
$endgroup$
– Neil Slater
Apr 2 at 17:34











1 Answer
1






active

oldest

votes


















0












$begingroup$

If you want something quick, I think pattern is the best tool for the job. It provides a ready-to-use multilingual parser that you can use in the following way:



import pattern
from pattern.en import parse
s = 'I put water in the vase'
s = parse(s)
print s
# output = I/PRP/B-NP/O put/VBP/B-VP/O water/NN/B-NP/O in/IN/B-PP/B-PNP the/DT/B-NP/I-PNP vase/NN/I-NP/I-PNP


Once you have a string like output above, you only need regex parsing to extract every sequence of tokens whose tags match the sequence [B-NP, B-VP, B-NP].



NP stands for "noun phrase" and VP stands for "verb phrase". In English, virtually every sequence consisting of a noun phrase, a verb phrase, and a second noun phrase, all in strict adjacency, is a subject-verb-object sequence, so this should give you what you're looking for.



pattern's parser will also be able to handle some non-strict adjacencies (e.g. intervening adverbs and adjectives between the three phrases in the subject-verb-object sequence).



However, pattern is not terribly sophisticated -this will give you some Precision and some Recall, but not terribly high numbers. If you need high-quality parsing, you should try the Stanford parser's Python implementation or spacy.



Hope this helps!






share|improve this answer









$endgroup$













    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "557"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2fdatascience.stackexchange.com%2fquestions%2f48457%2fhow-to-find-possible-subjects-for-given-verb-in-everyday-object-domain%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









    0












    $begingroup$

    If you want something quick, I think pattern is the best tool for the job. It provides a ready-to-use multilingual parser that you can use in the following way:



    import pattern
    from pattern.en import parse
    s = 'I put water in the vase'
    s = parse(s)
    print s
    # output = I/PRP/B-NP/O put/VBP/B-VP/O water/NN/B-NP/O in/IN/B-PP/B-PNP the/DT/B-NP/I-PNP vase/NN/I-NP/I-PNP


    Once you have a string like output above, you only need regex parsing to extract every sequence of tokens whose tags match the sequence [B-NP, B-VP, B-NP].



    NP stands for "noun phrase" and VP stands for "verb phrase". In English, virtually every sequence consisting of a noun phrase, a verb phrase, and a second noun phrase, all in strict adjacency, is a subject-verb-object sequence, so this should give you what you're looking for.



    pattern's parser will also be able to handle some non-strict adjacencies (e.g. intervening adverbs and adjectives between the three phrases in the subject-verb-object sequence).



    However, pattern is not terribly sophisticated -this will give you some Precision and some Recall, but not terribly high numbers. If you need high-quality parsing, you should try the Stanford parser's Python implementation or spacy.



    Hope this helps!






    share|improve this answer









    $endgroup$

















      0












      $begingroup$

      If you want something quick, I think pattern is the best tool for the job. It provides a ready-to-use multilingual parser that you can use in the following way:



      import pattern
      from pattern.en import parse
      s = 'I put water in the vase'
      s = parse(s)
      print s
      # output = I/PRP/B-NP/O put/VBP/B-VP/O water/NN/B-NP/O in/IN/B-PP/B-PNP the/DT/B-NP/I-PNP vase/NN/I-NP/I-PNP


      Once you have a string like output above, you only need regex parsing to extract every sequence of tokens whose tags match the sequence [B-NP, B-VP, B-NP].



      NP stands for "noun phrase" and VP stands for "verb phrase". In English, virtually every sequence consisting of a noun phrase, a verb phrase, and a second noun phrase, all in strict adjacency, is a subject-verb-object sequence, so this should give you what you're looking for.



      pattern's parser will also be able to handle some non-strict adjacencies (e.g. intervening adverbs and adjectives between the three phrases in the subject-verb-object sequence).



      However, pattern is not terribly sophisticated -this will give you some Precision and some Recall, but not terribly high numbers. If you need high-quality parsing, you should try the Stanford parser's Python implementation or spacy.



      Hope this helps!






      share|improve this answer









      $endgroup$















        0












        0








        0





        $begingroup$

        If you want something quick, I think pattern is the best tool for the job. It provides a ready-to-use multilingual parser that you can use in the following way:



        import pattern
        from pattern.en import parse
        s = 'I put water in the vase'
        s = parse(s)
        print s
        # output = I/PRP/B-NP/O put/VBP/B-VP/O water/NN/B-NP/O in/IN/B-PP/B-PNP the/DT/B-NP/I-PNP vase/NN/I-NP/I-PNP


        Once you have a string like output above, you only need regex parsing to extract every sequence of tokens whose tags match the sequence [B-NP, B-VP, B-NP].



        NP stands for "noun phrase" and VP stands for "verb phrase". In English, virtually every sequence consisting of a noun phrase, a verb phrase, and a second noun phrase, all in strict adjacency, is a subject-verb-object sequence, so this should give you what you're looking for.



        pattern's parser will also be able to handle some non-strict adjacencies (e.g. intervening adverbs and adjectives between the three phrases in the subject-verb-object sequence).



        However, pattern is not terribly sophisticated -this will give you some Precision and some Recall, but not terribly high numbers. If you need high-quality parsing, you should try the Stanford parser's Python implementation or spacy.



        Hope this helps!






        share|improve this answer









        $endgroup$



        If you want something quick, I think pattern is the best tool for the job. It provides a ready-to-use multilingual parser that you can use in the following way:



        import pattern
        from pattern.en import parse
        s = 'I put water in the vase'
        s = parse(s)
        print s
        # output = I/PRP/B-NP/O put/VBP/B-VP/O water/NN/B-NP/O in/IN/B-PP/B-PNP the/DT/B-NP/I-PNP vase/NN/I-NP/I-PNP


        Once you have a string like output above, you only need regex parsing to extract every sequence of tokens whose tags match the sequence [B-NP, B-VP, B-NP].



        NP stands for "noun phrase" and VP stands for "verb phrase". In English, virtually every sequence consisting of a noun phrase, a verb phrase, and a second noun phrase, all in strict adjacency, is a subject-verb-object sequence, so this should give you what you're looking for.



        pattern's parser will also be able to handle some non-strict adjacencies (e.g. intervening adverbs and adjectives between the three phrases in the subject-verb-object sequence).



        However, pattern is not terribly sophisticated -this will give you some Precision and some Recall, but not terribly high numbers. If you need high-quality parsing, you should try the Stanford parser's Python implementation or spacy.



        Hope this helps!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 3 at 5:14









        JordiCarreraJordiCarrera

        713




        713



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Data Science Stack Exchange!


            • 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.

            Use MathJax to format equations. MathJax reference.


            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%2fdatascience.stackexchange.com%2fquestions%2f48457%2fhow-to-find-possible-subjects-for-given-verb-in-everyday-object-domain%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

            Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

            Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

            Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High