Linas if i understand your code correctly it would do this.

x1 is a quantity of/is made of chalk from source x2 in form x3. 
=> split on X
["x1", "is a quantity of/is made of chalk from source" , "x2" , "in form" , 
"x3"]
=> split on / and distribute
["x1", "is a quantity of" , "x2" , "in form" , "x3"]
["x1", "is made of chalk from source" , "x2" , "in form" , "x3"]
=> join again
x1 is a quantity of x2 in form x3                         // WRONG should 
be "x1 is a quantity of chalk from source x2 in form x3"
x1 is mad of chalk from source x2 in form x3

So it's not that easy. Of course, it seems I am going to use something like 
this anyway and then fix the errors by hand.

/roman

On Friday, November 18, 2016 at 6:53:11 PM UTC+1, linas wrote:
>
> This is still very easy:  modify the script to split on the x's, instead 
> of splitting on whitespace, and only then split on the slashes.
>
> I assume the x's really are the letter x. If the x's are just some strings 
> of random words, then the problem is not really solvable deterministically 
> by any algorithm.
>
> --linas
>
> On Fri, Nov 18, 2016 at 2:21 AM, Roman Treutlein <[email protected] 
> <javascript:>> wrote:
>
>> Maybe I should have given more examples. Because while your script might 
>> work for this example it won't work for this:
>>
>> *x1 comes/goes to destination x2 from origin x3 via route x4 using 
>> means/vehicle x5.*
>>
>> This would at least have the advantage of the alternatives consisting of 
>> only 1 word, but as in the first example and the following this is not 
>> always the case.
>>
>> *x1 is a quantity of/is made of chalk from source x2 in form x3.*
>>
>> But I probably will have to use a simple solution like the one you 
>> provided and then just fix everything it gets wrong by hand.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "opencog" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/opencog.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/opencog/8e577a5c-e978-402a-8e90-161e522656a4%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/opencog/8e577a5c-e978-402a-8e90-161e522656a4%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/e640dd99-b58f-4399-b1b9-ce6a624eb8e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to