Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.conf;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import com.google.common.base.Predicate;
import edu.washington.cs.knowitall.extractor.conf.featureset... | 1,569 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.conf;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extractio... | 529 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.conf;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/***
* Extends the <code>ChunkedBinaryExtrac... | 651 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import opennlp.tools.sentdetect.SentenceDetector;
import edu.washingto... | 775 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import edu.washington.cs.knowitall.extractor.mapper.Mapper;
import edu.washington.cs.knowitall.extractor.mapper.MapperList;
/**
* <p>
* An abstract class that defines the basic behavior of an extractor. An
* {@code Extractor<S,T>} object extracts objects of type {@co... | 954 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.io.IOException;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* A list of mappers for <code>ReVerbExtractor</code>'s relations.
*
* @author afader
*
*/
public clas... | 1,008 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.ArrayList;
/**
* A mapper class that returns the first maximal element in the object stream according
* to a function <code>doValueMap(T object)</code>.
* @author afader
*
* @param <S> a comparable type returned by <code>doValueMap(T object)... | 281 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
/**
*
* Converts some characters from unicode to ascii (s... | 490 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A mapper used to filter sentences by number of words.
* @author afader
*
*/
public class SentenceLengthFilter extends FilterMapper<String> {
private int minWords = 0;
private int ma... | 414 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.HashSet;
import java.util.Set;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* A mapper that filters out any extractions containing a token or POS tag from a given set.
* @author afader
*
*/
public class StopListFil... | 599 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.regex.Pattern;
/**
*
* @author schmmd
*
*/
public class JunkRemover extends IndependentMapper... | 453 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
/***
* Used to filter out arguments that are pronouns.
*
* @author afader
*
*/
public class PronounArgumentFilter extends
FilterMapper<ChunkedArgumentExtraction> {
publi... | 133 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.regex.Pattern;
/**
* Removes square brackets, curly braces, parentheses, and the contained text,
* from strings.
*
* @auth... | 494 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* An argument filter that filters out any arguments match... | 403 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
/**
* A type of mapper that filters each object in the stream independently. Subclasses
* extending this class only have to implement the <code>doFilter(T object)</code> method,... | 280 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
import edu.washington.cs.knowitall.commonlib.Re... | 868 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
/**
* A mapper used to filter binary extractions by number of characters.
*
* @author schmmd
*
*/
public class ChunkedBinaryExtractionStringLengthFilter extends
FilterMapper<Ch... | 382 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.HashSet;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washington.cs.knowitall.normalization.NormalizedField;
import edu.washington.cs.knowitall.normalization.VerbalRelationNormalizer;
/***
* A class used to fil... | 318 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.google.common.collect.Iterables;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowi... | 556 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
/**
* A mapper used to filter binary extractions by number of words.
*
* @author schmmd
*
*/
public class ChunkedBinaryExtractionWordCountFilter extends
FilterMapper<ChunkedBin... | 370 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.ArrayList;
import java.util.List;
/**
* A list of <code>Mapper<T></code> objects. Applies each mapper in the list to an input
* stream of <code>T</code> objects in order.
* @author afader
*
* @param <T>
*/
public class MapperList<T> extends ... | 368 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.lang.Math;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* A mapper object for <code>NpChunkArgumentExtraction</code> objects that
* returns the ... | 218 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
/**
* A list of mappers for <code>ReVerbExtractor</code>'s second arguments.
*
* @author afader
*
*/
public class ReVerbArgument1Mappers extends
MapperList<ChunkedArgumentExt... | 575 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* A filter that returns only arguments that are adjacent to t... | 185 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.regex.Pattern;
/**
* Filters out sentences that do not start with a capital letter or number (ignoring single quotes, double
* quotes, and whitespace).
* @author afader
*
*/
public class SentenceStartFilter extends FilterMapper<String> {
... | 119 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
/**
* A class for taking a stream of <code>T</code> objects and modifying it
* somehow (e.g. by filtering or modifying some objects). A <code>Mapper</code>
* object has two states: enabled and disabled. If the <code>Mapper</code> is
* disabled, it will return t... | 352 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
/**
* A list of mappers for <code>ReVerbExtractor</code>'s first arguments.
*
* @author afader
*
*/
public class ReVerbArgument2Mappers extends
MapperList<ChunkedArgumentExtr... | 370 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
/**
* A type of mapper that operates on each object in a stream independently. Subclasses
* extending this class only have to implement the <code>doMap(T object)</code> method,
... | 228 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class OrdinalPreprocessor extends IndependentMapper<String> {
private static final Pattern pattern = Pattern.compile("(nd|rd|th)-(most|least)");
@Override
public String doMap(Stri... | 96 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor.mapper;
import java.util.regex.Pattern;
/**
* Filters out sentences that do not end with a period, question mark, or
* exclamation point, ignoring double quotes, single quotes, and whitespace at
* the end.
*
* @author afader
*
*/
public class SentenceEndFilter exte... | 125 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import com.google.common.collect.Iterables;
/**
* A class used to represent the composition of two <code>Extractor</code> objects.
* @author afader
*
* @param <R>
* @param <S>
* @param <T>
*/
public class E... | 266 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washington.cs.knowitall.se... | 522 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import edu.washington.cs.knowitall.nlp.NlpException;
/**
* An exception class for errors related to {@link Extractor}.
*
* @author afader
*
*/
public class ExtractorException extends NlpException {
/**
*
*/
private static final long serialVersionUID = 1... | 129 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import edu.washington.cs.knowitall.argumentidentifier.ArgLearner;
import edu.washington.cs.knowitall.argumentidentifier.ConfidenceMetric;
import edu.washington.cs.knowitall.nlp.Ch... | 682 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import edu.washington.cs.knowitall.util.DefaultObjects;
import opennlp.tools.sentdetect.SentenceDetector;
/**
* An <code>Extractor</code> object that extracts <code>String</code> sentenc... | 377 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.SpanExtraction;
import edu.washin... | 371 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import com.google.common.base.Joiner;
import edu.washington.cs.knowitall.extractor.conf.ConfidenceFunction;
import edu.washington.cs.knowitall.extractor.conf.ReVerbOpenNlpConfFun... | 864 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import com.google.common.collect.Iterables;
import edu.washington.cs.knowitall.extractor.mapper.ReVerbRelationDictionaryFilter;
import edu.washington.cs.knowitall.extractor.mapper.ReVer... | 1,570 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
import... | 1,112 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/***
* Takes the union of the output of multiple extractors. The output of this
* extractor is the output of the others concatenated together.
*
* @author afader
*
* @param <S>
* @para... | 451 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.extractor;
import java.util.ArrayList;
import java.util.Collection;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.know... | 1,011 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import java.util.List;
import com.google.common.base.Joiner;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washington.cs.knowitall.nlp.extraction.SpanExtraction;
import edu.was... | 696 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import java.util.ArrayList;
import java.util.HashSet;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* Normalizes {@link ChunkedExtraction} arguments by
* <ul>
* <li>Lowercasing</li>
* <li>Removing punctuation</li>
* <li>Replacing numb... | 351 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* An interface defining the basic functionality of a field normalizer. A field
* normalizer is a function that takes a {@link ChunkedExtraction} object and
* returns a {@link NormalizedField}... | 145 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/***
* A class for normalizing {@link ChunkedBinaryExtraction} objects. This class
* uses {@link ArgumentNormalizer} to n... | 418 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import uk.ac.susx.informatics.Morpha;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* A field normalizer that applies the stemmer to every token and strips
* n... | 396 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
// package ac.biu.nlp.graph.untyped.preprocessing.rep;
import java.util.Scanner;
/**
* Represents a Reverb predicate that contains (1) the original predicate from
* the text (2) normalized version (3) POS sequence (modified by Michael
* Schmitz)
*
*... | 2,512 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washington.cs.knowitall.sequence.SequenceException;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import uk.ac.susx.informatics.Morpha;
/**
* Created by IntelliJ ID... | 790 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import uk.ac.susx.informatics.Morpha;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washi... | 1,271 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import uk.ac.susx.informatics.Morpha;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
import edu.washington.cs.knowitall.sequence.SequenceException;
/***
* A normalizer function... | 658 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.normalization;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction;
/***
* Represents a {@link ChunkedBinaryExtraction} that has normalized versions of
* arg1, rel, arg2.
*
* @author afader
*
*/
public class NormalizedBinaryExtraction extends ChunkedBi... | 343 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
public class Adjace... | 463 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.util.Iterator;
public class IterableAdapter<T> implements Iterable<T> {
private Iterator<T> iter;
public IterableAdapter(Iterator<T> iter) {
this.iter = iter;
}
@Override
public Iterator<T> iterator() {
return iter;
}
}
| 72 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.util.Collection;
import java.util.List;
import java.util.Map;
public interface ExtractionGrouper<T> {
public Map<Integer, List<T>> groupExtractions(Collection<T> extractions);
}
| 54 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.Iterator;
public class WarcPage {
private String WARC_Target_URI;
private String WARC_TREC_ID;
private StringBuilder lines;
private final long serialNumber... | 461 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import opennlp.tools.chunker.Chunker;
import opennlp.tools.chunker.ChunkerME;
import opennlp.tools.chunker.ChunkerModel;
import opennlp.tools.postag.POSModel;
import opennlp.tools.postag.POSTagger;... | 1,018 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.util.Iterator;
import com.google.common.collect.AbstractIterator;
public abstract class AbstractNestedIterator<S, T> extends AbstractIterator<T> {
private final Iterator<S> outer;
private Iterator<T> inner;
protected abstract Iterator<T> computeInne... | 198 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.LinkedList;
import java.util.Queue;
import org.apache.commons.cli.CommandLine;
im... | 3,120 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Iterator;
public class WarcReader implements Iterable<WarcPage> {
private final BufferedReader in;
protected long serialNumber;
... | 472 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class ArrayIterator<T> implements Iterator<T> {
private final T[] array;
private int nextPos;
private final int upperBound;
public ArrayIterator(T[] array) {
this.array = arra... | 236 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.util;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringEscapeUtils;
public class HtmlUtils {
private static HashSet<Pattern> removePattern... | 722 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.StringReader;
import java.util.List;
import java.util.regex.Pattern;
import cc.mallet.fst.CRF;
import cc.mallet.fst.confidence.ViterbiConfidenceEst... | 1,519 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
public class Pair<F, S> {
private F first;
private S second;
public Pair(F first, S second) {
this.first = first;
this.second = second;
}
public F getFirst() {
return first;
}
public S getSecond() {
r... | 81 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import java.util.regex.Pattern;
import edu.washington.cs.knowitall.argumentidentifier.ArgLearner.Mode;
import edu.washington.cs.knowi... | 5,643 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.extractor.Extractor;
import edu.washington.cs.knowitall.extractor.ExtractorException;
impo... | 1,865 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
public class ExtractionParameters {
public static final boolean NEG_TRAINING = false;
public static final boolean ALL_VNCLS = false;
public static boolean USE_VLCN_FEATURES = false;
public static boolean USE_ENTITY_FEATURES = true;
public stat... | 334 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import edu.washington.cs.knowitall.regex.Match;
import edu.washington.cs.knowitall.regex.RegularExpression;
import edu.washington.cs... | 11,107 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.util.Vector;
import java.util.Iterator;
public class PositionInstance {
private boolean isMidInstance;
private boolean isRelInstance;
private int i;
private Vector<String> features;
public PositionInstance(int i) {
this.... | 362 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.util.ArrayList;
import java.util.List;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.extractor.conf.featureset.FeatureSet;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
import edu.washington.cs.knowi... | 3,802 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import edu.washington.cs.knowitall.extractor.conf.ConfidenceFunction;
import edu.washington.cs.knowitall.extractor.conf.ConfidenceFunctionException;
... | 360 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.util.List;
import edu.washington.cs.knowitall.extractor.conf.classifier.DoubleFeatures;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedArgumentExtraction;
import edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction;
/**
* Generate... | 1,177 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.argumentidentifier;
import java.io.IOException;
import java.net.URL;
import edu.washington.cs.knowitall.argumentidentifier.ArgLearner.Mode;
import edu.washington.cs.knowitall.extractor.conf.classifier.DecisionTree;
import edu.washington.cs.knowitall.extractor.conf.classifier.Double... | 796 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.examples;
/* For representing a sentence that is annotated with pos tags and np chunks.*/
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
/* String -> ChunkedSentence */
import edu.washington.cs.knowitall.nlp.OpenNlpSentenceChunker;
/* The class that is responsible for ext... | 472 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import edu.washington.cs.knowitall.commonli... | 1,670 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.ArrayList;
import java.util.List;
import edu.washington.cs.knowitall.commonlib.Range;
/**
* A class of static methods for handling OpenNLP formats.
*
* @author afader
*
*/
public class OpenNlpUtils {
public static final String START_CHUNK = "B-";
... | 1,238 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp.extraction;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.ImmutableList;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.Chunk... | 2,934 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp.extraction;
import java.util.ArrayList;
import java.util.Collection;
import com.google.common.collect.Iterables;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
/***
* Represents a binary extraction from a {@link Ch... | 1,396 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp.extraction;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
/**
* A class representing a noun phrase argument of a relation.
*
* @author afader
*
*/
public class ChunkedArgumentExtraction extends ChunkedExtraction... | 355 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp.extraction;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.nlp.ChunkedSentence;
/**
* An extraction object that represents a contiguous subsequence of a
* {@link ChunkedSentence} object.
*
* @author afader
*
*/
public class ChunkedE... | 902 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
public class OpenNlpSentenceChunkerStats {
protected long totalTime;
protected long tokenizeTime;
protected long tagTime;
protected long chunkTime;
public OpenNlpSentenceChunkerStats(long totalTime, long tokenizeTime,
long tagTime, long chunkTim... | 230 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.IOException;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import edu.washington.cs.knowitall.logic.ArgFactory;
import edu.washington.cs.knowitall.logic.LogicExpression;
import edu.washington.cs.knowitall.logic.Express... | 1,160 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.Iterator;
import java.util.List;
import com.google.common.collect.ImmutableList;
/***
* Represents an ordered collection of {@link ChunkedSentence} objects with an
* identifier string.
*
* @author afader
*
*/
public class ChunkedDocument implements Iter... | 250 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.text.ParseException;
import java.util.ArrayList;
import edu.washington.cs.knowitall.sequence.SequenceException;
/**
* <p>
* A utility class for "parsing" the output of the OpenNLP command line chunker.
* The command line chunker returns strings in this form:
*... | 1,065 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.List;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList;
import edu.washington.cs.knowitall.commonlib.Range;
import edu.washington.cs.knowitall.sequence.BIOLayeredSequenc... | 3,202 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.BufferedReader;
import java.io.IOException;
import java.text.ParseException;
import java.util.Iterator;
import com.google.common.collect.AbstractIterator;
/***
* A class for reading in sentences that have already been chunked by the
* OpenNLP sentence chunker... | 244 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
public interface SentenceChunker {
public ChunkedSentence chunkSentence(String sent) throws ChunkerException;
}
| 34 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
/**
* An exception class used for handling errors related to layered sequences.
*
* @author afader
*
*/
public class NlpException extends RuntimeException {
private static final long serialVersionUID = 1L;
public NlpException(Exception cause) {
super(caus... | 106 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
public class OpenNlpSentenceChunkerAverageStats extends
OpenNlpSentenceChunkerStats {
private int count;
public OpenNlpSentenceChunkerAverageStats() {
super(0, 0, 0, 0);
count = 0;
}
public void add(OpenNlpSentenceChunkerStats stats) {
... | 242 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import edu.washington.cs.knowitall.commonlib.Range;
/***
* A representation of a token in a ChunkedSentence.
... | 878 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.ArrayList;
import java.util.Iterator;
import com.google.common.collect.AbstractIterator;
import edu.washington.cs.knowitall.extractor.ExtractorException;
import edu.washington.cs.knowitall.extractor.SentenceExtractor;
public class SentenceBlocksIterator exte... | 320 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.google.common.base.Predicate;
import com.google.common.collect.AbstractIterator;
/**
* A class that combines an Iterator<String> object over sentences with a
* SentenceChunker object to... | 457 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.IOException;
import java.util.ArrayList;
import java.util.regex.Pattern;
import opennlp.tools.chunker.Chunker;
import opennlp.tools.postag.POSTagger;
import opennlp.tools.tokenize.Tokenizer;
import opennlp.tools.util.Span;
import edu.washington.cs.knowitall.comm... | 967 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.IOException;
import java.io.Reader;
import com.google.common.base.Predicate;
import edu.washington.cs.knowitall.extractor.SentenceExtractor;
import edu.washington.cs.knowitall.io.BufferedReaderIterator;
import edu.washington.cs.knowitall.io.TextBlockIterator;
i... | 1,012 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
/**
* An exception class used for handling errors related to layered sequences.
*
* @author afader
*
*/
public class ChunkerException extends NlpException {
private static final long serialVersionUID = 1L;
public ChunkerException(Exception cause) {
super(... | 108 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.nlp;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.util.ArrayList;
import com.google.common.collect.Iterables;
import edu.washington.cs.knowita... | 1,199 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.sequence;
import java.util.regex.Matcher;
public class LayeredTokenMatcher {
private Matcher m;
protected LayeredTokenMatcher(Matcher m) {
this.m = m;
}
public int end() {
return m.end();
}
public int end(int group) {
return m.end(... | 176 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.sequence;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.base.Joiner;
/**
* <p>
* A class ... | 2,303 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.sequence;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.google.common.base.Joiner;
import com.google.common.collect.Sets;
/**
* <p>
* This class represents a table mapping tuples of strings... | 2,351 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.sequence;
import java.util.Collection;
/***
* Represents a layered sequence of strings. An example of a layered sequence is
* a POS-tagged sentence, which has a word layer, and a POS tag layer.
*
* This interface defines the basic functionality expected from a layered
* seque... | 283 |
github-java-corpus | 2,012 | package edu.washington.cs.knowitall.sequence;
import java.util.Arrays;
import com.google.common.base.Joiner;
/**
* A class that wraps a String array so it can be used as the key in a
* {@link java.util.HashSet} object.
*
* @author afader
*
*/
public class StringArrayWrapper {
private String[] data;
... | 316 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.