S
Sniper Abandon
Is there any ruby gem/lib for parsing english sentence into individual
parts of speech(like Noun/subject/verb/adjective/adverb/etc)?
for example
1).
sentence1 = "Matz created Ruby"
parse_grammer(sentence1) # =>
{:subject=>["Matz"],:verb=>["created"],bject=>["Ruby"]}
2).
sentence2 = "David is creating ruby on rails upcoming release version
3.1.beta"
parse_grammer(sentence2) # =>
{
:subject=>['David'],
:auxilay_verb=>['is'],
:verb=>["creating"],
bject=>["ruby","rails"],
:conjection=>["on"],
:adjective =>["upcoming","release","version"],
:adverb=>["3.1.beta"]
}
Any idea ?
parts of speech(like Noun/subject/verb/adjective/adverb/etc)?
for example
1).
sentence1 = "Matz created Ruby"
parse_grammer(sentence1) # =>
{:subject=>["Matz"],:verb=>["created"],bject=>["Ruby"]}
2).
sentence2 = "David is creating ruby on rails upcoming release version
3.1.beta"
parse_grammer(sentence2) # =>
{
:subject=>['David'],
:auxilay_verb=>['is'],
:verb=>["creating"],
bject=>["ruby","rails"],
:conjection=>["on"],
:adjective =>["upcoming","release","version"],
:adverb=>["3.1.beta"]
}
Any idea ?