Is there an algorithm of identifying different forms of "You" in a sentence AKA How to parse an English sentence

How do I tell if "You" is used as a subject or an object in a sentence?

-------------Problems Reply------------

You should use a Natural Language Processing tool or library. There are a wide range mentioned in http://en.wikipedia.org/wiki/List_of_natural_language_processing_toolkits and you can use the one most suitable to your problem or language.

Most of these will carry out Part-of-Speech tagging (POSTagging) which identifies nouns, prepostions, etc. Then they will group the POS into NounPhrase, verbPhrase, etc. In simple terms:

You see the cat

is parsed as

NP (PP you) VP (VB see DT the NN cat)

while

the cat sees you

is parsed as

NP (DT the NN cat) VP (VB sees PP you)

(schemes of POS vary)

The "you" is a personal pronoun (PP) and if it occurs in the VP it's an object.

It gets more complicated than this, but this is a start

NLP. See http://nlp.stanford.edu:8080/parser/

An engine you might want to try (I don't have the rep to comment being new to SE), the Attribute Logic Engine (ALE). Came across it in a grammar class in college. It's written in Prolog, which is a good language to understand if you're into Natural Language Processing, albeit a bit (read VERY) confusing.

ALE: http://www.cs.toronto.edu/~gpenn/ale.html

Category:nlp Views:0 Time:2010-12-24

Related post

  • Algorithms to Identify All the Cycle Bases in a UnDirected Graph 2009-10-22

    I have an undirected graph with Vertex V and Edge E. I am looking for an algorithm to identify all the cycle bases in that graph. I think Tarjans algorithm is a good start. But the reference I have is about finding all of the cycles, not cycle base (

  • Is there a known algorithm to identify lyrics and music with matching meters? 2012-03-12

    It is sometimes possible to interchange different tunes and lyrics. For example: Any parody song will be new lyrics that fit the original tune; see most of Weird Al's songs Hymns in Christian churches frequently have several tunes that can fit the sa

  • Does an algorithm exist to help detect the "primary topic" of an English sentence? 2011-04-04

    I'm trying to find out if there is a known algorithm that can detect the "key concept" of a sentence. The use case is as follows: User enters a sentence as a query (Does chicken taste like turkey?) Our system identifies the concepts of the sentence (

  • Identifying the components in a English sentence that do not make sense 2012-02-22

    I'm wondering is there an algorithm or a library which helps me identify the components in an English which has no meaning? e.g., very serious grammar error? If so, could you explain how it works, because I would really like to implement that or use

  • Algorithms to identify Markov generated content? 2009-07-26

    Markov chains are a (almost standard) way to generate random gibberish which looks intelligent to untrained eye. How would you go about identifying markov generated text from human written text. It would be awesome if the resources you point to are P

  • Algorithm to compare similarity of English sentences 2011-07-15

    I have a collection of sentences, and I need to analyse them to see how similar they are. Are there any established algorithms to do this? I care about: containing the same words (ignoring inflexions for now) containing the same words in a similar or

  • Algorithm to estimate number of English translation words from Japanese source 2008-09-28

    I'm trying to come up with a way to estimate the number of English words a translation from Japanese will turn into. Japanese has three main scripts -- Kanji, Hiragana, and Katakana -- and each has a different average character-to-word ratio (Kanji b

  • Simple Natural Language Processing Startup for Java 2011-04-29

    This question already has an answer here: Is there a good natural language processing library [closed] 3 answers I am willing to start developing a project on NLP. I dont know much of the tools available. After googling for about a month. I realized

  • Validating Syntax of a Sentence 2011-10-10

    I'm looking for a library to simply validate the the syntax of english natural language sentences. It doesn't have to be correct all the time (and obviously some sentences will be ambiguous/ humans will disagree on validity). So for example: jim like

  • Similar String algorithm 2009-01-16

    I'm looking for an algorithm, or at least theory of operation on how you would find similar text in two or more different strings... Much like the question posed here: Algorithm to find similar text, the difference being that my text strings will onl

  • Best algorithm to index sentences 2009-04-08

    Imagine I have a situation where I need to index sentences. Let me explain it a little bit deeper. For example I have these sentences: The beautiful sky. Beautiful sky dream. Beautiful dream. As far as I can imagine the index should look something li

  • Stackoverflow Related questions algorithm 2009-05-21

    The related questions that appear after entering the title, and those that are in the right side bar when viewing a question seem to suggest very apt questions. Stackoverflow only does a SQL search for it and uses no special algorithms, said Spolsky

  • algorithm for list identification and parsing 2009-11-04

    I have data which in theory is a list, but historically has been input by the user as a free form text field. Now I need to separate each item of the list so that each element can be analysed. Simplified examples of my data as input by users: one, tw

  • Algorithm for deviations 2010-02-19

    I have to track if given a week full of data integers ( 40, 30, 25, 55, 5, 40, etc ) raise an alert when the deviation from the norm happens (the '5' in the above case). An extra nice thing to have would be to actually learn if 5 is a normal event fo

  • time complexity of Fleury's Algorithm 2010-03-09

    Hi all could you please help me find out the time complexity of the Fleury' algoritm(which is used to get the Eulerian circuit)? Searched on the web,but no results. thanks/ --------------Solutions------------- Here: http://roticv.rantx.com/book/Euler

  • Algorithm for Negating Sentences 2010-04-13

    I was wondering if anyone was familiar with any attempts at algorithmic sentence negation. For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even "T

  • How to identify human like patterns in a webcam feed? 2010-06-22

    The camera is about 5 feet away form the subject and when I capture a frame, I need to be able to tell if the frame has a human in it or not. I have some complicated plans on implementing it, just wondering if any of you know an existing solution tha

  • How to develop an english .com domain value rating algorithm? 2011-01-03

    I've been thinking about an algorithm that should rougly be able to guess the value of an english .com domain in most cases. For this to work I want to perform tests that consider the strengths and weaknesses of an english .com domain. A simple point

  • Logic behind the method to identify cycle in a linked list 2011-11-23

    In the best method to detect a cycle in a linked list, we do the following: Use Floyd's Cycle-Finding Algorithm and identify a position within the cycle in a linked list. Count the size of the cycle in the linked list Position one pointer at the begi

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.163 (s). 11 q(s)