Skip to content

Instantly share code, notes, and snippets.

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
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,
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
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;
#! /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)
### PharmGKB - MENTION
def extract(self, doc):
#log(doc.docid)
for sent in doc.sents:
genes = []
#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"
#ifndef _DSTRUCT_H
#define _DSTRUCT_H
#include "common.h"
template<class A, SparsityType SPARSITY>
class Array{
};
enum SparsityType{
DW_SPARSE,
DW_DENSE
};
enum ScheduleType{
SCHED_STRAWMAN,
SCHED_HOGWILD,
SCHED_PERCORE,
SCHED_PERNODE
#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"