Overview - Where Responsive Text meets NLP
I first came across the idea of responsive text from Frankie Roberto's post on Hacker News. I thought it was a very appealing concept -- by using media query, as users resize their windows, the spans display/hide base on their classes. However, there's one thing: you have to manually define what you believe to be unimportant and wrap a span around it.
I wanted something more dynamic, so I combined some natural language processing with the Responsive Text concept, and have something that automatically detects what is important and what is not. In other words, I wanted to create something that analyzes a piece of text (in the textarea), and returns back a block of HTML that responses to media query.
After sitting on the idea for about 8-9 months, finally, I started RT in node with wordnet last weekend, this is a very basic demo, of course, the algorithm to determine relevancy and importance definitely needs more refining. Right now it returns two levels of importance, and as screen width decreases, the first level disappears first, then the second level, very similar to Frankie's example.
I'm hoping language experts, people who know NLP will find this interesting and work on it with me! Thanks!
Blog engine - pretty cool if your blog has a summarizer built in!
How to use
Run the server:
Go to the server folder, do
npm install natural
npm install websocket
- Go to client folder and open client.html
- Connect to WS server (if you are running it on your local machine, use ws://localhost:8080)
- Type some stuff into the textarea.
- Watch it process, the gray texts returned are labeled unimportant. Resize the window to see them disappear
Colin Ihrig's WS Echo Server
Frankie Roberto's Responsive Text Experiment