Python wrapper around the Microsoft PROSE framework. This package only provides easy wrappers around compiled DSLs, not the option for creating new DSLs.
As a simple example, we show how to use Transformation.Text
, which implements the FlashFill system for learning string transformation programs (example taken from here).
from pyprose.transformation.text import learn_program, make_examples
p = learn_program(make_examples([
(["Greta", "Hermansson"], "Hermansson, G."),
(["Kettil", "Hansson"], "Hansson, K.")
]))
The learned program can be ran on new inputs—a list of two strings in this case. In this case, calling p(["Etelka", "Bala"])
then returns a new string "Bala, E."
.
More information and examples can be found in the documentation.
This package requires pythonnet
and compiled PROSE assemblies. The documentation contains detailed instructions for obtaining these prerequisites.
Once they are satisfied, a simple
pip install git+https://github.com/pidgeyusedgust/pyprose
should suffice.
Progress on implementation of DSLs.
- Transformation.Text (FlashFill)
- Matching.Text (FlashProfile)
- Split.Text (in progress)
If you are interested in seeing a specific DSL integrated sooner, don't hesitate to contact me!
Questions or feedback? Don't hesitate to contact me at gust.verbruggen@kuleuven.be
!