Jump to content

searching for inspiration HELP :)


rondelli

Recommended Posts

Look guys, I`m trying to build something here but have absolutely no idea where to start.

 

Basically I want to build a user text input form, where a user can type some text and after submitting the form, my php program will fetch the text, search the text for key words and output a list of possible categories.

 

So per say let`s say the user type`s something like: I would like to buy a car.

In my mysql db I will have a table CATEGORY like : id_cat(TINYINT PK NOT NULL UNSG), descr(VARCHAR NOT NULL), tags(??????). The tags data type(I need your help here, cause I don`t exactly know of a "list" data type in MySQL and the ENUM Type will only contain one word per assignment, i need an array of strings) will contain a list of words like: car, auto, etc. .

 

After the query is done, my program should say something like this: "Hey so this guy is looking for automobiles (CATEGORY TABLE) because I found that the word "car" matches with a value stored in the ???data type in the column TAGS in the CATEGORY TABLE.

 

Any help is appreciated

Link to comment
Share on other sites

It`s not that simple. :)

Later on I`ll implement a natural language analysis program so I want my "current" program to search the text for keywords. Keywords that reside in the Category Table in MySql table.

 

So I want my program to look for keywords based in my MySql table. Further I need your help to tell me what data type should I use for the tags. Do you think I should use a data type like set(but that dosen`t imply normalization) or a separate table like:

 

Category                tag

id_cat                    id_tag

id_tag                      tag

description

 

instead of:

 

Category

id_cat

description

tag

 

?????

 

Link to comment
Share on other sites

the present search engines that are build up are the ones which will blindly search for any word that have been given up but not with any keyword..

so basically what u need is that u need to store ur search string into some place and then fetch each word of it, then u need to search each word matching with the keyword library that u have build up. when i am saying abt the library it should be quite huge.... :P

so when a match applies it should navigate to the particular category, but the possible problem that would come in here is that

take ur own sentence

i would like to buy a car...

in this u can have two categories like one is that of buy, so under buy u can have sub category like automobiles and so on,,

so u should use a indexing system for this to happen..

definitely i would like to help u on this development, u can contact me at my email address which is given in my site..

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.