This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
taxonomy: | |
- Entity: | |
- Noun | |
- Adjective | |
- NounPhrase | |
- Patterns: | |
- KindOfPattern | |
- PartOfPattern | |
- Event: | |
- KindOf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// requires processors library: https://github.com/clulab/processors/blob/master/README.md | |
import edu.arizona.sista.odin._ | |
import edu.arizona.sista.processors.fastnlp.FastNLPProcessor | |
val proc = new FastNLPProcessor | |
// a couple of simple examples to test the rules against. | |
val text = "a tiger is a kind of big cat. an eye is a part of a tiger." | |
val doc = proc annotate text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// save to project/Build.scala | |
import sbt.{Build, Project, ProjectRef, uri} | |
object MyBuild extends Build { | |
lazy val root = Project("root", sbt.file(".")).dependsOn(procAgiga) | |
lazy val procAgiga = ProjectRef(uri("git://github.com/myedibleenso/processors-agiga.git#master"), "processors-agiga") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A simple implementation of a greedy transition-based parser. Released under BSD license.""" | |
from os import path | |
import os | |
import sys | |
from collections import defaultdict | |
import random | |
import time | |
import pickle | |
SHIFT = 0; RIGHT = 1; LEFT = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This defines how our entities and events are related to one another semantically | |
taxonomy: | |
- ExpandedEntity: | |
- Entity: | |
- Nominal: | |
- Noun | |
- PossiblePerson: | |
- Person | |
- Organization | |
- Location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NE rules | |
- name: "ner-person" | |
label: [Person, PossiblePerson, Entity] | |
priority: 1 | |
type: token | |
pattern: | | |
[entity="PERSON"]+ | |
| | |
[tag=/^N/]* [tag=/^N/ & outgoing="cop"] [tag=/^N/]* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -* | |
try: | |
# python 3.X | |
from urllib.request import urlopen, urlretrieve | |
except: | |
# python 2.7 | |
from urllib2 import urlopen | |
from urllib import urlretrieve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.clulab.reach.PaperReader | |
import org.clulab.reach.mentions._ | |
import org.clulab.reach.serialization.json._ | |
import java.io.File | |
/** Example demonstrating how to serialize/deserialize | |
* [[org.clulab.reach.mentions.CorefMention]] to/from json | |
*/ | |
object ReachJSONExample extends App { |
OlderNewer