Comments (3)
Eh. I added the last bits of code and pushed it. We'll see how many things that breaks. It still doesn't solve the problem of giving hints for phrases, but at least it lets you drill them.
from steno-jig.
Yeah...I was thinking about trying to do that but it seemed like it would be more work than I felt like spending on it. Steno Jig is a weekend hack that got out of hand, so it's not very carefully structured.
The problem is that currently it splits your given answer into words, then asks for that number of words from the exercise. If some of your exercise units are phrases instead of words, then you would need to restructure the loop. It would need to loop while the answer string is non-empty, getting a single unit from the exercise and checking to see that it's a prefix of your typed answer. If it is, mark it correct and continue. If it isn't, mark some amount of the answer as an error (how much? how do you sync up again?). So matching arbitrary text turns into essentially writing a full diff algorithm? I think?
If all you need is phrasing, then a better approach would be to modify TypeJig.Exercise.prototype.nextWord
, at the very bottom of type-jig.js
. Instead of returning the value, stick it in a property and then chop words off until it's gone? Something like this (completely off-the-cuff and untested):
TypeJig.Exercise.prototype.nextWord = function() {
if(this.currentUnit.length === 0) {
var word = rotateAndShuffle(this.words);
if(word instanceof Array) word = this.select(word);
this.currentUnit = word.split(/\s+/)
}
return this.currentUnit.shift();
}
You might need a check in there for the end of the exercise, because word
will probably be false
or undefined
instead of a string?
from steno-jig.
This works awesome for drilling phrases - thank you so much! I've been playing around with it this evening, and as far as I can tell, everything else still works normally. It's cool that it also still supports inputting the words in a phrase one by one (because you don't always remember to get the whole phrase off in a single stroke).
Regarding hints for phrases, it's possible that by the time steno learners reach the point of starting to drill phrases, they'll be using Steno Jig primarily to build speed rather than to learn steno theory/build steno vocab. And since the hints feature still works normally for the individual words in phrases, it might not be much of an issue at all (just my opinion).
If Steno Jig really did start out as a "weekend hack" as you put it, it's a damned impressive one. None of my weekend steno hacks have ever even graduated off the command line.
Thanks again!
from steno-jig.
Related Issues (19)
- Word boundary errors possible HOT 3
- Additional whitespace in first line of answers HOT 3
- "Back to Menu" link doesn't work on Gutenberg drills
- False alarm at punctuation
- Feature request: showing speed in other units
- The word "diphthong" is misspelled. HOT 2
- Make stylesheet colour-blind friendly HOT 4
- Feature request: Disabling "Repeat Drill" hotkey HOT 3
- Line break breaks everything HOT 2
- Hello Joshua - How is WPM calculated? Something doesn't fully add up. HOT 3
- copy paste problem HOT 4
- Feature Request: Navigate between Steno Jig and Learn Plover lessons
- Graphing Bug HOT 3
- More alternative (British) spellings to match HOT 3
- didactic hints HOT 1
- [Suggestion] Adjust length of keyboard drills HOT 1
- [Suggestion] Emily's Symbol Dictionary, Jeff's Phrasing and Python dictionary training HOT 7
- Suggestion: alternative animation scrolling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steno-jig.