class PositionalNeuralModel[L, L2, W] extends ParserModel[L, W] with Serializable
Main neural CRF parser class.
- Annotations
- @SerialVersionUID()
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- PositionalNeuralModel
- ParserModel
- ParserExtractable
- Model
- Model
- SerializableLogging
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new PositionalNeuralModel(annotator: (BinarizedTree[L], IndexedSeq[W]) ⇒ BinarizedTree[IndexedSeq[L2]], constrainer: Factory[L, W], topology: RuleTopology[L], lexicon: Lexicon[L, W], refinedTopology: RuleTopology[L2], refinements: GrammarRefinements[L, L2], labelFeaturizer: RefinedFeaturizer[L, W, Feature], surfaceFeaturizer: Word2VecSurfaceFeaturizerIndexed[W], depFeaturizer: Word2VecDepFeaturizerIndexed[W], transforms: IndexedSeq[OutputTransform[Array[Int], DenseVector[Double]]], maybeSparseSurfaceFeaturizer: Option[IndexedSpanFeaturizer[L, L2, W]], depTransforms: Seq[OutputTransform[Array[Int], DenseVector[Double]]], decoupledTransforms: Seq[OutputTransform[Array[Int], DenseVector[Double]]])
Type Members
- type ExpectedCounts = StandardExpectedCounts[Feature]
-
type
Inference = PositionalNeuralModel.Inference[L, L2, W]
- Definition Classes
- PositionalNeuralModel → 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
- Definition Classes
- PositionalNeuralModel → Model
-
final
def
accumulateCounts(inf: Inference, d: TreeInstance[L, W], accum: ExpectedCounts, scale: Double): Unit
- Definition Classes
- Model
-
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( ... )
- def cloneModelForEnsembling: PositionalNeuralModel[L, L2, W]
-
val
constrainer: Factory[L, W]
- Definition Classes
- PositionalNeuralModel → ParserExtractable
- val decoupledTransforms: Seq[OutputTransform[Array[Int], DenseVector[Double]]]
- val depTransforms: Seq[OutputTransform[Array[Int], DenseVector[Double]]]
- 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], trainExs: Seq[TreeInstance[L, W]])(implicit deb: Debinarizer[L]): Parser[L, W]
When doing batch normalization, we need to normalize the test network
-
def
extractParser(weights: DenseVector[Double])(implicit deb: Debinarizer[L]): Parser[L, W]
- Definition Classes
- ParserModel → ParserExtractable
-
def
featureIndex: Index[Feature]
Models have features, and this defines the mapping from indices in the weight vector to features.
Models have features, and this defines the mapping from indices in the weight vector to features.
- Definition Classes
- PositionalNeuralModel → Model
-
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
-
val
index: SegmentedIndex[Feature, Index[Feature]]
Models have features, and this defines the mapping from indices in the weight vector to features.
- def inferenceFromWeights(weights: DenseVector[Double], forTrain: Boolean): Inference
-
def
inferenceFromWeights(weights: DenseVector[Double]): Inference
- Definition Classes
- PositionalNeuralModel → Model
-
def
initialValueForFeature(f: Feature): Double
- Definition Classes
- PositionalNeuralModel → Model
- def initialWeightVector(initWeightsScale: Double, initializerSpec: String, trulyRandom: Boolean = false): DenseVector[Double]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
lexicon: Lexicon[L, W]
- Definition Classes
- PositionalNeuralModel → ParserExtractable
-
def
logger: LazyLogger
- Attributes
- protected
- Definition Classes
- SerializableLogging
- val maybeSparseSurfaceFeaturizer: Option[IndexedSpanFeaturizer[L, L2, W]]
- def mergeWeightsForEnsembling(x1: DenseVector[Double], x2: DenseVector[Double]): DenseVector[Double]
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
topology: RuleTopology[L]
- Definition Classes
- PositionalNeuralModel → ParserExtractable
- val transforms: IndexedSeq[OutputTransform[Array[Int], DenseVector[Double]]]
-
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