https://github.com/nokia/regexp-learner
A python module allowing to learn patterns by issuing queries and learning from counter examples.
https://github.com/nokia/regexp-learner
Last synced: 12 months ago
JSON representation
A python module allowing to learn patterns by issuing queries and learning from counter examples.
- Host: GitHub
- URL: https://github.com/nokia/regexp-learner
- Owner: nokia
- License: bsd-3-clause
- Created: 2019-06-25T15:35:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-27T14:32:03.000Z (about 1 year ago)
- Last Synced: 2025-05-27T14:57:12.495Z (about 1 year ago)
- Language: Python
- Size: 777 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# regexp-learner
[](https://pypi.python.org/pypi/regexp_learner/)
[](https://github.com/nokia/regexp-learner/actions/workflows/build.yml)
[](https://github.com/nokia/regexp-learner/actions/workflows/docs.yml)
[](https://regexp-learner.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/nokia/regexp-learner)
## Overview
[regexp-learner](https://github.com/nokia/regexp-learner) is a [Python 3](http://python.org/) module providing the following algorithms:
* __Angluin (1987):__ the L* algorithm is presented in _Learning regular sets from queries and couterexamples_, Dana Angluin, 1987 [[pdf](https://people.eecs.berkeley.edu/~dawnsong/teaching/s10/papers/angluin87.pdf)], [[slides](https://github.com/nokia/regexp-learner/blob/master/Angluin.pdf)].
* __Gold (1978):__ the Gold algorithm is presented in _Complexity of automaton identification from given data_, E. Mark Gold, 1987 [[pdf](http://sebastian.doc.gold.ac.uk/papers/Language_Learning/gold78complexity.pdf)].
This module is built on top of:
* [numpy](https://pypi.org/project/numpy/);
* [pybgl](https://pypi.org/project/pybgl/), a lightweight graph library.
A [jupyter notebook](https://pypi.org/project/jupyter/) is also provided test the algorithm. Note that the [graphviz](https://pypi.org/project/jupyter/) runnables (e.g., `dot`) is required to display the automata.
## Usage
* Install [Jupyter Notebook](https://pypi.org/project/jupyter/) or [Jupyter lab](https://pypi.org/project/jupyterlab/).
* Follow [installation steps](https://github.com/nokia/regexp-learner/wiki/Installation).
* Run `jupyter notebook` or `jupyter lab`.
* Open the desired notebook.
* Run the cells.
## Links
* [Installation](https://github.com/nokia/regexp-learner/blob/master/docs/installation.md)
* [Documentation](https://regexp-learner.readthedocs.io/en/latest/)
* [Coverage](https://app.codecov.io/gh/nokia/regexp-learner)
* [Wiki](https://github.com/nokia/regexp-learner/wiki)
## License
This project is licensed under the [BSD-3-Clause license](https://github.com/nokia/regexp-learner/blob/master/LICENSE).