public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, Sequence target, String background) { this (name, dict, input, predicted, target, background, new BIOTokenizationFilter ()); }
public ACRFExtractor (ACRF acrf, Pipe tokPipe, Pipe featurePipe) { this.acrf = acrf; this.tokPipe = tokPipe; this.featurePipe = featurePipe; this.filter = new BIOTokenizationFilter (); }
public ACRFExtractor (ACRF acrf, Pipe tokPipe, Pipe featurePipe) { this.acrf = acrf; this.tokPipe = tokPipe; this.featurePipe = featurePipe; this.filter = new BIOTokenizationFilter (); }
public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, Sequence target, String background) { this (name, dict, input, predicted, target, background, new BIOTokenizationFilter ()); }
public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, String background) { this (name, dict, input, predicted, null, background, new BIOTokenizationFilter ()); }
public ACRFExtractor (ACRF acrf, Pipe tokPipe, Pipe featurePipe) { this.acrf = acrf; this.tokPipe = tokPipe; this.featurePipe = featurePipe; this.filter = new BIOTokenizationFilter (); }
public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, Sequence target, String background) { this (name, dict, input, predicted, target, background, new BIOTokenizationFilter ()); }
public CRFExtractor (CRF crf, Pipe tokpipe) { this (crf, tokpipe, new BIOTokenizationFilter ()); }
public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, String background) { this (name, dict, input, predicted, null, background, new BIOTokenizationFilter ()); }
public DocumentExtraction (String name, LabelAlphabet dict, Tokenization input, Sequence predicted, String background) { this (name, dict, input, predicted, null, background, new BIOTokenizationFilter ()); }
public CRFExtractor (CRF crf, Pipe tokpipe) { this (crf, tokpipe, new BIOTokenizationFilter ()); }
public CRFExtractor (CRF crf, Pipe tokpipe) { this (crf, tokpipe, new BIOTokenizationFilter ()); }
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject (); int version = in.readInt (); if ((version == 0) || (featurePipe == null)) { featurePipe = (Pipe) crf.getInputPipe (); } if (version < 2) { filter = new BIOTokenizationFilter (); } }
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject (); int version = in.readInt (); if ((version == 0) || (featurePipe == null)) { featurePipe = (Pipe) crf.getInputPipe (); } if (version < 2) { filter = new BIOTokenizationFilter (); } }
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject (); int version = in.readInt (); if ((version == 0) || (featurePipe == null)) { featurePipe = (Pipe) crf.getInputPipe (); } if (version < 2) { filter = new BIOTokenizationFilter (); } }
public void testToXmlBIO () { LabelAlphabet dict = new LabelAlphabet (); String document = "the quick brown fox leapt over the lazy dog"; StringTokenization toks = new StringTokenization (document, new CharSequenceLexer ()); Label O = dict.lookupLabel ("O"); Label BANML = dict.lookupLabel ("B-ANIMAL"); Label ANML = dict.lookupLabel ("ANIMAL"); Label BVB = dict.lookupLabel ("B-VERB"); Label VB = dict.lookupLabel ("I-VERB"); LabelSequence tags = new LabelSequence (new Label[] { O, BANML, ANML, BANML, BVB, VB, O, ANML, ANML }); DocumentExtraction extr = new DocumentExtraction ("Test", dict, toks, tags, null, "O", new BIOTokenizationFilter()); String actualXml = extr.toXmlString(); String expectedXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + "<doc>the <ANIMAL>quick brown </ANIMAL><ANIMAL>fox </ANIMAL><VERB>leapt over </VERB>the <ANIMAL>lazy dog</ANIMAL></doc>\r\n"; assertEquals (expectedXml, actualXml); }
public void testToXmlBIO () { LabelAlphabet dict = new LabelAlphabet (); String document = "the quick brown fox leapt over the lazy dog"; StringTokenization toks = new StringTokenization (document, new CharSequenceLexer ()); Label O = dict.lookupLabel ("O"); Label BANML = dict.lookupLabel ("B-ANIMAL"); Label ANML = dict.lookupLabel ("ANIMAL"); Label BVB = dict.lookupLabel ("B-VERB"); Label VB = dict.lookupLabel ("I-VERB"); LabelSequence tags = new LabelSequence (new Label[] { O, BANML, ANML, BANML, BVB, VB, O, ANML, ANML }); DocumentExtraction extr = new DocumentExtraction ("Test", dict, toks, tags, null, "O", new BIOTokenizationFilter()); String actualXml = extr.toXmlString(); String expectedXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + "<doc>the <ANIMAL>quick brown </ANIMAL><ANIMAL>fox </ANIMAL><VERB>leapt over </VERB>the <ANIMAL>lazy dog</ANIMAL></doc>\r\n"; assertEquals (expectedXml, actualXml); }