Skip to content

Instantly share code, notes, and snippets.

View reality's full-sized avatar
🎯
Focusing

ks reality

🎯
Focusing
View GitHub Profile
/*
* Copyright (c) 2005-2006 William Pitcock, et al.
* Rights to this code are as documented in doc/LICENSE.
*
* Sets usercloak metadata on register.
*/
#include "atheme-compat.h"
/* allow us-ascii letters, digits and the following characters */
import java.util.concurrent.*
import java.util.concurrent.atomic.*
import groovyx.gpars.*
import groovy.json.*
import groovyx.gpars.GParsPool
def o = 0
def files = []
new File('/data2/pubmed_xml_baseline/ftp.ncbi.nlm.nih.gov/pubmed/baseline/').eachFile { f -> files << f }
import org.json.*
/**
* Class that provides a static method for querying SNOMED class descendants from BioPortal.
*/
public class SnomedClient {
static String API_ROOT = "https://data.bioontology.org/ontologies/SNOMEDCT/classes/";
static String API_KEY = "";
static String PAGE_SIZE = "500";
obo:MPATH_175
obo:MPATH_188
obo:MPATH_597
obo:MPATH_599
obo:MPATH_604
obo:MPATH_606
obo:OGMS_0000060
obo:OGMS_0000061
obo:OGMS_0000095
obo:UBERON_0000165
obo:RBO_00001000 challenge assay
obo:RBO_00001001 biochemical challenge assay
obo:RBO_00001002 genetic modification challenge
obo:RBO_00001003 immunological challenge
obo:RBO_00001004 infectious agent challenge
obo:RBO_00001005 neutral buffered formalin fixed sample
obo:RBO_00001006 feketes solution fixed specimen
obo:RBO_00001007 bouin's solution fixed specimen
obo:RBO_00001008 radiobiology investigation factor
obo:RBO_00001009 ionising radiation
Orphaned imports: 1105
D009688
APOLLO_SV_00000008
APOLLO_SV_00000796
BFO_0000001
BFO_0000002
BFO_0000003
BFO_0000004
BFO_0000015
BFO_0000016
@reality
reality / lemmatise_some_doccos.groovy
Created January 28, 2020 13:26
some example code to lemmatise a directory of text documents using stanford corenlp
#!/usr/bin/env groovy
@Grab(group='commons-cli', module='commons-cli', version='1.4')
@Grab(group='org.apache.commons', module='commons-lang3', version='3.4')
@Grab(group='edu.stanford.nlp', module='stanford-corenlp', version='3.7.0')
@Grab(group='edu.stanford.nlp', module='stanford-corenlp', version='3.7.0', classifier='models')
@Grab(group='edu.stanford.nlp', module='stanford-parser', version='3.7.0')
import java.util.concurrent.*
import java.util.concurrent.atomic.*
import groovyx.gpars.*
@Grab('com.xlson.groovycsv:groovycsv:1.3')
@Grab(group='org.apache.commons', module='commons-lang3', version='3.4')
@Grab(group='edu.stanford.nlp', module='stanford-corenlp', version='3.7.0')
@Grab(group='edu.stanford.nlp', module='stanford-corenlp', version='3.7.0', classifier='models')
@Grab(group='edu.stanford.nlp', module='stanford-parser', version='3.7.0')
import static com.xlson.groovycsv.CsvParser.parseCsv
import edu.stanford.nlp.pipeline.*
import edu.stanford.nlp.ling.*
import edu.stanford.nlp.semgraph.*
Suggested axiom for c60 fullerene (http://purl.obolibrary.org/obo/CHEBI_33128):
nanoparticle AND (has_component_part SOME fullerene)
<http://purl.bioontology.org/ontology/npo#NPO_707> AND (<http://purl.enanomapper.org/onto/internal/npo-ext.owl#has_component_part> SOME <http://purl.obolibrary.org/obo/CHEBI_33416>)
Evidence:
c60 fullerene.txt:1, c60 fullerene.txt:1, c60 fullerene.txt:1
Suggested axiom for c70 fullerene (http://purl.obolibrary.org/obo/CHEBI_33195):
nanoparticle AND (has_component_part SOME fullerene)
<http://purl.bioontology.org/ontology/npo#NPO_707> AND (<http://purl.enanomapper.org/onto/internal/npo-ext.owl#has_component_part> SOME <http://purl.obolibrary.org/obo/CHEBI_33416>)
Evidence:
IRI Label Synonyms
http://purl.obolibrary.org/obo/NBO_0000001 body part movement stationary movement
http://purl.obolibrary.org/obo/NBO_0000002 whole body movement
http://purl.obolibrary.org/obo/NBO_0000003 emotional behavior affective behaviour, mood
http://purl.obolibrary.org/obo/NBO_0000005 reflexive behavior phenotype pathological reflexive behaviour
http://purl.obolibrary.org/obo/NBO_0000006 learning and/or memory behavior learning and/or memory behaviour
http://purl.obolibrary.org/obo/NBO_0000007 mouth movement mouth part movement, other moved mouth parts
http://purl.obolibrary.org/obo/NBO_0000008 rhythmic behavior
http://purl.obolibrary.org/obo/NBO_0000009 locomotory behavior phenotype pathological locomotory behaviour
http://purl.obolibrary.org/obo/NBO_0000010 reproductive behavior reproductive behaviour, reproduction