摘要 |
A process performs multiple evaluations of text simultaneously. There are multiple counters, each with pattern-amount pairs. The pattern-amount pairs are accumulated into a single finite-state machine, with each state having a list of (counter, value) pairs instead of a single value. While the finite-state machine is applied to text, a score for each counter is accumulated by summing values for the counter from value lists of visited states. With one state transition per character, evaluating text using one finite-state machine for multiple counters is more efficient than using separate finite-state machines for counters or patterns.
|