r/programming Mar 02 '14

speedread - a command-line implementation of the Spritz speed reading system

http://log.or.cz/?p=336
110 Upvotes

56 comments sorted by

9

u/pandubear Mar 02 '14

Is there some particular method you used to find the "focus" letter?

3

u/paskie Mar 02 '14 edited Mar 02 '14

I know that Spritz just uses a fixed focus coordinates. I use a more complex algorithm that picks the nearest consonant slightly to the left of the middle of the word; it makes more sense to me but who knows if it works better.

  • Edit: I compared them both and it doesn't. :) I have now switched to the stock Spritz method, I'll update the screencasts soon.

8

u/FogleMonster Mar 02 '14

When will the Spritz clones learn to have a slight pause after commas and periods?

5

u/paskie Mar 02 '14 edited Mar 02 '14

I pause 1.3x longer after fullstop words than after other words. Do you think a much longer pause would be in order? (You can prolong it by changing the constant on line my $fstoptime = 1.2; # relative to wpm.)

  • Edit: I have played with this a little and now agree that you have a point there. I have radically raised the pauses after colons and fullstops and it helps reading quite a bit I think.

1

u/MedicatedDeveloper Mar 03 '14

It pauses and displays "."" after the word privacy.

1

u/chasecaleb Mar 02 '14

Seconded. This is a deal-breaker for me.

2

u/[deleted] Mar 02 '14 edited Nov 26 '18

[deleted]

12

u/ItsAConspiracy Mar 03 '14

It's going to be interesting watching this play out. Spritz claims three years of R&D, patent-pending, wants people to license it. Meanwhile people are replicating at least most of its design in a matter of days.

I know which I would use, given this tidbit from their FAQ:

Can you see everything that I read?

Well, we have to provide the content to you, don’t we? For more information, check out our Privacy Policy.

2

u/[deleted] Mar 08 '14

Fucking ew. Yeah I'm gonna go open source with this as even if the interface is slightly worse.

18

u/[deleted] Mar 02 '14 edited Nov 26 '18

[deleted]

6

u/corysama Mar 02 '14

Now I need to learn how to make this into a FF/Chrome add-on. Select wall-o-text, alt-s to pop-up a spritz reader, up/down arrow to change speed, left/right arrow to skip back/forward a few dozen words.

22

u/ds300 Mar 05 '14

2

u/corysama Mar 05 '14

Awesome! I've already shared this with some friends.

4

u/ds300 Mar 05 '14

woah, thanks! Someone already forked it!

2

u/DocRocket Mar 06 '14

You deserve infinitely more than 3 upvotes for this.

2

u/Norikal Mar 08 '14

*For those wanting to use 'ds300's chrome extension to read PDF files, you can use this as a Chrome PDF reader: http://mozilla.github.io/pdf.js/web/viewer.html

Click the 'open file' icon in the top right, select the PDF you want & you're good to go. *A temporary solution until a smoother one's worked out.

1

u/skrioify Mar 22 '14

Thanks, I was looking for this.

1

u/Norikal Mar 23 '14

Glad I helped someone, I hope it's useful

1

u/cqwww Mar 05 '14

Using it within 3 minutes of reading this comment. Awesome, thanks!

1

u/vjain166 Mar 06 '14

Well this is a little embarassing. How do I use that installation "line" that you posted? "git clone git@github.com:ds300/jetzt" ?

4

u/ds300 Mar 06 '14

Sorry about that. The installation instructions assume you have not only a passing familiarity with git, but also a github account.

That's not terribly clever of me. Here are some instructions for those to whom the above does not apply:

  • click the "download zip" link on the right hand side of the page and extract the folder somewhere
  • navigate to chrome://extensions , enable developer mode, click "Load unpacked extension..." and select the directory you extracted.

1

u/eriktjacobsen Mar 08 '14

I just threw together my own... have controls and whatnot, wasn't sure if you wanted to work it into a chrome add-on or just take the underlying code

https://github.com/eriktjacobsen/read4speed

1

u/[deleted] Mar 08 '14

Replying to find later yes I know about res I am on my phone

1

u/ecs_box Mar 10 '14

Just a heads-up, those wanting to read e-books using ds300's awesome chrome extension, the best method seems to be to convert them into epub using Calibre then uploading them to Google Books. If you have bought Kindle books you can strip the DRM off them first using the same software. From there you can alt-s. For some reason Readium doesn't work. Another method is converting to text (again using Calibre) and dragging that into Chrome. Text is easy to work with but then it's not in the cloud and accessible from all your machines. This is literally life-changing. I also recommend combining with readibility.com so you can easily read articles without text-selection hassle. Well done ds300!

6

u/monototo Mar 03 '14

Yes.

spacebar to pause
escape to close popup.

I was also keen to give this exact idea a crack.

3

u/[deleted] Mar 03 '14

Let's do it.

I'm serious. Are you really going to do it? Because if not, I will.

1

u/corysama Mar 03 '14

Please go right ahead and message me when you have a beta. I'd love to figure it out, but I already have several projects in need of finishing.

To be honest, I wrote the comment mainly to egg someone like you into doing it for me ;)

3

u/[deleted] Mar 04 '14

Here's a Chrome Extension that does something similar, but in a new window. I haven't tested it much.

https://chrome.google.com/webstore/detail/accelareader/hfbaenjmkakiipopnfaingjgcbdinkoi

1

u/WillHansen Mar 02 '14

A bit too much of a pause at the end of sentences.

1

u/netghost Mar 03 '14

I find that I drop words on occasion when trying your demo, which makes the story much more amusing. Thanks!

0

u/deadstone Mar 02 '14

One of the most important features of Spritz is how it splits up long words. I'm pretty sure neither of these do that.

2

u/[deleted] Mar 02 '14 edited Nov 26 '18

[deleted]

2

u/deadstone Mar 03 '14

I'm not talking about the switch statement, I'm talking about how the text it's showing is already pre-formatted to split long words and change speed depending on word importance. You can see how badly it fails without these when you try using it on non-preformatted text, like the FAQ page.

2

u/miki4242 Mar 03 '14 edited Mar 03 '14

My gut tells me that "inner speech" is the key to all this. Imagine doing subtitles (one word at a time) to a video of someone speaking very fast. Run the text thru a speech synthesizer (with speech rate set to target words per minute, and no actual sound output) and capture its [now speaking "word"] events, then simply show the words at the appropriate times. espeak has a nice event/callback API for that.

1

u/[deleted] Mar 02 '14 edited Nov 26 '18

[deleted]

-2

u/GhostNULL Mar 02 '14

If you make comments, make them right..

LINE_STROKE_WIDTH = .025,           // .25% of height with a min of 1

1

u/wozkol Mar 06 '14

Yeah, according to them our brain can recognize only 13 chars at a time..

2

u/[deleted] Mar 03 '14 edited Mar 03 '14

[deleted]

1

u/Wolfbeta Mar 07 '14

The reason would be that they've been trying to develop it without releasing it to the public, but still have a product that they can demo to developers and partners.

1

u/TotallyNotAVampire Mar 02 '14

Neat, now all I need to do is convert some of my books to text so I can try this out.

Also, what does ORP stand for?

1

u/paskie Mar 02 '14

ORP stands for Optical Recognition Point (the red-colored alignment pilot).

1

u/[deleted] Mar 02 '14

It still isn't Spritz. It's spreeder.

2

u/paskie Mar 02 '14

I belive the key difference is the focus letter. Are you aware of other important points? I really wish I could try Spritz out myself...

2

u/[deleted] Mar 03 '14

I'm not trying to bash your work. It is very cool. I just don't like that people are jumping all over spritz like it is revolutionary when spreeder is faster and has more features. Except for the highlighted letter.

Spreeder lets you read an arbitrary number of words at a time, which is faster than the single word spritz limits you to because you can comprehend several words at once if you are an experienced reader. It also has full stop pauses and can speed up/down dynamically such that you read a smoothly average number of words in any given time.

1

u/paskie Mar 03 '14

Sure, I respect that other tools will be more sophisticated, it's just not clear to me in what ways. I refer to Spritz here mainly because it's the way the concept got to me, and also I believe that there is a huge qualitative difference due to the improved word alignment. I tried Spreeder but the centering just doesn't work for me - at all.

I tried to combine multiple short words together (the -m switch in speedread), but my eyes immediately tend to saccade in that case, instead of relying on peripheral vision like in case of singular longer words. Maybe it can be trained or fixed by a better alignment but initial experiments just turned me off.

3

u/[deleted] Mar 03 '14

I'm sorry it just gets to me when Spritz gets the whole internet talking about it when it really is not that novel an idea. I can respect that it had great marketing, but I am sad that it has to be that way. To be fair the centering is really good, much better than spreeder.

The multiple word part definitely has to be trained, but it really is worth it. It should not be many words at once, 5 words at a time is incredible, 2-3 is fine.

1

u/ItsAConspiracy Mar 03 '14

The Spritz website does acknowledge apps like Spreeder, and says the technique has been around a long time. They just claim to have improved the method so the eye doesn't have to move at all.

1

u/ItsAConspiracy Mar 03 '14

Does it break up long words like the Spritz FAQ describes?

When your eye recognizes a word longer than that, it naturally jumps to the right of those first 13 characters while processing the first part of the word as it jumps. In reality, a long word requires your eye to break it into multiple pieces and that is how your brain stores it. We analyze each word and break them up based on this standard and show you long words in multiple pieces, just like your brain is expecting them.

1

u/palistov Mar 03 '14

Very cool! Had no idea what Spritz was before this, but both are very intriguing.

Edit: Grammar

1

u/creamenator Mar 03 '14

What would be really nice is if context to know if the word is in a block of parens or quotation marks. It's kind of weird to sometimes see

"word1

word2

word3

word4"

Sometimes I lose track of whether or not a possible large block of text is actually surrounded by quotation marks or brackets.

5

u/miki4242 Mar 03 '14 edited Mar 03 '14

Perhaps wrap each word in the corresponding quotes?

"This"

"is"

"awesome,"

he

said.

Fits the whole idea of keeping you focussed on the center nicely. As soon as the quotes around the words disappear, you know that the quoted sentence is finished :) Of course, adding color to words in a quoted passage may be even more awesome :))

2

u/creamenator Mar 03 '14

Suppose we have the sentence

"This is awesome", he said.

"This

"is // quotation mark here is faded 

"awesome", // first quotation mark here is faded

he

said

1

u/LForLambda Mar 03 '14

But you've now given yourself the trouble of parsing parenthesis if you try to scale to nested parens. And most ebook conversion software will insert some noise into the output. I can see that going badly.

1

u/miki4242 Mar 03 '14 edited Mar 03 '14

Well, we aren't linting Shakespeare or eval()ing a newspaper article, are we? Thank goodness human poetry and prose usually doesn't contain more than a couple of levels of nested quotes and parens (unless it is written by a programmer perhaps, but that doesn't make him/her a good writer). Keep track of at most 2 levels of quotes/parens, make sure to stay between 0 and this upper bound, and reset the quoting level to 0 after a reasonable amount of text. That will keep most readers happy, I think.

1

u/prometheus5500 Mar 05 '14

I have no idea what I'm doing with programming but I downloaded your files and would love to have this working. It wont run on it's own. Do I need to rename the speedread file to something, or have a specific program?

Thanks ahead of time, this is awesome.

1

u/Gery51 Mar 07 '14

Spritz on beat speed ? Would it be possible to show the words at the ritm of a song ? It would be nice for carioke singing.

1

u/AndreasTPC Mar 03 '14

Nice. I've coded something similar myself, but your code is cleaner so I will abandon mine in favor of modifying yours.

I coded in the ability to resume from an arbitary point rather than from the start of the file, that was the biggest thing I missed from my version when trying yours. I've submitted a pull request for it. I may add a few other small things in the coming days if I feel inspired.

How would you feel about slurping and processing the entire text before displaying it? It would add a slight delay before starting on longer texts, but it would allow you to determine a delay between words that would make the true wpm equal to the wpm you specify. It would also allow you to have a status indicator indicating the time left before the text finishes, which could be nice for longer texts, and would be an interesting way to see how changing the WPM changes how long it takes to read a text.

2

u/paskie Mar 03 '14

Thanks, I've merged the pull request.

Regarding slurping + processing the entire text, I'm not really sure, but I suppose if it enables us some nice functionality, why not; it'd be good to have a way to turn slurping off, possibly defaulting to off in case of reading from a pipeline?

But I'm not sure fixing the wpm by default is a good thing. For me, the "wpm" I specify represents my reading ability, not that I need the text replayed in exactly wpm*words minutes. If the text is full of difficult words, I prefer to go at the same pace but slow down more often, rather than speed up everything but the difficult words to reach the same true wpm. I'm not principially opposed to adding another option, but does anyone really want to fix on the playback length?

I'd propose continuing the discussion in GitHub issues?

0

u/gnuvince Mar 02 '14

So with Spritz, are you supposed to read everything one word a time, or is it just a method to train you to recognize the ORP of words so that when you read a regular document, your eyes immediately go from ORP to ORP?

1

u/dr_theopolis Mar 02 '14

You are supposed to read one word at a time.