compress graphs with answer-set-programming
Project description
# PowerGrASP
Graph compression.
Note that this is a full reimplementation of PowerGrASP,
taking advantage of ASP and Python lifting and simplifications.
For the version published in 2017, see [this repository](https://github.com/aluriak/PowerGrASP-1).
## CLI
powergrasp mygraph.gml -o compressed.bbl
### help !
powergrasp --help
## API
```python
import powergrasp
with open('compressed.bbl', 'w') as fd:
for line in powergrasp.compress_by_cc('mygraph.gml'):
fd.write(line + '\n')
```
### help !
Sorry, no technical doc for the moment.
## Configuration
PowerGrASP have some [configuration values](powergrasp/constants.py),
that can be overwritten by a `powergrasp.cfg` file in json format.
Configuration allow user to define how much text will be provided by powergrasp,
or some options for core compression and output data.
## installation
pip install powergrasp
On random error, try adding `--no-cache-dir` somewhere.
## TODO
- [x] unit tests
- [x] CLI
- [x] run on big graph
- [x] search multiple motif in the same run (speed up observed on bio graph)
- [ ] timers for solving, full run, extraction, output writing
- [ ] technical documentation
- [ ] search and specific compression of trees
- [ ] search and specific compression of triangle-free graphs
Graph compression.
Note that this is a full reimplementation of PowerGrASP,
taking advantage of ASP and Python lifting and simplifications.
For the version published in 2017, see [this repository](https://github.com/aluriak/PowerGrASP-1).
## CLI
powergrasp mygraph.gml -o compressed.bbl
### help !
powergrasp --help
## API
```python
import powergrasp
with open('compressed.bbl', 'w') as fd:
for line in powergrasp.compress_by_cc('mygraph.gml'):
fd.write(line + '\n')
```
### help !
Sorry, no technical doc for the moment.
## Configuration
PowerGrASP have some [configuration values](powergrasp/constants.py),
that can be overwritten by a `powergrasp.cfg` file in json format.
Configuration allow user to define how much text will be provided by powergrasp,
or some options for core compression and output data.
## installation
pip install powergrasp
On random error, try adding `--no-cache-dir` somewhere.
## TODO
- [x] unit tests
- [x] CLI
- [x] run on big graph
- [x] search multiple motif in the same run (speed up observed on bio graph)
- [ ] timers for solving, full run, extraction, output writing
- [ ] technical documentation
- [ ] search and specific compression of trees
- [ ] search and specific compression of triangle-free graphs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
powergrasp-0.8.4.tar.gz
(16.7 kB
view hashes)
Built Distribution
powergrasp-0.8.4-py3-none-any.whl
(23.1 kB
view hashes)
Close
Hashes for powergrasp-0.8.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397174b438450f6e1300ab3cda3368cbd07703b58217568ab966c2852e45a991 |
|
MD5 | 7a3a7ff78137a6f33a9a19b9c5f72dcf |
|
BLAKE2b-256 | cd499d954fc0ed8bb070817e0ff53b09dbd80cdf43c6c8369eafef322422546a |