Not sure if this should be here or 'Off Topic' but i'll give it a shot here.
No, I'm not looking for a way to get each word in a sentence. I'm looking more for a way to ... hmmm... diagram a sentence. I guess - would this fall under Natural Language Processing?
I'll take anything anyone wants to pass my way. Code already worked on, web resources, whatever ^_^
I'd like to work on a simple bot that can take apart a sentence and react according to that or store information based on what the user types. The other parts I have an idea of where to begin - not so much here.
Sentence parsing
Re: Sentence parsing
> Not sure if this should be here or 'Off Topic' but i'll give it a shot here
Your topic belongs here in General Discussion, which, as the name suggests,
is for general coding discussion. The Off-Topic section is for anything not
directly related to coding and/or PureBasic.
As for your question -- I can't help.
Your topic belongs here in General Discussion, which, as the name suggests,
is for general coding discussion. The Off-Topic section is for anything not
directly related to coding and/or PureBasic.
As for your question -- I can't help.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
The_CodeMaster
- User

- Posts: 41
- Joined: Wed Dec 29, 2004 11:39 am
- Location: Belgium
Use a database or a spreadsheet. Sounds to me like some AI-program, anyway, you might want to have a look at this:I'm looking more for a way to ... hmmm... diagram a sentence
viewtopic.php?t=7261&highlight=
CodeMaster,
The simplest way to diagram a sentance is as a sort of State Chart. This is how recursive descent parser works.
Take a look at this gif of a Pascal syntax, you can follow the lines like a flowchart: http://www.cs.uaf.edu/~cs331/notes/Pascal1.gif
For a simple sentance you can model it like this:
The simplest way to diagram a sentance is as a sort of State Chart. This is how recursive descent parser works.
Take a look at this gif of a Pascal syntax, you can follow the lines like a flowchart: http://www.cs.uaf.edu/~cs331/notes/Pascal1.gif
For a simple sentance you can model it like this:
Code: Select all
Paragraph = Sentance ---> Carriage Return ---> End
^ |
| ----------|
Sentance = Word ---> Full Stop ---> End
^ |
| Space
|----|
Word = Letter ---> End
^ |
|-----|
Letter = [A-Z]|[a-z]
Space = Chr(32)
Carriage Return = Chr(13) + chr(10) (for windows)
Re: Sentence parsing
Hi Xombie,
There was a program called Eliza (done in basic for dos) which did something along those lines (if I understand your description). Basically got the guts of a sentence and responded with something that seemed meaningful. The general concept has been taken and extended from time to time.
http://www.google.com.au/search?hl=en&q ... arch&meta=
The above brought up a few results. Some may be useful?
There was a program called Eliza (done in basic for dos) which did something along those lines (if I understand your description). Basically got the guts of a sentence and responded with something that seemed meaningful. The general concept has been taken and extended from time to time.
http://www.google.com.au/search?hl=en&q ... arch&meta=
The above brought up a few results. Some may be useful?
@}--`--,-- A rose by any other name ..


