Skip to content
responsive text with Natural Language Processing
JavaScript CSS
Find file
Latest commit 780e509 Nov 28, 2013 @josephyzhou Update README.md
Failed to load latest commit information.
client
screenshots init commit Dec 12, 2012
server del Jul 1, 2013
.gitignore gitignore Jul 1, 2013
LICENSE.txt init commit Dec 12, 2012
README.md Update README.md Nov 28, 2013

README.md

RT

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!

ScreenShot

Uses

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

or

npm install natural

npm install websocket

Then

node ws_server.js

Client

  • 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

Credits

Chrisumbel's Natural

Colin Ihrig's WS Echo Server

Frankie Roberto's Responsive Text Experiment

Something went wrong with that request. Please try again.