Skip to content

Instantly share code, notes, and snippets.

View myedibleenso's full-sized avatar

Gus Hahn-Powell myedibleenso

View GitHub Profile
@myedibleenso
myedibleenso / input-template.tsv
Created October 13, 2016 22:31
A template for produce the tab-delimited input format read by Reach
PMCID SECTION NAME TEXT

Keybase proof

I hereby claim:

  • I am myedibleenso on github.
  • I am ghp (https://keybase.io/ghp) on keybase.
  • I have a public key whose fingerprint is 384E 08B3 A64C F9EB D898 EF72 87D0 46FF EF5F 4EBE

To claim this, I am signing this object:

@myedibleenso
myedibleenso / nxmlReaderTests.scala
Created September 16, 2017 18:14
Snippet to test nxmlreader on a subset of PubMed OA
import java.io.File
import scala.util.Random
import ai.lum.common.FileUtils._
import ai.lum.common.RandomUtils._
import ai.lum.nxmlreader.NxmlReader
val rand = new Random(42)
val nxmlDir = new File("/net/kate/storage/data/nlp/corpora/bmgf/OA-100K-sample/data/nlp/corpora/pmc_openaccess/pmc_aug2016/")
val nxmlFiles = nxmlDir.listFilesByWildcard("*.nxml", recursive = true)
import org.clulab.processors.fastnlp.FastNLPProcessor
import org.clulab.processors.Document
import org.clulab.struct.Interval
import org.clulab.odin._
import org.clulab.odin.serialization.json.{JSONSerializer => OdinJSONSerializer, _}
import org.clulab.serialization.json._
import java.io.File
/** Example demonstrating how to serialize/deserialize