Jump to content

String Parsing Program Help

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
peage1475

peage1475

    Newbie

  • Members
  • PipPip
  • 10 posts
I am a begginner programmer and I need help creating a project that will accept a string, parse it, and say whether it is a sentence as defined by a given set of rules. The problem I am having is given a string how can I tell what part of speech a word is. Here is an example:

input string:
fido chased felix.

How can I find out that: fido is a noun, chased is a verb, and felix is a noun?

Is there some sort of built in dictionary that can determine this for me? any help would much apperciated. Thanks

#2
Xystus777

Xystus777

    Learning Programmer

  • Members
  • PipPipPip
  • 59 posts
Let me know if you find help for this. I'm in need too.

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I do not know of any built-in dictionaries. You could try an online thingy - find a website that allows you to search for things such as example.com/dictionary.php?word=Felix and then append the name of the word onto that. However: the word Felix will not be in the dictionary! Bear this in mind.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You could get the OpenOffice Thesaurus (which lists parts of speech) and use that info to help.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Even so - is Felix or Fido in the dictionary?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#6
peage1475

peage1475

    Newbie

  • Members
  • PipPip
  • 10 posts
Thanks for the hlep. I guess what I can do is try to use the OpenOffice Thesaurus and also define some other words I will encounter myself and use both to find the correct part of speach. Thanks again.

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Some words won't be, no.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Even my Firefox dictionary (state-of-the-art of course) didn't recognise the two names. Then again, it doesn't recognise the word "Firefox" either.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums