public class Ace extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
entityTrace |
static edu.nyu.jet.aceJet.RelationPatternSet |
eve |
static Gazetteer |
gazetteer |
static boolean |
monocase
if true, case information is not considered significant
(for finding names or sentence boundaries).
|
static boolean |
perfectEntities |
static boolean |
perfectMentions |
static boolean |
preferEntities |
static boolean |
preferRelations |
static boolean |
useParser |
| Constructor and Description |
|---|
Ace() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allLowerCase(Document doc) |
static boolean |
allLowerCase(Document doc,
Span span)
return true if either all the letters in span are
lower case, or the fraction of letters which are upper case
exceeds MAX_UPPER.
|
static void |
buildAceEntities(Document doc,
String docId,
AceDocument aceDoc)
create ACE entities from entity annotations produced by refres.
|
static String |
getDocId(Document doc)
returns the document ID of Document
doc, if found,
else returns null. |
static void |
init(String propertyFile)
initialize ACE: read property file and load all resources specified
by the properties file.
|
static void |
initForFileIO(String[] args)
'initForFileIO' provides the initialization component of the 'main' method.
|
static void |
main(String[] args)
generate ACE annotation files (in APF) format for a list of documents.
|
static AceDocument |
processDocument(Document doc,
String sourceId,
String sourceFile,
String docPathBase)
process a (Jet) document and create a corresponding AceDocument.
|
static void |
processFile(String currentDocPath)
process a file containing a source document and generate an Ace APF file.
|
static void |
processFileAndCatchError(String currentDocPath)
process a single document to generate an Ace APF file, catching
any exceptions which occur.
|
static void |
setPatternSet(String fileName) |
static void |
tagReciprocalRelations(Document doc)
assigns reciprocal relations subject-1 and object-1
|
static boolean |
titleCase(Document doc,
Span span)
returns true if Span
span of Document doc
appears to be capitalized as a title: if there are no words
beginning with a lower-case letter except for a small list of
function words (articles, possessive pronouns, prepositions, ...). |
public static boolean useParser
public static boolean perfectMentions
public static boolean perfectEntities
public static boolean preferRelations
public static boolean preferEntities
public static boolean entityTrace
public static boolean monocase
public static Gazetteer gazetteer
public static edu.nyu.jet.aceJet.RelationPatternSet eve
public static void main(String[] args) throws IOException
IOExceptionpublic static void initForFileIO(String[] args) throws IOException
IOExceptionpublic static void init(String propertyFile) throws IOException
IOExceptionpublic static void processFileAndCatchError(String currentDocPath) throws IOException
IOExceptionpublic static void processFile(String currentDocPath) throws IOException
currentDocPath - The full path of the file containing the source documentIOExceptionpublic static AceDocument processDocument(Document doc, String sourceId, String sourceFile, String docPathBase) throws IOException
doc - The (Jet) source documentsourceId - The source document id; typically the 'sourceFile',
but without any file extension. If no DOCID
is specified within the document text) as the
base for the names of all entities, relations, events, etc.sourceFile - The name of the source document. This is used to fill
the source file field of the AceDocument. If 'doc'
is read from a file, should be the file name,
including extension, but not including directory path.docPathBase - The full path to the source document, with the file
extension removed; used to access corresponding parse
and GLARF files. Should be null if these files are not
being usedIOExceptionpublic static String getDocId(Document doc)
doc, if found,
else returns null. It looks for public static boolean allLowerCase(Document doc)
public static boolean allLowerCase(Document doc, Span span)
public static boolean titleCase(Document doc, Span span)
span of Document doc
appears to be capitalized as a title: if there are no words
beginning with a lower-case letter except for a small list of
function words (articles, possessive pronouns, prepositions, ...).public static void buildAceEntities(Document doc, String docId, AceDocument aceDoc)
public static void tagReciprocalRelations(Document doc)
public static void setPatternSet(String fileName) throws IOException
IOExceptionCopyright © 2016 New York University. All rights reserved.