Textractor API textractor-720 (20091120123250)

textractor.didyoumean
Class DidYouMeanDocumentFactory

java.lang.Object
  extended by it.unimi.dsi.mg4j.document.AbstractDocumentFactory
      extended by it.unimi.dsi.mg4j.document.PropertyBasedDocumentFactory
          extended by textractor.didyoumean.DidYouMeanDocumentFactory
All Implemented Interfaces:
DocumentFactory, FlyweightPrototype<DocumentFactory>, Serializable

public final class DidYouMeanDocumentFactory
extends PropertyBasedDocumentFactory

User: campagne Date: Nov 8, 2005 Time: 3:11:43 PM

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.mg4j.document.PropertyBasedDocumentFactory
PropertyBasedDocumentFactory.MetadataKeys
 
Nested classes/interfaces inherited from interface it.unimi.dsi.mg4j.document.DocumentFactory
DocumentFactory.FieldType
 
Field Summary
static int FOUR_END
           
static int FOUR_START
           
static int GRAM2
           
static int GRAM3
           
static int GRAM4
           
static int THREE_END
           
static int THREE_START
           
static int WORD
           
 
Fields inherited from class it.unimi.dsi.mg4j.document.PropertyBasedDocumentFactory
defaultMetadata
 
Constructor Summary
DidYouMeanDocumentFactory()
           
 
Method Summary
 DocumentFactory copy()
           
 int fieldIndex(String fieldName)
          Returns the index of a field, given its symbolic name.
 String fieldName(int field)
          Returns the symbolic name of a field.
 DocumentFactory.FieldType fieldType(int field)
           
 Document getDocument(InputStream rawContent, Reference2ObjectMap<Enum<?>,Object> metadata)
           
 int numberOfFields()
          Returns the number of fields present in the documents produced by this factory.
 
Methods inherited from class it.unimi.dsi.mg4j.document.PropertyBasedDocumentFactory
ensureJustOne, getInstance, getInstance, getInstance, getInstance, parseProperties, parseProperties, parseProperty, resolve, resolve, resolveNotNull, sameKey
 
Methods inherited from class it.unimi.dsi.mg4j.document.AbstractDocumentFactory
ensureFieldIndex, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WORD

public static final int WORD
See Also:
Constant Field Values

GRAM3

public static final int GRAM3
See Also:
Constant Field Values

GRAM4

public static final int GRAM4
See Also:
Constant Field Values

THREE_START

public static final int THREE_START
See Also:
Constant Field Values

THREE_END

public static final int THREE_END
See Also:
Constant Field Values

FOUR_START

public static final int FOUR_START
See Also:
Constant Field Values

FOUR_END

public static final int FOUR_END
See Also:
Constant Field Values

GRAM2

public static final int GRAM2
See Also:
Constant Field Values
Constructor Detail

DidYouMeanDocumentFactory

public DidYouMeanDocumentFactory()
Method Detail

numberOfFields

public int numberOfFields()
Returns the number of fields present in the documents produced by this factory.

Returns:
the number of fields present in the documents produced by this factory.

fieldName

public String fieldName(int field)
Returns the symbolic name of a field.

Parameters:
field - the index of a field (between 0 inclusive and numberOfFields() exclusive}).
Returns:
the symbolic name of the field-th field.

fieldIndex

public int fieldIndex(String fieldName)
Returns the index of a field, given its symbolic name.

Parameters:
fieldName - the name of a field of this factory.
Returns:
the corresponding index, or -1 if there is no field with name fieldName.

fieldType

public DocumentFactory.FieldType fieldType(int field)

copy

public DocumentFactory copy()

getDocument

public Document getDocument(InputStream rawContent,
                            Reference2ObjectMap<Enum<?>,Object> metadata)

Textractor API textractor-720 (20091120123250)

Copyright © 2003-2008 Institute for Computational Biomedicine, All Rights Reserved.