Click here to Skip to main content
15,884,473 members
Articles / Programming Languages / VBScript

Natural Language Search Engine

Rate me:
Please Sign up or sign in to vote.
2.78/5 (37 votes)
13 Apr 2004CPOL2 min read 86.9K   1.2K   19   13
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.

VB.NET
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.

VB.NET
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.

VB.NET
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.

VB.NET
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
Keep on coding!

Comments and Discussions

 
GeneralMy vote of 1 Pin
dllort11-Jan-10 22:12
dllort11-Jan-10 22:12 
unuseful
General[Message Deleted] Pin
Danny Rodriguez27-Jan-08 9:18
Danny Rodriguez27-Jan-08 9:18 
GeneralInteresting Idea Pin
Anonymous15-Apr-04 15:57
Anonymous15-Apr-04 15:57 
Generalnutcase <EOM> Pin
Jeff Varszegi16-Apr-04 8:06
professionalJeff Varszegi16-Apr-04 8:06 
GeneralRe: Interesting Idea Pin
dog_spawn20-Apr-04 18:00
dog_spawn20-Apr-04 18:00 
GeneralThanks Pin
davidorcin15-Apr-04 12:03
davidorcin15-Apr-04 12:03 
GeneralYou suck Pin
dog_spawn15-Apr-04 10:54
dog_spawn15-Apr-04 10:54 
GeneralThe application loads so cache as many images as possible before they start the application. Pin
davidorcin15-Apr-04 9:56
davidorcin15-Apr-04 9:56 
GeneralRe: The application loads so cache as many images as possible before they start the application. Pin
dzzxyz15-Apr-04 10:13
dzzxyz15-Apr-04 10:13 
GeneralRe: The application loads so cache as many images as possible before they start the application. Pin
davidorcin15-Apr-04 12:01
davidorcin15-Apr-04 12:01 
GeneralNuclear Waist Containment Pin
dog_spawn14-Apr-04 14:19
dog_spawn14-Apr-04 14:19 
GeneralDie Pin
dog_spawn15-Apr-04 5:07
dog_spawn15-Apr-04 5:07 
GeneralCon artist Pin
dog_spawn15-Apr-04 8:15
dog_spawn15-Apr-04 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.