How to make a small engine like Wolfram|Alpha?
Posted
by Koning WWWWWWWWWWWWWWWWWWWWWWW
on Stack Overflow
See other posts from Stack Overflow
or by Koning WWWWWWWWWWWWWWWWWWWWWWW
Published on 2010-05-07T16:11:13Z
Indexed on
2010/05/07
16:18 UTC
Read the original article
Hit count: 342
Lets say I have three models/tables: operating_systems
, words
, and programming_languages
:
# operating_systems
name:string created_by:string family:string
Windows Microsoft MS-DOS
Mac OS X Apple UNIX
Linux Linus Torvalds UNIX
UNIX AT&T UNIX
# words
word:string defenitions:string
window (serialized hash of defenitions)
hello (serialized hash of defenitions)
UNIX (serialized hash of defenitions)
# programming_languages
name:string created_by:string example_code:text
C++ Bjarne Stroustrup #include <iostream> etc...
HelloWorld Jeff Skeet h
AnotherOne Jon Atwood imports 'SORULEZ.cs' etc...
When a user searches hello
, the system shows the defenitions of 'hello'. This is relatively easy to implement. However, when a user searches UNIX
, the engine must choose: word
or operating_system
. Also, when a user searches windows
(small letter 'w'), the engine chooses word
, but should also show Assuming 'windows' is a word. Use as an <a href="etc..">operating system</a> instead
.
Can anyone point me in the right direction with parsing and choosing the topic of the search query? Thanks.
Note: it doesn't need to be able to perform calculations as WA can do.
© Stack Overflow or respective owner