<commit_before>DAWG
====

This package provides DAWG-based dictionary-like
read-only objects for Python (2.x and 3.x).

String data in a DAWG (Directed Acyclic Word Graph) may take
200x less memory than in a standard Python dict or list and
the raw lookup speed is comparable. DAWG may be even faster than
built-in dict for some operations. It also provides fast
advanced methods like prefix search.

Based on `dawgdic` C++ library.

.. _dawgdic: https://code.google.com/p/dawgdic/

Installation
============

pip install DAWG

Usage
=====

There are several DAWG classes in this package:

* ``dawg.DAWG`` - basic DAWG wrapper; it can store unicode keys
  and do exact lookups;

* ``dawg.CompletionDAWG`` - ``dawg.DAWG`` subclass that supports
  key completion and prefix lookups (but requires more memory);

* ``dawg.BytesDAWG`` - ``dawg.CompletionDAWG`` subclass that
  maps unicode keys to lists of ``bytes`` objects.

* ``dawg.RecordDAWG`` - ``dawg.BytesDAWG`` subclass that<commit_msg>README.rst markup fix<commit_after>DAWG
====

This package provides DAWG-based dictionary-like
read-only objects for Python (2.x and 3.x).

String data in a DAWG (Directed Acyclic Word Graph) may take
200x less memory than in a standard Python dict or list and
the raw lookup speed is comparable. DAWG may be even faster than
built-in dict for some operations. It also provides fast
advanced methods like prefix search.

Based on `dawgdic`_ C++ library.

.. _dawgdic: https://code.google.com/p/dawgdic/

Installation
============

pip install DAWG

Usage
=====

There are several DAWG classes in this package:

* ``dawg.DAWG`` - basic DAWG wrapper; it can store unicode keys
  and do exact lookups;

* ``dawg.CompletionDAWG`` - ``dawg.DAWG`` subclass that supports
  key completion and prefix lookups (but requires more memory);

* ``dawg.BytesDAWG`` - ``dawg.CompletionDAWG`` subclass that
  maps unicode keys to lists of ``bytes`` objects.

* ``dawg.RecordDAWG`` - ``dawg.BytesDAWG`` subclass that
{'fraction_non_alphanumeric': 0.10910005027652087, 'fraction_numerical': 0.005027652086475616, 'mean_word_length': 4.292553191489362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1936254', 'n_tokens_mistral': 667, 'n_tokens_neox': 640, 'n_words': 251}