Past few months, I've been trying several methods of directly predicting a what word belongs in a given syntactic context. For example, if we have:
dog X man with teeth,
then the syntactic context [1] of the X token is:
nsubj(dog)
dobj(man)
//dimScreen() | |
//by Brandon Goldman | |
jQuery.extend({ | |
//dims the screen | |
dimScreen: function(speed, opacity, callback) { | |
//if(jQuery('#__dimScreen').size() > 0) return; | |
if(typeof speed == 'function') { | |
callback = speed; | |
speed = null; |
#!/usr/bin/ruby | |
# example usage: | |
# $ leo büch* | |
# book das Buch - Pl. die Bücher | |
# accounts die Bücher | |
# stock of books der Bücherbestand | |
# bookshelf - pl. bookshelves das Bücherbord - Pl. die Bücherborde | |
# shelf pl.: shelves das Bücherbord | |
# bookshelf - pl. bookshelves das Bücherbrett |
% | |
% TIC-TAC-TOE | |
% | |
% a | b | c | |
% --+---+--- | |
% d | e | f | |
% --+---+--- | |
% g | h | i | |
% |
from __future__ import with_statement | |
# +-----+ | |
# | | | |
# | O | |
# | -|- | |
# | / \ | |
# | | |
# ----- | |
# |
#!/usr/bin/env python | |
import curses, sys, re | |
from time import sleep | |
from random import randint | |
OFFSET_X, OFFSET_Y = 2, 1 | |
BOARD_SIZE = 7 | |
ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
set nocompatible | |
set nohls | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
set nobackup | |
set history=50 " keep 50 lines of command line history | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands | |
set incsearch " do incremental searching |
#!/usr/bin/env python | |
import os, errno, os.path | |
import argparse | |
JOB_TEMPLATE = """ | |
#!/bin/sh | |
#----------------------------------------------------------------------------- | |
#$ -V | |
#$ -cwd |
#!/usr/bin/env python2.7 | |
import argparse | |
import struct | |
import pickle | |
import numpy as np | |
from composes.semantic_space.space import Space | |
from composes.matrix.dense_matrix import DenseMatrix | |
FLOAT_SIZE = 4 |
Input: | |
I don't mean to go all language nerd on you, but I just legit adverbed "legit," verbed "adverb," and adjectived "language nerd." | |
Output: | |
(ROOT | |
(S | |
(S | |
(NP (PRP I)) | |
(VP |