Page 1 of 1

ReOrder Data

Posted: Sat Mar 31, 2012 8:50 pm
by codefreak
I want to asking about, how do PHP reorder data with their grammatical mean.
The pattern from database and input by anyway of user.

For example:
i[S] love[P] her[O].
i[S] sleep[P] lastnight[K]

In database record:
id|r1|r2|r3|r4|r_1|r_2|r_3|r_4|
1| S| P |O| - |O | P | S | - |
2| P| K |- | - | K | P | - | - |

And the result is [like pattern]:
he[O] love[P] i[S]
i[S] lastnight[K] sleep[P]

How to make it ?
Thank you. :)

Re: ReOrder Data

Posted: Sat Mar 31, 2012 9:00 pm
by califdon
PHP has no built in semantic functions (as far as I know). In any case, they would be different for every different language.

Re: ReOrder Data

Posted: Sat Mar 31, 2012 10:15 pm
by codefreak
PHP can't do that?
Any solution?

Re: ReOrder Data

Posted: Sun Apr 01, 2012 11:25 am
by califdon
The only solution I can think of is to write some software, perhaps in C++ or Java to analyze the grammar of a sentence in various languages. That might be a couple of years of work. You are describing an Artificial Intelligence project of considerable difficulty.