Unigram: Compare probability between multiple cut paths
Unigram divides a string with a different cut as a potential path, each of which consists of a snippet probability.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Explain Unigram: Mechanisms and premises for comparing probabilities between multiple split paths
- Positioning the mechanism ' s fault limits with fixed examples
Suggested first
- Probability multiplier and dynamic planning
Issues and mechanisms
Unigram divides a string with a different cut as a potential path, each of which consists of a snippet probability. Even if the original alphabetical order is fixed, there may be multiple divisions of complete words, staggered words and suffixes. Probability modelling enables training to consider multiple paths, and codes can choose the path with the highest scores, or use subword sampling as a rule to add changes to input segments.
Under the simplest stand-alone snippet scenario, the path probability is the multiplier of the snippet probability, using logarithms and avoiding spillovers. Strings always seem to sum up all legal paths, with the best of which only the largest; The two cannot be exchanged. Dynamic planning avoids all distinctions by sharing prefix issues. When cutting branches of a glossary, the effect of deleting the fragments on the overall text appears to be assessed.
A concrete example
Sets a string abc with three legal staggers: ab plus c, a plus bc, a plus b plus c. Synthetic Snippet Probability P(ab) = 0.2, P(c) = 0.1, P(a) = 0.1, P(bc) = 0.15, P(b) = 0.05. The probability of the three paths is 0.02, 0.015, 0.0005, the best being the first and the total mass 0.0355. The first article of the reclassification is about 56.3 per cent instead of 100 per cent, indicating that the best path and the uncertainty of the path are different messages.
Borders and checks
The example gives only the probability of a part of the word sheet of the participatory path, with the remaining word list taking on the remaining quality. Realization also involves regularizing, unknown characters and dictionaries, which cannot be used to replace the full word-discribe. If the training is based on random subwording and the best path is reasoned to be fixed, this distribution difference should be clarified and stability checked in independent evaluations where necessary.
A method of verification
Also check if the path covers the entire string and does not repeat characters. Dynamic planning can save the best prefix scores for each character endpoint; The sum of all prefix quality is always preserved when calculations appear, and the two tables are different. Use a clear unknown policy for non-legal decomposition of strings, instead of returning a shorter but missing path. If random subword sampling is enabled, the test should fix the sampling set and check the frequency of multiple legal paths, without a single output of the negative probability model.
Check understanding
Can the best path probability be a direct total string probability?
Can't. The total probability would need to be added to all legal splitting paths; Only the maximum is taken to ignore other interpretations, usually below the full edge.
Why do you use logarithmic scores instead of constantly multiplying probability?
The probability of a long path may be very small, and the number of easy-to-spill values may spill; The logarithms are more stable. The summation in dynamic planning and maximization also require the respective logarithmic calculations.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.