public class InfMWEDesc extends AbstractMWEDesc<IInfMWEDesc.IInfPart> implements IInfMWEDesc
IInfMWEDesc
interface.Modifier and Type | Class and Description |
---|---|
static class |
InfMWEDesc.InfMWEDescBuilder
A builder for inflected MWE description objecgts
|
protected class |
InfMWEDesc.InfPart
Default implementation of the
IInfMWEDesc.IInfPart interface. |
AbstractMWEDesc.AbstractPart
IInfMWEDesc.IInfPart
IMWEDesc.IPart
counts
EXPECTED_COUNT_LENGTH
boundaryUnderscores, comma, underscore, underscores
Constructor and Description |
---|
InfMWEDesc(IRootMWEDesc root,
java.util.List<java.lang.String> parts)
Constructs a new inflected MWE description object from the specified list
of parts and root description
|
InfMWEDesc(IRootMWEDesc root,
java.util.List<java.lang.String> parts,
int... counts)
Constructs a new MWE description object from the list of parts.
|
InfMWEDesc(IRootMWEDesc root,
java.lang.String inflectedForm)
Constructs a new MWE description object from the specified root
description and inflected form.
|
InfMWEDesc(IRootMWEDesc root,
java.lang.String inflectedForm,
int... counts)
Constructs a new inflected MWE description object from the specified
inflected form, root description, and counts relating to the MWE's
appearance in the reference concordance.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getExpectedCountLength()
Subclasses should implement this method to return the number of counts
relating to the MWE's appearance in a reference concordance that are
expected in the implementation.
|
IMWEDescID |
getID()
Returns the IMWEDescID associated with this description.
|
int |
getMarkedPattern()
The number of times this description occurs in the reference concordance
being marked as an occurrence of the MWE, while matching one of the known
inflection patterns.
|
MWEPOS |
getPOS()
Returns the part of speech of this object.
|
IRootMWEDesc |
getRootMWEDesc()
Returns the root description of the multi-word expression (MWE).
|
protected IInfMWEDesc.IInfPart |
makePart(java.lang.String form,
int index)
Subclasses should implement this method to construct an
IMWEDesc.IPart
given the form and index of a part of an MWE. |
checkCount, compareTo, concatenate, equalsRoots, getCounts, getForm, getMarkedContinuous, getMarkedSplit, getParts, getRoot, getUnmarkedExact, getUnmarkedPattern, isFillerForSlot, isStopWord, splitOnUnderscores, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParts
getCounts, getMarkedContinuous, getMarkedSplit, getUnmarkedExact, getUnmarkedPattern
public InfMWEDesc(IRootMWEDesc root, java.lang.String inflectedForm)
root
- the root description of the MWEinflectedForm
- A string representing the inflected MWE with its words
separated by underscoresjava.lang.NullPointerException
- if either argument is null
java.lang.IllegalArgumentException
- if the inflected form does not contain underscorespublic InfMWEDesc(IRootMWEDesc root, java.lang.String inflectedForm, int... counts)
root
- the root description of the MWEinflectedForm
- A string representing the inflected MWE with its words
separated by underscorescounts
- the counts relating to the MWE's appearance in the reference
concordance.java.lang.NullPointerException
- if the root description or inflected form is
null
java.lang.IllegalArgumentException
- if the inflected form does not contain underscorespublic InfMWEDesc(IRootMWEDesc root, java.util.List<java.lang.String> parts)
root
- the root description of the MWEparts
- A list of parts that comprise the MWEjava.lang.NullPointerException
- if the list of parts or root is null
java.lang.IllegalArgumentException
- if the specified list has less than two elements, or any
trimmed string in the list contains an underscore, is empty,
or contains whitespacepublic InfMWEDesc(IRootMWEDesc root, java.util.List<java.lang.String> parts, int... counts)
root
- the root descriptor to use when constructing the MWE, may not
be null
parts
- the list of parts that will make up this list, may neither be
null
nor empty, and may not contain any
null
s, empty or all whitespace strings, or
strings that contain the underscore character.counts
- the implementation-specific counts relating to the MWE's
appearance in a reference concordance.java.lang.NullPointerException
- if the specified list of parts is null
, or
contains a null
java.lang.IllegalArgumentException
- if the specified list has less than two elements, or any
trimmed string in the list contains an underscore, is empty,
or contains whitespaceprotected int getExpectedCountLength()
AbstractMWEDesc
getExpectedCountLength
in class AbstractMWEDesc<IInfMWEDesc.IInfPart>
public IMWEDescID getID()
IMWEDesc
public MWEPOS getPOS()
IHasMWEPOS
null
.getPOS
in interface IHasMWEPOS
public IRootMWEDesc getRootMWEDesc()
IInfMWEDesc
getRootMWEDesc
in interface IInfMWEDesc
public int getMarkedPattern()
IInfMWEDesc
getMarkedPattern
in interface IInfMWEDesc
protected IInfMWEDesc.IInfPart makePart(java.lang.String form, int index)
AbstractMWEDesc
IMWEDesc.IPart
given the form and index of a part of an MWE.makePart
in class AbstractMWEDesc<IInfMWEDesc.IInfPart>
form
- the text of the partindex
- the index of the part in the MWEnull
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.