ReOrder Data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
codefreak
Forum Newbie
Posts: 7
Joined: Sun Mar 04, 2012 8:07 pm

ReOrder Data

Post 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. :)
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: ReOrder Data

Post 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.
codefreak
Forum Newbie
Posts: 7
Joined: Sun Mar 04, 2012 8:07 pm

Re: ReOrder Data

Post by codefreak »

PHP can't do that?
Any solution?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: ReOrder Data

Post 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.
Post Reply