You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Sina Bahram <sb...@nc.rr.com> on 2012/01/08 22:05:14 UTC

deriving commands from sentences

Hi all,

I just joined the list after reading through the OpenNlp manual and playing with some code.

I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?

For example, write now, I'd like to write  a simple command parser.

Maybe things like this:

Make that bigger
Zoom in
Slice that 9 ways vertically
Give me 10 horizontal slices
Take me to Washington DC
Put North Carolina here

How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together a
command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.

Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
subject, perhaps) of a given sentence?

For example:

Input:
Put North Carolina here


And then I can call my methods like this?
getMainAction() --> returns "put"
getMainSubject() --> returns "north Carolina"

or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes sense?

Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
playing with examples.

Thanks in advance for any help.

take care,
Sina





Website: www.SinaBahram.com
Twitter: @SinaBahram




Re: deriving commands from sentences

Posted by "william.colen@gmail.com" <wi...@gmail.com>.
Sorry, the F1 > 90% was imprecise. I explained the approach and detailed
the results in another thread.

On Sun, Jan 8, 2012 at 8:54 PM, william.colen@gmail.com <
william.colen@gmail.com> wrote:

> The documentation is here:
> http://incubator.apache.org/opennlp/documentation/1.5.2-incubating/manual/opennlp.html#tools.chunker
>
> I implemented a Portuguese shallow parser using the Chunker, and it is
> performing good enough (F1 > 90%).
>
> First I run POS Tagger and after the Chunker to find noun and verb phrases.
>
> Finally I run another chunker which model I trained to find subject, verb
> and object. I concatenate the POS Tag and the phrase tag and used it in the
> POS Tag field of the chunker.
>
>
>
> On Sun, Jan 8, 2012 at 8:37 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>
>>
>> Incidentally, I am exploring this JavaDoc in the mean-time:
>>
>> http://opennlp.sourceforge.net/api/opennlp/tools/chunker/ChunkerME.html
>>
>> not sure if that's the latest/greatest way to do it?
>>
>> Website: www.SinaBahram.com
>> Twitter: @SinaBahram
>>
>>
>> -----Original Message-----
>> From: Sina Bahram [mailto:sbahram@nc.rr.com]
>> Sent: Sunday, January 08, 2012 5:36 PM
>> To: opennlp-users@incubator.apache.org; johnstewart@aya.yale.edu
>> Subject: RE: deriving commands from sentences
>>
>> Also, is there documentation on the chunker API? On the manual, it says
>> "// todo"
>>
>> Take care,
>> Sina
>>
>> Website: www.SinaBahram.com
>> Twitter: @SinaBahram
>>
>>
>> -----Original Message-----
>> From: John Stewart [mailto:cane.cubo@gmail.com]
>> Sent: Sunday, January 08, 2012 4:20 PM
>> To: opennlp-users@incubator.apache.org
>> Subject: Re: deriving commands from sentences
>>
>> I would use the chunker to obtain verb and noun phrases from the
>> input.  You can then look for specific verbs and nouns you're
>> interested in.
>>
>> jds
>>
>> On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>> > Hi all,
>> >
>> > I just joined the list after reading through the OpenNlp manual and
>> playing with some code.
>> >
>> > I think the tools provided by OpenNlp are fantastic; however my
>> question is this. are there other collections of code, recipes,
>> > papers, or any additional resources at all instructing one how to use
>> these tools to achieve a specific purpose?
>> >
>> > For example, write now, I'd like to write  a simple command parser.
>> >
>> > Maybe things like this:
>> >
>> > Make that bigger
>> > Zoom in
>> > Slice that 9 ways vertically
>> > Give me 10 horizontal slices
>> > Take me to Washington DC
>> > Put North Carolina here
>> >
>> > How can I use the OpenNlp tools to do this? I understand that name
>> finders can be used to find things like "North Carolina",
>> > although I could also simply use a POS tagger, I'm guessing, and simply
>> see what got marked as prp ... but how can I put together
>> a
>> > command parser, then start improving upon it through iteration,
>> inclusion of other heuristics and algorithms, etc. etc.
>> >
>> > Can I use the parser to shortcut through some of this? for example, can
>> I ask the parser what the direct object of the verb of a
>> > sentence is, and expect it to reliably, within reason of course, give
>> me the major verb (the action) and major direct object (the
>> > subject, perhaps) of a given sentence?
>> >
>> > For example:
>> >
>> > Input:
>> > Put North Carolina here
>> >
>> >
>> > And then I can call my methods like this?
>> > getMainAction() --> returns "put"
>> > getMainSubject() --> returns "north Carolina"
>> >
>> > or whatever ... I understand it's maybe not that simple, but I'm simply
>> wanting to know how and where to start, if that makes
>> sense?
>> >
>> > Lastly, and definitely most importantly, thanks go to every single
>> author and contributor of OpenNlp. I'm quite impressed just by
>> > playing with examples.
>> >
>> > Thanks in advance for any help.
>> >
>> > take care,
>> > Sina
>> >
>> >
>> >
>> >
>> >
>> > Website: www.SinaBahram.com
>> > Twitter: @SinaBahram
>> >
>> >
>> >
>>
>>
>

Re: deriving commands from sentences

Posted by "william.colen@gmail.com" <wi...@gmail.com>.
The documentation is here:
http://incubator.apache.org/opennlp/documentation/1.5.2-incubating/manual/opennlp.html#tools.chunker

I implemented a Portuguese shallow parser using the Chunker, and it is
performing good enough (F1 > 90%).

First I run POS Tagger and after the Chunker to find noun and verb phrases.

Finally I run another chunker which model I trained to find subject, verb
and object. I concatenate the POS Tag and the phrase tag and used it in the
POS Tag field of the chunker.



On Sun, Jan 8, 2012 at 8:37 PM, Sina Bahram <sb...@nc.rr.com> wrote:

>
> Incidentally, I am exploring this JavaDoc in the mean-time:
>
> http://opennlp.sourceforge.net/api/opennlp/tools/chunker/ChunkerME.html
>
> not sure if that's the latest/greatest way to do it?
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: Sina Bahram [mailto:sbahram@nc.rr.com]
> Sent: Sunday, January 08, 2012 5:36 PM
> To: opennlp-users@incubator.apache.org; johnstewart@aya.yale.edu
> Subject: RE: deriving commands from sentences
>
> Also, is there documentation on the chunker API? On the manual, it says
> "// todo"
>
> Take care,
> Sina
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: John Stewart [mailto:cane.cubo@gmail.com]
> Sent: Sunday, January 08, 2012 4:20 PM
> To: opennlp-users@incubator.apache.org
> Subject: Re: deriving commands from sentences
>
> I would use the chunker to obtain verb and noun phrases from the
> input.  You can then look for specific verbs and nouns you're
> interested in.
>
> jds
>
> On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
> > Hi all,
> >
> > I just joined the list after reading through the OpenNlp manual and
> playing with some code.
> >
> > I think the tools provided by OpenNlp are fantastic; however my question
> is this. are there other collections of code, recipes,
> > papers, or any additional resources at all instructing one how to use
> these tools to achieve a specific purpose?
> >
> > For example, write now, I'd like to write  a simple command parser.
> >
> > Maybe things like this:
> >
> > Make that bigger
> > Zoom in
> > Slice that 9 ways vertically
> > Give me 10 horizontal slices
> > Take me to Washington DC
> > Put North Carolina here
> >
> > How can I use the OpenNlp tools to do this? I understand that name
> finders can be used to find things like "North Carolina",
> > although I could also simply use a POS tagger, I'm guessing, and simply
> see what got marked as prp ... but how can I put together
> a
> > command parser, then start improving upon it through iteration,
> inclusion of other heuristics and algorithms, etc. etc.
> >
> > Can I use the parser to shortcut through some of this? for example, can
> I ask the parser what the direct object of the verb of a
> > sentence is, and expect it to reliably, within reason of course, give me
> the major verb (the action) and major direct object (the
> > subject, perhaps) of a given sentence?
> >
> > For example:
> >
> > Input:
> > Put North Carolina here
> >
> >
> > And then I can call my methods like this?
> > getMainAction() --> returns "put"
> > getMainSubject() --> returns "north Carolina"
> >
> > or whatever ... I understand it's maybe not that simple, but I'm simply
> wanting to know how and where to start, if that makes
> sense?
> >
> > Lastly, and definitely most importantly, thanks go to every single
> author and contributor of OpenNlp. I'm quite impressed just by
> > playing with examples.
> >
> > Thanks in advance for any help.
> >
> > take care,
> > Sina
> >
> >
> >
> >
> >
> > Website: www.SinaBahram.com
> > Twitter: @SinaBahram
> >
> >
> >
>
>

RE: deriving commands from sentences

Posted by Sina Bahram <sb...@nc.rr.com>.
Thanks, but I'm trying to keep this pure java. I'll instantiate the POSTagger and go from there, it sounds like. I'll also check out
malt.


Website: www.SinaBahram.com
Twitter: @SinaBahram


-----Original Message-----
From: John Stewart [mailto:cane.cubo@gmail.com] 
Sent: Sunday, January 08, 2012 5:51 PM
To: Sina Bahram
Cc: opennlp-users@incubator.apache.org
Subject: Re: deriving commands from sentences

I use a clojure wrapper around OpenNLP, for which there is sample code
for using the chunker (it's very simple):
https://github.com/dakrone/clojure-opennlp

jds

On Sun, Jan 8, 2012 at 5:37 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>
> Incidentally, I am exploring this JavaDoc in the mean-time:
>
> http://opennlp.sourceforge.net/api/opennlp/tools/chunker/ChunkerME.html
>
> not sure if that's the latest/greatest way to do it?
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: Sina Bahram [mailto:sbahram@nc.rr.com]
> Sent: Sunday, January 08, 2012 5:36 PM
> To: opennlp-users@incubator.apache.org; johnstewart@aya.yale.edu
> Subject: RE: deriving commands from sentences
>
> Also, is there documentation on the chunker API? On the manual, it says "// todo"
>
> Take care,
> Sina
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: John Stewart [mailto:cane.cubo@gmail.com]
> Sent: Sunday, January 08, 2012 4:20 PM
> To: opennlp-users@incubator.apache.org
> Subject: Re: deriving commands from sentences
>
> I would use the chunker to obtain verb and noun phrases from the
> input.  You can then look for specific verbs and nouns you're
> interested in.
>
> jds
>
> On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>> Hi all,
>>
>> I just joined the list after reading through the OpenNlp manual and playing with some code.
>>
>> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
>> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>>
>> For example, write now, I'd like to write  a simple command parser.
>>
>> Maybe things like this:
>>
>> Make that bigger
>> Zoom in
>> Slice that 9 ways vertically
>> Give me 10 horizontal slices
>> Take me to Washington DC
>> Put North Carolina here
>>
>> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
>> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together
> a
>> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>>
>> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
>> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
>> subject, perhaps) of a given sentence?
>>
>> For example:
>>
>> Input:
>> Put North Carolina here
>>
>>
>> And then I can call my methods like this?
>> getMainAction() --> returns "put"
>> getMainSubject() --> returns "north Carolina"
>>
>> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes
> sense?
>>
>> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
>> playing with examples.
>>
>> Thanks in advance for any help.
>>
>> take care,
>> Sina
>>
>>
>>
>>
>>
>> Website: www.SinaBahram.com
>> Twitter: @SinaBahram
>>
>>
>>
>


Re: deriving commands from sentences

Posted by John Stewart <ca...@gmail.com>.
I use a clojure wrapper around OpenNLP, for which there is sample code
for using the chunker (it's very simple):
https://github.com/dakrone/clojure-opennlp

jds

On Sun, Jan 8, 2012 at 5:37 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>
> Incidentally, I am exploring this JavaDoc in the mean-time:
>
> http://opennlp.sourceforge.net/api/opennlp/tools/chunker/ChunkerME.html
>
> not sure if that's the latest/greatest way to do it?
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: Sina Bahram [mailto:sbahram@nc.rr.com]
> Sent: Sunday, January 08, 2012 5:36 PM
> To: opennlp-users@incubator.apache.org; johnstewart@aya.yale.edu
> Subject: RE: deriving commands from sentences
>
> Also, is there documentation on the chunker API? On the manual, it says "// todo"
>
> Take care,
> Sina
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
> -----Original Message-----
> From: John Stewart [mailto:cane.cubo@gmail.com]
> Sent: Sunday, January 08, 2012 4:20 PM
> To: opennlp-users@incubator.apache.org
> Subject: Re: deriving commands from sentences
>
> I would use the chunker to obtain verb and noun phrases from the
> input.  You can then look for specific verbs and nouns you're
> interested in.
>
> jds
>
> On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
>> Hi all,
>>
>> I just joined the list after reading through the OpenNlp manual and playing with some code.
>>
>> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
>> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>>
>> For example, write now, I'd like to write  a simple command parser.
>>
>> Maybe things like this:
>>
>> Make that bigger
>> Zoom in
>> Slice that 9 ways vertically
>> Give me 10 horizontal slices
>> Take me to Washington DC
>> Put North Carolina here
>>
>> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
>> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together
> a
>> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>>
>> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
>> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
>> subject, perhaps) of a given sentence?
>>
>> For example:
>>
>> Input:
>> Put North Carolina here
>>
>>
>> And then I can call my methods like this?
>> getMainAction() --> returns "put"
>> getMainSubject() --> returns "north Carolina"
>>
>> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes
> sense?
>>
>> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
>> playing with examples.
>>
>> Thanks in advance for any help.
>>
>> take care,
>> Sina
>>
>>
>>
>>
>>
>> Website: www.SinaBahram.com
>> Twitter: @SinaBahram
>>
>>
>>
>

RE: deriving commands from sentences

Posted by Sina Bahram <sb...@nc.rr.com>.
Incidentally, I am exploring this JavaDoc in the mean-time:

http://opennlp.sourceforge.net/api/opennlp/tools/chunker/ChunkerME.html

not sure if that's the latest/greatest way to do it?

Website: www.SinaBahram.com
Twitter: @SinaBahram


-----Original Message-----
From: Sina Bahram [mailto:sbahram@nc.rr.com] 
Sent: Sunday, January 08, 2012 5:36 PM
To: opennlp-users@incubator.apache.org; johnstewart@aya.yale.edu
Subject: RE: deriving commands from sentences

Also, is there documentation on the chunker API? On the manual, it says "// todo"

Take care,
Sina

Website: www.SinaBahram.com
Twitter: @SinaBahram


-----Original Message-----
From: John Stewart [mailto:cane.cubo@gmail.com] 
Sent: Sunday, January 08, 2012 4:20 PM
To: opennlp-users@incubator.apache.org
Subject: Re: deriving commands from sentences

I would use the chunker to obtain verb and noun phrases from the
input.  You can then look for specific verbs and nouns you're
interested in.

jds

On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
> Hi all,
>
> I just joined the list after reading through the OpenNlp manual and playing with some code.
>
> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>
> For example, write now, I'd like to write  a simple command parser.
>
> Maybe things like this:
>
> Make that bigger
> Zoom in
> Slice that 9 ways vertically
> Give me 10 horizontal slices
> Take me to Washington DC
> Put North Carolina here
>
> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together
a
> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>
> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
> subject, perhaps) of a given sentence?
>
> For example:
>
> Input:
> Put North Carolina here
>
>
> And then I can call my methods like this?
> getMainAction() --> returns "put"
> getMainSubject() --> returns "north Carolina"
>
> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes
sense?
>
> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
> playing with examples.
>
> Thanks in advance for any help.
>
> take care,
> Sina
>
>
>
>
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
>


RE: deriving commands from sentences

Posted by Sina Bahram <sb...@nc.rr.com>.
Also, is there documentation on the chunker API? On the manual, it says "// todo"

Take care,
Sina

Website: www.SinaBahram.com
Twitter: @SinaBahram


-----Original Message-----
From: John Stewart [mailto:cane.cubo@gmail.com] 
Sent: Sunday, January 08, 2012 4:20 PM
To: opennlp-users@incubator.apache.org
Subject: Re: deriving commands from sentences

I would use the chunker to obtain verb and noun phrases from the
input.  You can then look for specific verbs and nouns you're
interested in.

jds

On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
> Hi all,
>
> I just joined the list after reading through the OpenNlp manual and playing with some code.
>
> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>
> For example, write now, I'd like to write  a simple command parser.
>
> Maybe things like this:
>
> Make that bigger
> Zoom in
> Slice that 9 ways vertically
> Give me 10 horizontal slices
> Take me to Washington DC
> Put North Carolina here
>
> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together
a
> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>
> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
> subject, perhaps) of a given sentence?
>
> For example:
>
> Input:
> Put North Carolina here
>
>
> And then I can call my methods like this?
> getMainAction() --> returns "put"
> getMainSubject() --> returns "north Carolina"
>
> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes
sense?
>
> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
> playing with examples.
>
> Thanks in advance for any help.
>
> take care,
> Sina
>
>
>
>
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
>


RE: deriving commands from sentences

Posted by Sina Bahram <sb...@nc.rr.com>.
Ok, so, there's not a module or set of ways to do "direct object" or "subject" identification?

Take care,
Sina

Website: www.SinaBahram.com
Twitter: @SinaBahram


-----Original Message-----
From: John Stewart [mailto:cane.cubo@gmail.com] 
Sent: Sunday, January 08, 2012 4:20 PM
To: opennlp-users@incubator.apache.org
Subject: Re: deriving commands from sentences

I would use the chunker to obtain verb and noun phrases from the
input.  You can then look for specific verbs and nouns you're
interested in.

jds

On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
> Hi all,
>
> I just joined the list after reading through the OpenNlp manual and playing with some code.
>
> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>
> For example, write now, I'd like to write  a simple command parser.
>
> Maybe things like this:
>
> Make that bigger
> Zoom in
> Slice that 9 ways vertically
> Give me 10 horizontal slices
> Take me to Washington DC
> Put North Carolina here
>
> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together
a
> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>
> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
> subject, perhaps) of a given sentence?
>
> For example:
>
> Input:
> Put North Carolina here
>
>
> And then I can call my methods like this?
> getMainAction() --> returns "put"
> getMainSubject() --> returns "north Carolina"
>
> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes
sense?
>
> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
> playing with examples.
>
> Thanks in advance for any help.
>
> take care,
> Sina
>
>
>
>
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
>


Re: deriving commands from sentences

Posted by John Stewart <ca...@gmail.com>.
I would use the chunker to obtain verb and noun phrases from the
input.  You can then look for specific verbs and nouns you're
interested in.

jds

On Sun, Jan 8, 2012 at 4:05 PM, Sina Bahram <sb...@nc.rr.com> wrote:
> Hi all,
>
> I just joined the list after reading through the OpenNlp manual and playing with some code.
>
> I think the tools provided by OpenNlp are fantastic; however my question is this. are there other collections of code, recipes,
> papers, or any additional resources at all instructing one how to use these tools to achieve a specific purpose?
>
> For example, write now, I'd like to write  a simple command parser.
>
> Maybe things like this:
>
> Make that bigger
> Zoom in
> Slice that 9 ways vertically
> Give me 10 horizontal slices
> Take me to Washington DC
> Put North Carolina here
>
> How can I use the OpenNlp tools to do this? I understand that name finders can be used to find things like "North Carolina",
> although I could also simply use a POS tagger, I'm guessing, and simply see what got marked as prp ... but how can I put together a
> command parser, then start improving upon it through iteration, inclusion of other heuristics and algorithms, etc. etc.
>
> Can I use the parser to shortcut through some of this? for example, can I ask the parser what the direct object of the verb of a
> sentence is, and expect it to reliably, within reason of course, give me the major verb (the action) and major direct object (the
> subject, perhaps) of a given sentence?
>
> For example:
>
> Input:
> Put North Carolina here
>
>
> And then I can call my methods like this?
> getMainAction() --> returns "put"
> getMainSubject() --> returns "north Carolina"
>
> or whatever ... I understand it's maybe not that simple, but I'm simply wanting to know how and where to start, if that makes sense?
>
> Lastly, and definitely most importantly, thanks go to every single author and contributor of OpenNlp. I'm quite impressed just by
> playing with examples.
>
> Thanks in advance for any help.
>
> take care,
> Sina
>
>
>
>
>
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
>
>
>