Dennis Lee Bieber wrote:
And is it supposed to handle
for london give the weather to me
for the london weather give me
Or
Where can I buy some new weather boarding for my
house in London?
:-)
--
Greg
...
Do a search on natural language
I need help with getting the useful information how do I get the place
if I don't now how long the string is?
And is it supposed to handle
for london give the weather to me
for the london weather give me
...
Do a search on natural language processing...
On May 16, 2:57 pm, CM cmpyt...@gmail.com wrote:
I need help with getting the useful information how do I get the place
if I don't now how long the string is?
And is it supposed to handle
for london give the weather to me
for the london weather give me
...
I'm planning to create a human word program
A human inputs a string
Give me the weather for London please.
Then I will strip the string.
weather for london
Then I get the useful information.
what:weather where:london
After that I use the info.
I need help with getting the useful information how
On Sat, May 15, 2010 at 9:02 PM, timo verbeek timoverbee...@gmail.comwrote:
I'm planning to create a human word program
snip
I need help with getting the useful information how do I get the place
if I don't now how long the string is?
Boy, that is a very hard problem. Are the inputs
On Sat, May 15, 2010 at 9:12 PM, Xavier Ho cont...@xavierho.com wrote:
You need to have a very, very good set of heruistics and deterministic
functions to do that.
How do I get the position of a known word in a string if the length if
unknown?
And this is what I get for late night
On May 15, 1:02 pm, timo verbeek timoverbee...@gmail.com wrote:
Place starts always with for
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, May 15, 2010 at 9:32 PM, timo verbeek timoverbee...@gmail.comwrote:
On May 15, 1:02 pm, timo verbeek timoverbee...@gmail.com wrote:
Place starts always with for
Okay, much better.
Given that constraint, it looks like regular expression can do the job. I'm
not very experienced with
timo verbeek ha scritto:
I'm planning to create a human word program
A human inputs a string
Give me the weather for London please.
Then I will strip the string.
weather for london
Then I get the useful information.
what:weather where:london
After that I use the info.
I need help with getting
superpollo ha scritto:
timo verbeek ha scritto:
I'm planning to create a human word program
A human inputs a string
Give me the weather for London please.
Then I will strip the string.
weather for london
Then I get the useful information.
what:weather where:london
After that I use the info.
I
Here's my take on that:
loc = re.search('for\s+(\w+)', string).group(1)
Not much different, really, but it does allow for multiple spaces (\s+) as
well as requiring at least one character in the word (\w+), and I use a
matching group to extract the location directly instead of splitting the
11 matches
Mail list logo