![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: How many items in a list Topic Summary: Lists Created On: 11/04/2020 12:01 PM Status: Post and Reply |
|
![]() |
|
In a dicatation list <MY_LIST> how many items is reasonably practical. I would like to have a list that increments by 5, from say 100 to 30,000 - is that practical? Easy enough to write a script to create the list and paste it in, but I don't know if that would be too many items as that would be close to 6000 items. Thanks for the help. ------------------------- Tom |
|
|
|
![]() |
|
Experimental testing has proved that the more items you add to a list the more potential you create for getting delays. It is a moving target, but be advised to stay clear under 500 items within the list. It also depends on how many lists and concurrently competing alternatives the recogniser has to deal with at any given time.
-------------------------
|
|
|
|
![]() |
|
Thank you. ------------------------- Tom |
|
|
|
![]() |
|
In addition to Wilke’s sage advice… It might matter whether this is a KnowBrainer list or a Dragon list (and, if Dragon, which version). It also might matter how beefy your hardware is. I have a fairly powerful desktop but with Dragon 15.3 (I have not tested this on anything newer) lists of 500 are really pushing it. However, if it is a KnowBrainer list I have no trouble with a list of ~5000 integers (1-5000 inclusive). where the list "direction" is your typical up/down/left/right and you parse ListVar2, do some error checking to make sure that it is a viable integer then convert the integer-as-string into a mathematical integer. ------------------------- -Edgar |
|
|
|
![]() |
|
Thanks Edgar, I will explore the open ended dictation command. That may be an interesting compromise. I would use Knowbrainer, so I may also try loading the list and see what happens, but my gut tells me it may be too big. Machine is powerful enough, but would be a lot of items and as you say I can do some error checking to make sure i am getting what I need/want.
P.S. Thank you for the applications you've so generously shared, inspired me to solve a problem I have with a program I use that has tabs across the bottom, but no keyboard shortcuts and doesn't react to show or display numbers. After reviewing your code, I wrote an app that shows numbers across the bottom of the app window, and while the numbers aren't always exactly where I want them to be as the tabs are variaable widths, they are dense enough that I can click on any tab. ------------------------- Tom |
|
|
|
![]() |
|
These have no error checking: this first one would look like "size window # by #" (it throws away the middle word "buy": … <Dictation> Sub Main dictationAsString = ListVar1 this next one would look like "use number #" : … <Dictation> Sub Main N = Val(ListVar1) I sure wish I could figure out some way to do this C# code in Dragon/KnowBrainer basic: int temp = 0; try { if ((temp < 1) || (temp > 99)) { Obviously, there is Dragon/KnowBrainer Basic code to convert a string to an integer but, as far as I can tell it has no way to do error checking. ------------------------- -Edgar |
|
|
|
![]() |
|
Edgar do you mean something like this
'#Language "WWB.NET" Sub Main Try Dim i as integer Dim s as string s = "not a value" i = cint(s) Catch Ex as System.Exception Debug.Print Ex.ToString() '"error" End Try End Sub ------------------------- Tom |
|
|
|
![]() |
|
I sure wish I could figure out some way to do this C# code in Dragon/KnowBrainer basic: Obviously, there is Dragon/KnowBrainer Basic code to convert a string to an integer but, as far as I can tell it has no way to do error checking.
As Tom has said use WWB .Net with KB, you can convert anything from C#, obviously there are restrictions like threading.
https://www.tutlane.com/tutorial/visual-basic/vb-try-catch-statement ------------------------- |
|
|
|
![]() |
|
Yes, exactly! Thank you so much, I'm swamped for the next few days but when I get a working example for converting <dictation> to an integer I will post it. ------------------------- -Edgar |
|
|
|
![]() |
|
One of the nice things about calling out to AutoHotKey, or any modern-Perlish-regex-capable language, is that I can do things like if( 0 < RegExMatch(command, Q: do any of the Dragon/KnowBrainer scripting languages support regexps similar to Perl's in power? (AHK and many other systems use PCRE, the Perl Compatible Regex Library.) I cannot imagine many reasons why PCRE should not be available to Basic scripting languages. Probably the most important thing is have capture groups. Unnamed above; even better if explicitly named, eg. "row (?P<row>\d+)" --> result in Match["row"] containing that field's string. ------------------------- DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design. |
|
|
|
![]() |
|
Yes you can use regular expressions. I haven't yet, but been thinking about it, but here is my test that I used a while back to prove it works.
'#Language "WWB.NET" imports System.Text.RegularExpressions Sub Main Dim sText as String = "X0ABCXABC" Dim reTaskID As New Regex("(X)", RegexOptions.IgnoreCase) Dim mcTaskID As MatchCollection = reTaskID.Matches(sText) If mcTaskID.Count > 0 Then msgbox("Count: " & mcTaskID.Count) end if end sub ------------------------- Tom |
|
|
|
![]() |
|
Obviously, this won't work in Dragon; it works in KnowBrainer: '#Language "WWB.NET" Sub Main Try ' Code that may cause exception Dim x As Integer x = Integer.Parse("1") MsgBox "GOOD 1" x = Integer.Parse("one")' fails MsgBox "GOOD one" Catch ex As System.Exception ' Exception handling MsgBox "bad " & ex.Message End Try End Sub ------------------------- -Edgar |
|
|
|
![]() |
|
Thanks @TomDonocan.
Q: do you know if these are full PCRE? I guess not actual PCRE code, depeding on the license. (I am sick and tired of Microsoft half-assed and incomplrte implementations of Open Source stuff. But MS is doing more and more Open Source - see the UNIX subsystem for Windows. I can hope.)
makes it look pretty good, but I have npt done a full comparison.
Plus, they don't say PCRE or POSIX or any other regexp standard that I can find. ------------------------- DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design. |
|
|
|
![]() |
|
Dragon supports RegEx through the VBScript. Here is a reference implementation: -------------------------
|
|
|
|
![]() |
|
excellent way of sharing important pieces of information https://xn--jblbluetoothkopfhrer-kbc.com ------------------------- https://xn--jblbluetoothkopfhrer-kbc.com |
|
|
|
![]() |
|
Another option when trying to shrink a list is you can use a combination. For example you have one list that is for the hundreds and another list for the units.
------------------------- Thanks Mark
Dragon Professional Advanced Scripting/KnowBrainer Scripts |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.