KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: CorrectThat 0.3 beta
Topic Summary: New driver script, bug fixes and enhancements
Created On: 09/22/2020 06:42 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 CorrectThat 0.3 beta   - Edgar - 09/22/2020 06:42 PM  
 CorrectThat 0.3 beta   - alexander - 12/23/2020 08:44 PM  
 CorrectThat 0.3 beta   - kkkwj - 12/23/2020 10:55 PM  
 CorrectThat 0.3 beta   - Edgar - 12/24/2020 01:03 PM  
Keyword
 09/22/2020 06:42 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 985
Joined: 04/03/2009

22 September 2020 THIS IS A THIRD LOOK. It's quite stable and I have been using it exclusively for a couple of weeks.

This new driver script has been tested in both KnowBrainer and Dragon 15.3.

Just the application with its attendant files is here:

https://www.dropbox.com/s/vy6jsv5hz8pkf18/CoryJ0.3beta.zip?dl=0

The complete solution is here:

https://www.dropbox.com/s/fdfkkaoa5wjw2p4/CorrectThat0.3beta.zip?dl=0


If you say something then say "select that" (or select any text using any method) the driver script sees that there is a selection and corrects that selection. If there is no selection it examines the Recognition History for the most recent utterance, selects the most recent utterance (relying on you having not move the insertion point in your document nor uttered other commands since the utterance) and corrects that selection.

In previous versions, if your utterance included the word "cap" or words "no caps" things would not be good! I fixed this and also moved some of the work out of the driver script into the application.

The artificial stupidity is not quite as stupid as it was. The algorithm that creates the permutations of suggestions is considerably improved. The order in which these offerings are presented is still hardcoded (though I am considering adding that as a user option) though it now generates all possible permutations with no duplications.

The current dictionary.TXT file does NOT contain words which start with punctuation:

#define

#else

#endif

#if

!defined

#ifdef

#include

#undef

@dress

etc.

I'm working on figuring out how to deal with them next…



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors



 12/23/2020 08:44 PM
User is offline View Users Profile Print this message

Author Icon
alexander
Advanced Member

Posts: 162
Joined: 07/31/2016

Edgar, I'm curious what is your algoritthm for checking similarity? As an example I typed in helllo, and called your utility and it did not seem to find hello, instead suggesting that capitalized versions of HELLLO and Helllo. Also have you thought of putting this up on github? perhaps in the dictation toolbox organization where natlink, caster, and dragonfly among others live?
 12/23/2020 10:55 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 564
Joined: 11/05/2015

Edgar said: "The artificial stupidity is not quite as stupid as it was," and gave it a tenuous version "0.3 beta." Great sense of humor! Thank you Edgar, you made me smile. :-) (I know from experience how exposing some of my beautiful, bullet-proof working code to users mysteriously amplified the artificial stupidity in my code, much more quickly and effortlessly than it took me to add the stupidity in the first place!

-------------------------

Win10/x64, AMD Ryzen 7 3700X, 64GB RAM, Dragon 15.3, SP 6 PRO, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Klim and JUKSTG earbuds with microphones

 12/24/2020 01:03 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 985
Joined: 04/03/2009

Just the application:

https://www.dropbox.com/s/mjagyztdh892qo0/CorrectThat%200.0.4Bapp.zip?dl=0

the complete Microsoft Visual Studio 2017 solution:

https://www.dropbox.com/s/rey31ocjum8ml4t/CorrectThat%200.0.4Bsolution.zip?dl=0


Originally posted by: alexander what is your algoritthm for checking similarity? As an example I typed in helllo, and called your utility and it did not seem to find hello, instead suggesting that capitalized versions of HELLLO and Helllo. Also have you thought of putting this up on github? perhaps in the dictation toolbox organization where natlink, caster, and dragonfly among others live?

First, I want to point out that this was ONLY conceived of as a replacement for the built-in Dragon® Correct That correction dialog. As such, it was only designed to work on words that Dragon®’s speech-to-text engine was capable of outputting. Unless added to Dragon®’s vocabulary, Dragon would not be capable of outputting "helllo" (sic. - misspelled on purpose).

Which brings up a good point - I explain how to add new words to my application’s basic vocabulary but don't express the point that any words you add to Dragon®’s vocabulary (custom words) should also be added to (at least, but also probably to the Unabridged.rtf file) my application’s vocabulary.txt file.

Now, to answer your question… Originally, the algorithm split the selected string (whatever was in the "String To Correct:" text field) using " " (a single, non-capitalized space) as the delimiter ("the quick brown" was split into three strings: "the", "quick" and "brown"). Each individual string/word was then treated with the capitalizor function which created three versions of the word: non-capitalized, capitalized and ALL-caps; these versions were added to the possibilities for eventual permutation. Next comes your "similarity" test; originally, each individual string/word was examined for an EXACT match in vocabulary.txt. If, and only if, that EXACT match was found, a few words before and after it were added to the possibilities for eventual permutation. Now, if an EXACT match is NOT found, the string/word is truncated ("quick" would become "quic" etc.) and the search is performed recursively truncating until something is found. Since all of the single letters are in the vocabulary.txt file some match should eventually be made. As a sanity check I don't allow the truncation to go to 0 characters! With slight modifications to allow for the fact that vocabulary.txt always has ONLY one word-per-line and other files might have multiple words-per-line, each of the other "kinds" (homonyms, synonyms etc.) are processed.

Eventually, you have something that might look like a two dimensional array with all of the original string/words in one dimension and all of their possibilities in the other dimension:

the, The, THE, thee, THCX, thd, THD, T-head, T-heads, thearchies

quick, Quick, Quick, quibbling, Quiberon, quiche, quicken, quickened, quickener

brown, Brown, BROWN, browbeats, browman, browmen, Brown’s, Browne, browned, brunette

This assumes that the user has preferred to choose 6 similar words (3 before and 3 after in the vocabulary). Also note that "brunette" is a synonym for "brown" and "thee" is a SpeakO for "the". Currently I have capitalization processed first, SpeakOs processed next, then vocabulary, homonyms, synonyms, and finally rhymes. I'm considering allowing the user to customize this order.

Currently the recursive code builds all the possible permutations (but does not offer capitalization for the possibilities - only "thee" is considered, not "Thee" nor "THEE"), weeds out any duplications, then truncates the list (very stupidly) to whatever the user prefers for maximum "show no more than…" (1-99) choices.


Originally posted by: alexander have you thought of putting this up on github?/q]

short answer - "Yes."

long answer - I have a GitHub account but have not yet figured out how to actually use it ; I'm 70 and having a little trouble learning how to do new things (old dog, new tricks). Additionally, I'm not too comfortable with collaboration and I have my own off-line version control system. Generally, the time it takes to read, understand and incorporate unsolicited code is not cost-effective.



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors



Statistics
31886 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 4 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 388 guests browsing this forum, which makes a total of 392 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.