How to Make an A.I. Part 4 - the Homophone Problem : 3 Steps - marineyoune1946
Intromission: How to Make an A.I. Part 4 - the Homophone Problem
The early day I was talking with my A.I., and I aforesaid to
information technology, "I am going upstairs to dinner, we are having STEAK".
Nonetheless, the Speech Recognition (Strontium) software package taken this as "… we are having Adventure"
I ran into a similar (but different) trouble earlier when I was talking roughly a photograph, and I said the tidings "PICTURE". The SR software package interpreted this as "PITCHER"
The fix for this was a simple retraining of Sr computer software. (Or maybe my pronunciation)
Only when I say the words STEAK or STAKE, I sound out them exactly the same way, and retraining the SR software will not help in cases like this.
Step 1:
One idea to solve the "Homonym Job".
I take in to look at the word "in context" to determine which spelling to use. The human brainiac does this quite easy, and you don't even know that you are doing it.
This means that other wrangle in a sentence are examined, and your brain decides which spelling looks best. Now, how do I do this in write in code?
My A.I. political program parses a conviction into an array of individual row exploitation the Visual Basic (VB) "Disunited" go. [ MyArray = Schism(InputSentence, " ") ]
Each word in the array can live checked to see if it is a realistic homonym by looking in a database table containing a heel of homonyms.
Of course, creating another table agency that we will need to fill out IT with information, and also we will need to be competent to maintain the data in the table as well.
A somebody learning subroutine can beryllium built later to scan a bunch of text, looking for run-in in my Homonym table, and capture other "context" words. Hmmmmm, perhaps several tables are needed…
Writing these "Instructables" helps me "argue out" a solution to a programming take exception.
Step 2:
Social system of HomonymContext table.
My get-go idea was a table containing words, alternate spellings, and "Context" run-in. The approximation was to search a conviction containing a homonym, for other words that gives the "context", so that the program can square up which spelling to use. The table also contains a column named "WordDef" to hold the definition of the Christian Bible, which is more for the human maintaining the board than the A.I. code.
To search each word, I can utilization VB code and SQL code like…
For from each one Word in MyArray
Query = "Select Word from tblHomonynContext where word = '" & word & "'"
if this inquiry returns a result, then the Word is a homonym
Incoming
This is just pseudo code at this point – I stimulate not thus far written the exact code, or figured out all of the details. But feel free to take my idea, and implement it using your own favorite programming language.
Step 3:
If your input condemn contains a homonym, you can straightaway
execute VB code that will check the other words in your sentence, with the context row in the query results.
You could also do this all in a SQL stored function, which may accomplish quicker.
The VB "InStr()" function will render a number greater than zero, if one string is contained within other strand, or it will return set, information technology the string is NOT controlled in the other.
Instr() actually returns the position of the contained string. If you rightful want to have a go at it if String1 contains String2, you can use code like "If InStr(String1 , String2) > 0 …"
You will have to build this code in your favorite programing language.
The HomonymContext table is not a very good design. It has a band of repeated data, and this is considered to be "Non-Normalized" aside database designers. A better way to implement this functionality would be to use two tables, in a parent-small fry relationship. One table (The Parent) would book a list of homonyms , their definitions, and likewise a Row ID. This Row ID is used as a key to the "Child table" which would contain the speech and their context words.
This would be easier to query ( and to uphold) than my original conception.
Make up the Eldest to Share
Recommendations
-
Anything Goes Contend 2022
Source: https://www.instructables.com/How-to-Make-an-AI-Part-4/
Posted by: marineyoune1946.blogspot.com

0 Response to "How to Make an A.I. Part 4 - the Homophone Problem : 3 Steps - marineyoune1946"
Post a Comment