Skip to content

Instantly share code, notes, and snippets.

View nschneid's full-sized avatar

Nathan Schneider nschneid

View GitHub Profile
@nschneid
nschneid / BibTeX_nschneid_longform.js
Last active May 11, 2019 23:31
Custom BibTeX exporters for Zotero
{
"translatorID": "8a68255b-24e5-47e0-afe5-f65fff578170",
"translatorType": 3,
"label": "BibTeX (nschneid, long form)",
"creator": "Simon Kornblith and Richard Karnesky and Nathan Schneider",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": null,
"priority": 200,
"inRepository": true,
@nschneid
nschneid / supersenseDefaults.py
Created February 26, 2014 21:56
Script used to load Arabic supersense lexicons (from Arabic WordNet and OntoNotes) and list the possible matches for each token of an input text. One of the imports depends on code in https://github.com/nschneid/pyutil.
#coding=UTF-8
'''
to run the code:
METHOD 1: .stem_pos files
$ export PYTHONPATH=/path/to/AQMAR
$ python2.7 supersenseDefaults.py [mode] ar.stem_pos > ar.lexiconsst
METHOD 2: parallel .tok and .wd_pos_ne.txt files
@nschneid
nschneid / POSMappings.txt
Created September 7, 2013 15:50
Scripts for working with part-of-speech tagsets: describing the morphosyntactic attributes encoded by tags, and converting between different tagsets. Cf. https://gist.github.com/nschneid/4231292
# http://nlp.cs.nyu.edu/wiki/corpuswg/AnnotationCompatibilityReport
# Table 1: Part of Speech Compatibility
# (Initial Version from Manning and Schutz 1998, pp. 141-142)
# Extended to cover Claws1 and ICE
# cf. http://www.scs.leeds.ac.uk/ccalas/tagsets/brown.html
# Nathan Schneider, 2011-02-19:
# * Fixed some errors in brown column, e.g.: DT1 => DTI, PP0 => PPO, NRS => NPS
# * Added last column (Twitter tagset) and several special tags at the end
Category Examples Claws c5, Claws1 Brown PTB ICE Twitter
Adjective happy, bad AJ0 JJ JJ ADJ.ge A
@nschneid
nschneid / deverbals-from-nombank-examples.txt
Created June 25, 2012 22:44
List deverbal nominalizations in NomBank
abandonment.01 verb-abandon.01 -
abatement.01 verb-abate.01 -
abduction.01 verb-abduct.01 -
abolition.01 verb-abolish.01 -
abomination.01 verb-abominate.01 ARG1
abortion.01 verb-abort.01 -
absence.01 verb-absent.01 -
absorber.01 verb-absorb.01 ARG0
absorption.01 verb-absorb.01 -
abuse.01 verb-abuse.01 -
@nschneid
nschneid / zotselect-link.js
Last active January 15, 2024 02:56
Zotero export translator that generates a zotero://select link to an item in the Zotero library. (First a simple version, as well as a version that displays minimal citation information and stores further details as title text.)