 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 2:55 pm Post subject: |
|
|
Hi Skrell,
If you don't mind posting it when you are done that would be great.
The order actually depends on the type of word it is.
For words hardcoded in the wordlist (ie above the ;LEARNEDWORDS; keyword) the order is the same as it is in the wordlist, and will always be that way. These words always appear *before* any words below the ;LEARNEDWORDS; keyword.
For words below the ;LEARNEDWORDS; keyword, the order changes over time. The more frequently you type a word, the earlier in the list it will appear. When you exit the script these words will be rearranged in the wordlist file by frequency. At the startup of the script the frequency based list is simply based on the order in the wordlist file, so feel free to help the script along by rearranging manually if you want.
If you want all your words to be ordered by frequency, simply put them all under the ;LEARNEDWORDS; keywords.
What I do is I put the language's standard functions and keywords at the top (with the longer ones first), then I simply let the script learn my defined function/variable names, etc.
Yeah, the learning feature is EXCELLENT for function and variable names. No more copy/paste!
BTW, you can tweak how many times you need to type a word for it to be learned permanently.
Also, I'm not sure this would be useful for VHDL, but ForceNewWordCharacters is useful for the programming language I'm using. For example, all the functions begin with "@", so I simply remove that from the Terminating Characters list and put it in ForceNewWordCharacters. Whenever I type an "@" symbol the current word resets and a new word is started with "@" at the beginning (note this also has the side-effect of making it so any words which contain @ are not learned. This is hardcoded this way on purpose, but if people need it otherwise I can parameterize it).
Glad you like it, have fun . Feel free to ask me any more questions you may have. |
|
| Back to top |
|
 |
Skrell Guest
|
Posted: Thu Jun 03, 2010 4:00 pm Post subject: |
|
|
| Do you have to type the ENTIRE word in order for it to move up the word list or can it simply be a word that is matched many times? For instance, if i type the word "directions" more often than "direction" i would like to see it higher on the list. |
|
| Back to top |
|
 |
berban
Joined: 30 Dec 2009 Posts: 159 Location: Worcester, Massachusetts
|
Posted: Thu Jun 03, 2010 4:11 pm Post subject: |
|
|
hahahaha... I made almost this exact same function a little while back, down to the precise user interface and a wordlist.txt file in the script directory! Very funny. No 13 pages of comments on mine though  _________________ ★★★ Email me at berban at aim full stop com ★★★ |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 4:16 pm Post subject: |
|
|
| berban wrote: | hahahaha... I made almost this exact same function a little while back, down to the precise user interface and a wordlist.txt file in the script directory! Very funny. No 13 pages of comments on mine though  |
How long is a while back/did you change your username? This was based on a script by a guy called Jordi S:
http://www.autohotkey.com/forum/viewtopic.php?t=667&postdays=0&postorder=asc&start=0
If yours is a different thread I wouldn't mind seeing it, thanks.
Edit: found it...
http://www.autohotkey.com/forum/viewtopic.php?t=57577
I think if you try this script you will find quite a few advantages over your script (there's a reason TypingAid is over 60 KB, LOL). The basic functionality is really similar though.
BTW, I'm in eastern Mass 
Last edited by maniac on Thu Jun 03, 2010 4:30 pm; edited 3 times in total |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 4:17 pm Post subject: |
|
|
| Skrell wrote: | | Do you have to type the ENTIRE word in order for it to move up the word list or can it simply be a word that is matched many times? For instance, if i type the word "directions" more often than "direction" i would like to see it higher on the list. |
I assume you mean if you select the word from the wordlist rather than typing it all out? If so, then no, you don't have to type the entire word. When you autocomplete a word it counts as having typed it. |
|
| Back to top |
|
 |
berban
Joined: 30 Dec 2009 Posts: 159 Location: Worcester, Massachusetts
|
Posted: Thu Jun 03, 2010 4:54 pm Post subject: |
|
|
yeah I made mine in about 2 and a half hours for some guy who emailed me (i have that thing in my sig) asking about an autocomplete. I don't ever use it for myself oh well, a good excercise in programming! and, neat! no sketch, where are you? I'm in boston now. _________________ ★★★ Email me at berban at aim full stop com ★★★ |
|
| Back to top |
|
 |
berban
Joined: 30 Dec 2009 Posts: 159 Location: Worcester, Massachusetts
|
Posted: Thu Jun 03, 2010 4:55 pm Post subject: |
|
|
also before i made that script i looked in the forum for autocomplete. For some reason this didnt pop up, or i was just very stupid. _________________ ★★★ Email me at berban at aim full stop com ★★★ |
|
| Back to top |
|
 |
Skrell Guest
|
Posted: Thu Jun 03, 2010 4:56 pm Post subject: |
|
|
I hope you don't mind all these questions but i'm trying to integrate this great app into my work environment SOOOO:
I don't see the word "directions" ascending my list(it is always in the same order) of learnedwords am i doing something wrong? Is there a way to set how quickly the word ascends the list? |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 5:10 pm Post subject: |
|
|
| berban wrote: | yeah I made mine in about 2 and a half hours for some guy who emailed me (i have that thing in my sig) asking about an autocomplete. I don't ever use it for myself oh well, a good excercise in programming! and, neat! no sketch, where are you? I'm in boston now. |
| berban wrote: | | also before i made that script i looked in the forum for autocomplete. For some reason this didnt pop up, or i was just very stupid. |
I live on the south shore, but I work in Westwood.
Maybe because you searched for AutoComplete? I only have AutoCompletion in the title. I wonder if I should change it.
| Skrell wrote: | I hope you don't mind all these questions but i'm trying to integrate this great app into my work environment SOOOO:
I don't see the word "directions" ascending my list(it is always in the same order) of learnedwords am i doing something wrong? Is there a way to set how quickly the word ascends the list? |
No problem, I don't mind at all. I'm just happy to know people are using it (especially other programmers).
Which list are you looking at, the actual wordlist file, or the list as it displays on the screen? The wordlist file is not updated until you save the script. This is how the wordlist moves:
WordA (frequency 3)
WordB (frequency 2)
WordC (frequency 1)
Type WordC once more and the list becomes like this:
WordA (frequency 3)
WordB (frequency 2)
WordC (frequency 2)
Type WordC yet again and the list becomes like this:
WordA (frequency 3)
WordC (frequency 3)
WordB (frequency 2)
When 2 words have the same frequency weight (ie, have been typed the same number of times), they move up one spot. The weight is global BTW. So if the partial word you type brings up the most and least frequent word, you have to type the least frequent word a whole lot to get it to the top.
Also, when reading the wordlists, the weights are assigned very naively. The bottommost word is assigned a weight of 5 (or whatever the minimum number of times you need to type a word to learn it is), the next word up is 6, the next up is given a weight of 7, etc.
It works well enough though. |
|
| Back to top |
|
 |
berban
Joined: 30 Dec 2009 Posts: 159 Location: Worcester, Massachusetts
|
Posted: Thu Jun 03, 2010 5:33 pm Post subject: |
|
|
cool sauce. nah I just typed "autocomplete" into the search and it was the second result. I must have been due to my silliness. _________________ ★★★ Email me at berban at aim full stop com ★★★ |
|
| Back to top |
|
 |
Skrell Guest
|
Posted: Thu Jun 03, 2010 5:35 pm Post subject: |
|
|
This is the part that concerns me:
"Also, when reading the wordlists, the weights are assigned very naively. The bottommost word is assigned a weight of 5 (or whatever the minimum number of times you need to type a word to learn it is), the next word up is 6, the next up is given a weight of 7, etc. "
So am i to understand that if your wordlist is 500 words that the topmost word is assigned a frequency "weight" of 505 (500 + 5(minimum number of times)) ?? I think a much better way would be as follows: Each time a word is typed/matched to move it to the top of the list so as words are used more frequently they stay on top and the less used ones will "settle" to the bottom. This will work well for programming keywords.
What do you think? |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 6:38 pm Post subject: |
|
|
| berban wrote: | | cool sauce. nah I just typed "autocomplete" into the search and it was the second result. I must have been due to my silliness. |
Haha, well I'm all set then
| Skrell wrote: | This is the part that concerns me:
"Also, when reading the wordlists, the weights are assigned very naively. The bottommost word is assigned a weight of 5 (or whatever the minimum number of times you need to type a word to learn it is), the next word up is 6, the next up is given a weight of 7, etc. "
So am i to understand that if your wordlist is 500 words that the topmost word is assigned a frequency "weight" of 505 (500 + 5(minimum number of times)) ?? I think a much better way would be as follows: Each time a word is typed/matched to move it to the top of the list so as words are used more frequently they stay on top and the less used ones will "settle" to the bottom. This will work well for programming keywords.
What do you think? |
Yes, it would get a weight of 505.
I'm a bit confused, that will put a word you rarely type at the top when you type it. The words would settle at the bottom but then pop back to the top... that would make it hard when auto-completing words with the number keys - the order would always be changing. It also isn't really frequency based... it's "last-typed" based.
Having it reorder based on the number of times you type a word is a much more reliable way of doing it (it just takes a long time).
For example... I have 500 words in my learned words...
The top word gets a weight of 505, the lowest gets a weight of 5. I type the last word 5x... this gives it a weight of 10 (and the positioning happens on the fly, so you will see this reflected immediately). When I exit the script it will no longer be the last word in the wordlist file. Next time I launch the script it will start with a weight of 10. Now I only have to type it 495 more times for it to reach the top (assuming I don't type any other words).
A perfect implementation would keep a count of the number of times you've typed each word, but that would require modifications to the wordlist file. This method is naive but has the same basic effect. |
|
| Back to top |
|
 |
Skrell Guest
|
Posted: Thu Jun 03, 2010 6:48 pm Post subject: |
|
|
| yes you are correct i see your point....hmm... |
|
| Back to top |
|
 |
Skrell Guest
|
Posted: Thu Jun 03, 2010 6:57 pm Post subject: |
|
|
| well i guess i still think it would be nice to have a parameter in the .ini file that would allow you to specify the number added to a word each time it is used rather than just adding 1 always. |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 267
|
Posted: Thu Jun 03, 2010 7:05 pm Post subject: |
|
|
| Skrell wrote: | | well i guess i still think it would be nice to have a parameter in the .ini file that would allow you to specify the number added to a word each time it is used rather than just adding 1 always. |
Interesting proposal, I'll think about it. That would help words move up in rank faster. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|