public class StandardsText
extends java.lang.Object
This class helps to find the standard references from text by performing the following steps:
StandardOrganizations);| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
REGEX_APPLICABLE_DOCUMENTS |
private static java.lang.String |
REGEX_FALLBACK |
private static java.lang.String |
REGEX_HEADER |
private static java.lang.String |
REGEX_IDENTIFIER |
private static java.lang.String |
REGEX_ORGANIZATION |
private static java.lang.String |
REGEX_STANDARD |
private static java.lang.String |
REGEX_STANDARD_TYPE |
| Constructor and Description |
|---|
StandardsText() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.ArrayList<StandardReference> |
extractStandardReferences(java.lang.String text,
double threshold)
Extracts the standard references found within the given text.
|
private static java.util.Map<java.lang.Integer,java.lang.String> |
findHeaders(java.lang.String text)
This method helps to find the headers within the given text.
|
private static java.util.ArrayList<StandardReference> |
findStandards(java.lang.String text,
java.util.Map<java.lang.Integer,java.lang.String> headers,
double threshold)
This method helps to find the standard references within the given text.
|
private static final java.lang.String REGEX_HEADER
private static final java.lang.String REGEX_APPLICABLE_DOCUMENTS
private static final java.lang.String REGEX_IDENTIFIER
private static final java.lang.String REGEX_ORGANIZATION
private static final java.lang.String REGEX_STANDARD_TYPE
private static final java.lang.String REGEX_FALLBACK
private static final java.lang.String REGEX_STANDARD
public static java.util.ArrayList<StandardReference> extractStandardReferences(java.lang.String text, double threshold)
text - the text from which the standard references are extracted.threshold - the lower bound limit to be used in order to select only the
standard references with score greater than or equal to the
threshold. For instance, using a threshold of 0.75 means that
only the patterns with score greater than or equal to 0.75
will be returned.private static java.util.Map<java.lang.Integer,java.lang.String> findHeaders(java.lang.String text)
text - the text from which the headers are extracted.private static java.util.ArrayList<StandardReference> findStandards(java.lang.String text, java.util.Map<java.lang.Integer,java.lang.String> headers, double threshold)
text - the text from which the standards references are extracted.headers - the list of headers found within the given text.threshold - the lower bound limit to be used in order to select only the
standard references with score greater than or equal to the
threshold.