This file contains hidden or 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 OR REPLACE FUNCTION clear_count_1(sid int) RETURNS int AS | |
$$ | |
if '__count_1' in SD: | |
SD['__count_1'] = -1 | |
return 1 | |
return 0 | |
$$ LANGUAGE plpythonu; | |
CREATE OR REPLACE FUNCTION updateid(startid bigint, sid int, sids int[], base_ids bigint[], base_ids_noagg bigint[]) RETURNS bigint AS |
This file contains hidden or 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 relation_extraction_evaluation AS | |
SELECT | |
t3.text AS entity_name, | |
t5.type AS entity_type, | |
t0.rel AS relation, | |
t4.text AS slot_value_name, | |
t7.type AS slot_value_type, | |
t3.fid AS entity_id, | |
t5.doc_id AS doc_id, | |
t6.sentence_index AS sentence_index, |
This file contains hidden or 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
package org.deepdive.inference | |
import java.io.{File, PrintWriter} | |
import org.deepdive.calibration._ | |
import org.deepdive.datastore.JdbcDataStore | |
import org.deepdive.Logging | |
import org.deepdive.settings._ | |
import scalikejdbc._ | |
import scala.util.matching._ | |
import scala.io.Source |
This file contains hidden or 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
deepdive_kbp_msushkov_large=# select t1.text, t2.text, t0.rel from kb t0, entities t1, entities t2 where t0.eid1=t1.fid and t0.eid2=t2.fid and t0.rel='per:spouse' limit 1; |
This file contains hidden or 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 | |
# File: udf/ext_has_spouse_features.py | |
import sys, json | |
# For each input tuple | |
# TODO: Sample Data and the input schema. | |
# sample json | |
for row in sys.stdin: | |
obj = json.loads(row) |
This file contains hidden or 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
### PharmGKB - MENTION | |
def extract(self, doc): | |
#log(doc.docid) | |
for sent in doc.sents: | |
genes = [] |
This file contains hidden or 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
#ifndef _DW_H | |
#define _DW_H | |
#include "common.h" | |
#include "engine/dstruct.h" | |
#include "engine/scheduler.h" | |
#include "engine/scheduler_strawman.h" | |
#include "engine/scheduler_hogwild.h" |
This file contains hidden or 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
#ifndef _DSTRUCT_H | |
#define _DSTRUCT_H | |
#include "common.h" | |
template<class A, SparsityType SPARSITY> | |
class Array{ | |
}; |
This file contains hidden or 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
enum SparsityType{ | |
DW_SPARSE, | |
DW_DENSE | |
}; | |
enum ScheduleType{ | |
SCHED_STRAWMAN, | |
SCHED_HOGWILD, | |
SCHED_PERCORE, | |
SCHED_PERNODE |
This file contains hidden or 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
#include "common.h" | |
#include "engine/dstruct.h" | |
#include "engine/scheduler.h" | |
//#include "engine/scheduler_strawman.h" | |
//#include "engine/scheduler_hogwild.h" | |
//#include "engine/scheduler_percore.h" | |
// | |
#include "app/glm.h" |
OlderNewer