class SpanModel[L, L2, W] extends ParserModel[L, W] with Serializable
A rather more sophisticated discriminative parser. Uses features on the underlying span.
- Annotations
- @SerialVersionUID()
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- SpanModel
- ParserModel
- ParserExtractable
- Model
- Model
- SerializableLogging
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new SpanModel(featurizer: RefinedFeaturizer[L, W, Feature], featureIndex: Index[Feature], annotator: (BinarizedTree[L], IndexedSeq[W]) ⇒ BinarizedTree[IndexedSeq[L2]], constrainer: Factory[L, W], topology: RuleTopology[L], lexicon: Lexicon[L, W], refinedGrammar: RuleTopology[L2], refinements: GrammarRefinements[L, L2], initialFeatureVal: (Feature) ⇒ Option[Double] = _ => None)
Type Members
- type ExpectedCounts = StandardExpectedCounts[Feature]
-
type
Inference = LatentParserInference[L, L2, W]
- Definition Classes
- SpanModel → ParserModel → Model
-
type
Marginal = ParseMarginal[L, W]
- Definition Classes
- ParserModel → Model
-
type
Scorer = GrammarAnchoring[L, W]
- Definition Classes
- ParserModel → Model
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accumulateCounts(inf: Inference, s: Scorer, d: TreeInstance[L, W], m: Marginal, accum: ExpectedCounts, scale: Double): Unit
-
final
def
accumulateCounts(inf: Inference, d: TreeInstance[L, W], accum: ExpectedCounts, scale: Double): Unit
- Definition Classes
- Model
- val annotator: (BinarizedTree[L], IndexedSeq[W]) ⇒ BinarizedTree[IndexedSeq[L2]]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cacheFeatureWeights(weights: DenseVector[Double], suffix: String = ""): Unit
Caches the weights using the cache broker.
Caches the weights using the cache broker.
- Definition Classes
- Model
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
constrainer: Factory[L, W]
- Definition Classes
- SpanModel → ParserExtractable
- def emptyCounts: StandardExpectedCounts[Feature]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
expectedCounts(inf: Inference, d: TreeInstance[L, W], scale: Double = 1.0): ExpectedCounts
- Definition Classes
- Model
- def expectedCountsToObjective(ecounts: ExpectedCounts): (Double, DenseVector[Double])
-
def
extractParser(weights: DenseVector[Double])(implicit deb: Debinarizer[L]): Parser[L, W]
- Definition Classes
- ParserModel → ParserExtractable
- val featureIndex: Index[Feature]
- val featurizer: RefinedFeaturizer[L, W, Feature]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def inferenceFromWeights(weights: DenseVector[Double]): LatentParserInference[L, L2, W]
- def initialValueForFeature(f: Feature): Double
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
lexicon: Lexicon[L, W]
- Definition Classes
- SpanModel → ParserExtractable
-
def
logger: LazyLogger
- Attributes
- protected
- Definition Classes
- SerializableLogging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
numFeatures: Int
- Definition Classes
- Model
-
def
readCachedFeatureWeights(suffix: String = ""): Option[DenseVector[Double]]
just saves feature weights to disk as a serialized counter.
just saves feature weights to disk as a serialized counter. The file is prefix.ser.gz
- Definition Classes
- Model
- val refinedGrammar: RuleTopology[L2]
- val refinements: GrammarRefinements[L, L2]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
topology: RuleTopology[L]
- Definition Classes
- SpanModel → ParserExtractable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
weightsCacheName: String
- Attributes
- protected
- Definition Classes
- Model