Pular para o conteúdo

Conheça Walt Disney World

Sequitur algorithm

Sequitur (or Nevill-Manning algorithm) is a recursive algorithm developed by Craig Nevill-Manning and Ian H. Witten in 1997[1] that infers a hierarchical structure (context-free grammar) from a sequence of discrete symbols. The algorithm operates in linear space and time. It can be used in data compression software applications.

Contents

Method summary

The algorithm works by scanning a sequence of terminal symbols, building a list of all the symbol pairs which it has read. Whenever a second occurrence of a pair is discovered, the two occurrences are replaced in the sequence by an invented nonterminal symbol, the list of symbol pairs is adjusted to match the new sequence, and scanning continues. If pair's nonterminal symbol is used only in the just created symbol's definition, the used symbol is replaced by its definition and the symbol is removed from the defined nonterminal symbols. Once the scanning has been completed, the transformed sequence can be interpreted as the top-level rule in a grammar for the original sequence. The rule definitions for the nonterminal symbols which it contains can be found in the list of symbol pairs. Those rule definitions may themselves contain additional nonterminal symbols whose rule definitions can also be read from elsewhere in the list of symbol pairs.

See also

References

  1. ^ Nevill-Manning, C.G.; Witten, I.H. (1997). Identifying Hierarchical Structure in Sequences: A linear-time algorithm. arXiv:cs/9709102. 

External links


Personal tools
  • Create account
  • Log in
Namespaces

Variants
Actions
Navigation
Toolbox
Print/export
Languages