Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Natural Language Search Engine

0.00/5 (No votes)
13 Apr 2004 1  
Some would call it a “natural language search engine”. Another term for it is an “automatic search engine” as you do not have to manually parse your ideas for the Internet, rather you converse with the Internet in natural language and it brings you materials as appropriate to facilitate your needs.

Introduction

Question

What do you get when you cross a popular image search engine with a popular AI chatbot like Hexbot Chat Bot?

Answer

Some would call it a “natural language search engine”. Another term for it is an “automatic search engine” as you do not have to manually parse your ideas for the Internet, rather you converse with the Internet in natural language and it brings you materials as appropriate to facilitate your needs.

Rather then search the Internet, why not have your users talk with the Internet in natural language? This project demonstrates doing just that and it’s only a few lines of code! Sometimes the simplest things are the best.

The Application

Sample image

The user clicks “Say It To The Internet” and his/her sentence is processed by both a search engine and a popular AI chatbot like Hexbot. The search engine image results are displayed on the right and the chatbot’s response is displayed on the left. As the user continues his/her conversation with Hexbot, the search engine continually processes and displays related images on the right.

I tried this application out for a few hours and found it to be rather addicting. Most search engines are a continually growing representation of the world’s ideas in a flat format. Popular chatbots such as Hexbot are continually growing representations of the worlds' ideas, thoughts, and states of mind. In this application, we merge the two and create a fascinating utility.

If you are accustomed to manual search engines, then this is a bit like switching from a stick shift to an automatic transmission. At first, it may be a little uncomfortable to talk to the Internet as a person, but it quickly grows on you.

The Code

The user clicks the “Say It To The Internet!” button or hits enter after chatting.

Private Sub cmdSayIt_Click()
    search
End Sub 

Private Sub txtInput_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        search
    End If
End Sub 

The user starts the application.

Private Sub cmdStart_Click()
    cmdStart.Visible = False
    www_hexbot_com.Visible = True
    cmdSayIt.Visible = True
    txtInput.Visible = True
    searchengine.Visible = True
End Sub 

The application loads, so cache as many images as possible before it starts the application.

Private Sub Form_Load()
    www_hexbot_com.Visible = False
    cmdSayIt.Visible = False
    txtInput.Visible = False
    searchengine.Visible = False
    searchengine.Navigate2 "SOME IMAGE SEARCH ENGINE"
    www_hexbot_com.Navigate2 "http://www.hexbot.com/"
End Sub 

Have both the search engine and the chatbot process and respond to the user’s message.

Function search()
    searchengine.Navigate2 "SOME IMAGE SEARCH ENGINE/images?q=" & txtInput.Text
    www_hexbot_com.Navigate2 "http://www.hexbot.com/?strMsg=" & txtInput.Text
End Function

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here