This file contains 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
from typing import List, TypeVar, Callable | |
import numpy as np | |
T = TypeVar('T') | |
def bootstrap_paired_ttest(results_a: List[T], | |
results_b: List[T], | |
evaluate_func: Callable[[List[T]], float], | |
sample_times: int = 10000, |
This file contains 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
import streamlit as st | |
# To make things easier later, we're also importing numpy and pandas for working with sample data. | |
import numpy | |
import pandas | |
# Don't worry, we'll explain this method in the next section. We need to make at least one | |
# call to Streamlit in order to generate a report. | |
st.title("Demo Test") | |
# streamlit.header("I'm a large heading") | |
# streamlit.subheader("I'm not a large heading") |
This file contains 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 corenlp.process; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import edu.stanford.nlp.ling.CoreLabel; | |
import edu.stanford.nlp.parser.nndep.DependencyParser; |
This file contains 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
//main.java | |
//First of all, after create `GlobalNetworkParam` object. | |
// run the following code: | |
GlobalNetworkParam gnp = new GlobalNetworkParam(optimizer, gnnp); | |
gnp.setStoreFeatureReps(); | |
/************************ | |
After the model has been trained. | |
model.train(...) |
This file contains 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
# | |
# @author: Allan | |
# | |
def convert(input, output): | |
from gensim.models.keyedvectors import KeyedVectors | |
embedding = KeyedVectors.load_word2vec_format(input, binary=True) | |
f= open(output, 'w', encoding='utf-8') |
This file contains 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
require 'nn' | |
require 'dpnn' | |
require 'rnn' | |
require 'nngraph' | |
local opt = { | |
n_seq = 3, | |
d_hid = 4, | |
d_mem = 20, | |
n_batch = 2, |
This file contains 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.statnlp.example.nerelation.struct; | |
import org.statnlp.commons.types.Sentence; | |
import gnu.trove.list.TIntList; | |
import gnu.trove.list.array.TIntArrayList; | |
import gnu.trove.map.TIntObjectMap; | |
import gnu.trove.map.hash.TIntObjectHashMap; | |
import gnu.trove.stack.TIntStack; |
NewerOlder