Skip to content

Instantly share code, notes, and snippets.

Avatar
🇵🇸
Free Palestine!

Titus wooorm

🇵🇸
Free Palestine!
View GitHub Profile
@wooorm
wooorm / treebankTokenizer.js
Created Jan 19, 2014
Penn Treebank Tokenizer in JavaScript. Based on both the Sed script by Robert McIntyre ([cis.upenn.edu][1]), and the Python port by Edward Loper and Michael Heilman ([nltk.org][2]). [1]: http://www.cis.upenn.edu/~treebank/tokenizer.sed [2]: http://nltk.org/_modules/nltk/tokenize/treebank.html
View treebankTokenizer.js
/**
* Author: Titus Wormer <tituswormer@gmail.com>
* URL: http://wooorm.com/penn-treebank-tokenizer-in-javascript.html
*
* The Treebank tokenizer uses regular expressions to tokenize text as in
* Penn Treebank. This implementation is a based on both the Sed script
* written by Robert McIntyre (available at
* [http://www.cis.upenn.edu/~treebank/tokenizer.sed]), and the Python port
* by Edward Loper and Michael Heilman (available at
* [http://nltk.org/_modules/nltk/tokenize/treebank.html]).
@wooorm
wooorm / dabblet.css
Created Sep 29, 2013
Drop Cap using CSS Page Floats Module
View dabblet.css
p { margin: 0; }
.dropcap::first-letter {
float: left;
font-size: 10rem;
font-family: "Hoefler Text";
font-style: italic;
color: hsl(35, 97%, 54%);
/* Note: exclude-level is not supported anywhere yet. */
-webkit-exclude-level: 0.5;
@wooorm
wooorm / dabblet.css
Last active Dec 24, 2015
Drop Cap using CSS Shapes Module.
View dabblet.css
p { margin: 0; }
.dropcap::first-letter {
float: left;
font-size: 10rem;
font-family: "Hoefler Text";
font-style: italic;
/* Note, only supported in Safari 7 (on iOS, not on Mavericks) and the latest versions of Chrome Canary (behind the flag “Enable experimental Web Platform features”) */
-webkit-shape-outside: polygon(0 0, 80% 0%, 95% 12.5%, 103.5% 25%, 100.5% 37.5%, 85% 50%, 70% 62.5%, 25% 70%, 145% 75%, 160% 87.5%, 150% 93.75%, 110% 100%, 0 100.1%, 0 0);
shape-outside: polygon(0 0, 80% 0%, 95% 12.5%, 103.5% 25%, 100.5% 37.5%, 85% 50%, 70% 62.5%, 25% 70%, 145% 75%, 160% 87.5%, 150% 93.75%, 110% 100%, 0 100.1%, 0 0);
@wooorm
wooorm / dabblet.css
Created Sep 28, 2013
Dropcap: First Letter
View dabblet.css
.dropcap:first-letter {
float: left;
font-size: 3em;
line-height: 1;
margin-right: 0.125em;
}
@wooorm
wooorm / dabblet.css
Created Sep 28, 2013
Dropcap: Span Element
View dabblet.css
.dropcap {
float: left;
font-size: 3em;
line-height: 1;
margin-right: 0.125em;
}
@wooorm
wooorm / dabblet.css
Last active Dec 24, 2015
Dropcap: Image replacement using a background image
View dabblet.css
.dropcap {
background-image: url('http://dailydropcap.com/images/Q-9-cap.png');
float: left;
width: 87px;
height: 89px;
text-indent: 100%;
overflow: hidden;
}
@wooorm
wooorm / dabblet.html
Created Sep 28, 2013 — forked from anonymous/dabblet.html
Dropcap: Image replacement using an inline image.
View dabblet.html
<p><img src="http://dailydropcap.com/images/Q-9-cap.png" title="Daily Drop Cap by Jessica Hische" align="left" alt="Q"/>uisque ut felis sem. Quisque porttitor ante nulla, non pretium ligula ultricies sit amet. Donec commodo massa a felis fermentum, at porta nunc faucibus. Vestibulum sit amet diam aliquam, placerat dui ac, volutpat orci.</p>
<p>Integer euismod porttitor orci id ultrices. Donec fringilla augue eget nunc euismod, ac fermentum eros rhoncus. Aenean interdum pharetra quam, non mattis augue porta nec. Proin eu velit vel est gravida ullamcorper. Sed nec sem eu velit sollicitudin tincidunt non sit amet eros. Donec ut mauris cursus, rhoncus odio ac, vestibulum arcu. Morbi in pellentesque erat, in porttitor nibh. Pellentesque in vehicula elit. Sed tincidunt facilisis arcu, ut lobortis metus ultricies ut. Etiam accumsan feugiat nibh, at suscipit tellus porta id. Donec dapibus suscipit purus auctor pellentesque. Aenean id augue at neque scelerisque sagittis. In sed odio dapibus, ultrices justo quis, conva
@wooorm
wooorm / Gruntfile.coffee
Created Apr 7, 2013
Sample grunt-siml `Gruntfile.coffee`.
View Gruntfile.coffee
# Sample grunt-siml Gruntfile.coffee file
# https://github.com/wooorm/grunt-siml
module.exports = ( grunt ) ->
pkg = grunt.file.readJSON 'package.json'
grunt.config.init
'pkg' : pkg
'siml' :