úÎ'm#Ê1      !"#$%&'()*+,-./0 1234562Gives the total number of observations sum_a C(a) GGives the total number of events observed at least once {a | C(a) > 1} ›Trivial type family for events. Just use EventMap = M.Map for most cases. Allows clients to specify the type of map used, when efficiency is important. VObservations over a set of events. The param event must be an instance of class Event 78  Observation of a single event *Manually increment the count of an event 9:;<JFinish a set of offline observations so that they can be used to estimate  likelihood      =ZMaximum Likelihood Estimation gives out probability by normalizing over observed events. - Unseen events are gived zero probabilty. tEvents are conditioned on Contexts. When Contexts are sparse, we need a way to decompose into simpler SubContexts. ` This class allows us to separate this decomposition from the collection of larger contexts. The type of sub contexts )A map over subcontexts (for efficiency) 3A function to enumerate subcontexts of a context tThe set of observations of event conditioned on context. event must be an instance of Event and context of Context 4A CondObserved set for a single event and context.  !UGeneral Linear Interpolation. Produces a Conditional Distribution from observations. _ It requires a GeneralLambda function which tells it how to weight each level of smoothing. P The GeneralLambda function can observe the counts of each level of context. _Note: We include a final level of backoff where everything is given an epsilon likelihood. To ) ignore this, just give it lambda = 0. "1Weight each level by a fixed predefined amount. >#RWeight each level by the likelihood that a new event will be seen at that level.  t /U ((n * d) + t) where t is the total count, d is the number of distinct observations, ( and n is a user defined constant.  !"#!#"  !"#$%$%$%$%?@ABCD EF&'()*+,-./ &'()*+,-./0 0&'()*+,-./ & '()*+,-./'()*+,-./G       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFFGHIJKestimators-0.1.4NLP.Probability.SmoothTrieNLP.Probability.ObservationNLP.Probability.Distribution'NLP.Probability.ConditionalDistributionNLP.Probability.EMNLP.Probability.ChainNLP.Probability.Example.Trigram SmoothTrie addColumnObservedobservedtotaluniqueEventEventMapCountsCount showObsPretty observation observationsincfinish DistributionProbmlelaplace Weighting DebugDistCondDistributionContextSubSubMap decompose CondObservedcondObservationscondObservationcondObservationCountsmkDistestimateGeneralLinear simpleLinear wittenBell randomCountsrandomCondCounts JointModel FullEvent FullContextProbs ObservationPairs chainRuleobserveprobestimate simpleObservemPrettylookuplookupWithDefaultinsertcountholdercountsobservedEventselems calcTotalcountNonTrivial Estimator lambdaWBCTrigramContextTrigramWord makeTrigrams languageModelEstimateDist