Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "python_mg"
crate-type = ["cdylib"]

[dependencies]
simple-semantics = { git = "https://github.com/MichaelGoodale/simple-semantics.git" }
pyo3 = { version = "0.28.0", features = [
"anyhow",
"extension-module",
Expand All @@ -22,3 +23,4 @@ anyhow = "1.0.98"
logprob = "0.2.1"
rand = "0.10.0"
numpy = "0.28.0"
itertools = "0.14.0"
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ It provides the tools necessary to generate strings from a Minimalist Grammar an

lexicon
syntax
semantics
metrics


Expand Down
25 changes: 25 additions & 0 deletions docs/source/semantics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Semantics
=========

These are the classes that allow you to evaluate Language of Thought expressions generated by Semantic lexica.

.. autoclass:: python_mg.semantics.Scenario
:members:
:undoc-members:

.. autoclass:: python_mg.semantics.Actor
:members:
:undoc-members:

.. autoclass:: python_mg.semantics.Event
:members:
:undoc-members:

.. autoclass:: python_mg.semantics.PossibleEvent
:members:
:undoc-members:

.. autoclass:: python_mg.semantics.ScenarioGenerator
:members:
:undoc-members:

4 changes: 2 additions & 2 deletions docs/source/syntax.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Syntax tree utilities
=====================
Syntax
======

These are the classes that are useful for manipulating or plotting parse trees directly.

Expand Down
34 changes: 21 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
"numpy>=1.24.4",
"pillow>=10.4.0",
"pydot>=4.0.1",
"rustworkx>=0.15.1",
"numpy>=1.24.4",
"pillow>=10.4.0",
"pydot>=4.0.1",
"rustworkx>=0.15.1",
]
[tool.maturin]
features = ["pyo3/extension-module"]
Expand All @@ -24,16 +24,16 @@ module-name = "python_mg._lib_name"

[dependency-groups]
dev = [
"patchelf>=0.17.2.2",
"pytest>=8.3.5",
"sphinx>=7.1.2",
"sphinx-rtd-theme>=3.0.2",
"patchelf>=0.17.2.2",
"pytest>=8.3.5",
"sphinx>=7.1.2",
"sphinx-rtd-theme>=3.0.2",
]
examples = [
"datasets>=3.1.0",
"scipy>=1.10.1",
"torch>=2.5.1",
"transformers[torch]>=4.46.3",
"datasets>=3.1.0",
"scipy>=1.10.1",
"torch>=2.5.1",
"transformers[torch]>=4.46.3",
]

[tool.setuptools.package-data]
Expand All @@ -43,4 +43,12 @@ examples = [
where = ["src"]

[tool.uv]
cache-keys = [{file = "pyproject.toml"}, {file = "Cargo.toml"}, {file = "**/*.rs"}]
cache-keys = [
{ file = "pyproject.toml" },
{ file = "Cargo.toml" },
{ file = "**/*.rs" },
]

[tool.ruff.lint]
ignore = ["E501"]
select = ["E", "F", "D", "ANN"]
Loading