Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate quantifier example #38

Open
wants to merge 413 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
413 commits
Select commit Hold shift + click to select a range
ed41f38
Grammar.from_yaml docstring
shanest Mar 29, 2023
14a07e5
fix docstring for from_yaml
shanest Mar 29, 2023
7903746
add a rule to docstring from_yaml
shanest Mar 29, 2023
989afa2
add black GH action
shanest Mar 29, 2023
db7118a
ran black
shanest Mar 29, 2023
e8abbe6
add test Action + upgrade black
shanest Mar 29, 2023
16a89a5
small fix in test action
shanest Mar 29, 2023
7776a7f
bugfix in test action
shanest Mar 29, 2023
04283bb
rename Meaning -> Referent in build_utility_matrix
shanest Mar 30, 2023
d2f1936
stratified versus uniform sampling of langs
shanest Apr 3, 2023
e2f7e7f
run black
shanest Apr 3, 2023
f44b072
optimizer lang_size optional, re-run indefinites
shanest Apr 3, 2023
dd18a14
Merge pull request #17 from CLMBRs/sampling-refactor
shanest Apr 5, 2023
dd8f9f5
update random_languages docstring
shanest Apr 5, 2023
d0f2a75
yield_string from Grammar
shanest Apr 5, 2023
fdab0f4
remove unused imports from grammar
shanest Apr 9, 2023
93e2bfe
update readme
Apr 21, 2023
ea168ea
Merge branch 'main' of github.com:CLMBRS/altk
Apr 21, 2023
40a06cd
remove modals-specific meaning distribution code in information submo…
Apr 21, 2023
e61e905
rewrite signaling game and change name of functions policy to strategy
Apr 21, 2023
ddb57f7
add encoderdecodertopoint function in information
Apr 23, 2023
fe1cffd
refactoring in information
Apr 29, 2023
52e70a7
Updated workflow to update the repository after linting
mickeyshi-bah May 23, 2023
063882f
Test commit for actions
mickeyshi-bah May 23, 2023
562c7e0
removed check from the black .yml to make it alter all files instead …
mickeyshi-bah May 23, 2023
61c3ae7
Okay really removed verbose this time
mickeyshi-bah May 23, 2023
9a9fb56
added credentials
mickeyshi-bah May 23, 2023
ed5f62b
added name
mickeyshi-bah May 23, 2023
ee74dd1
Update after linting
mickeyshi May 23, 2023
009baef
CHanged git credentials to bot
mickeyshi-bah May 23, 2023
68ba5d0
Merge branch 'main' of https://github.com/mickeyshi/altk-actions
mickeyshi-bah May 23, 2023
01063e9
Added new comment to test
mickeyshi-bah May 23, 2023
f3ee6cd
Update after linting
github-actions[bot] May 23, 2023
6481ba7
Modified the GitHub Actions to automatically run linter and commit as…
mickeyshi-bah May 27, 2023
e8968fb
Removed test comment from test_grammar, added bit to README
mickeyshi May 29, 2023
051016a
Update after linting
github-actions[bot] May 29, 2023
16bef1e
Adding build+pypi publish action
mickeyshi May 29, 2023
7a8e1da
Merge branch 'main' of https://github.com/mickeyshi/altk-actions
mickeyshi May 29, 2023
4d336fb
Added pip install build
mickeyshi May 30, 2023
7dedfd3
updated version to hopefully avoid file already exists error
mickeyshi May 30, 2023
8f354d1
Updated version to new version
mickeyshi May 30, 2023
0f61716
updated version in pyproject.toml
mickeyshi May 30, 2023
e58c277
fix repo url in black.yml
shanest Jun 1, 2023
c4f4773
only publish on release
shanest Jun 1, 2023
dc4d8d9
Merge pull request #18 from mickeyshi/main
shanest Jun 1, 2023
9d19034
full support for pyproject.toml
shanest Jun 1, 2023
503b91f
edit to test lint action
shanest Jun 1, 2023
76d3df2
auto format only on PR
shanest Jun 1, 2023
8ac6036
commit to test black
shanest Jun 1, 2023
8064fe1
update black for non-detached head
shanest Jun 1, 2023
70e5616
Automated black formatting
github-actions[bot] Jun 1, 2023
f817d95
Merge pull request #19 from CLMBRs/test-auto-format
shanest Jun 1, 2023
19b14e8
Renamed ALTK to ULTK
mickeyshi Jul 12, 2023
632489f
Renamed ALTK to ULTK
mickeyshi Jul 12, 2023
61fc269
added some tests for Meaning
mickeyshi Jul 17, 2023
8e10148
added some tests for Meaning
mickeyshi Jul 17, 2023
a7b961b
Added equality checks for semantics, added hashing to Referent
mickeyshi Jul 18, 2023
f68deb5
Added equality checks for semantics, added hashing to Referent
mickeyshi Jul 18, 2023
0e1eacb
important bug fix to information.expected_distortion, diagonalized prior
Jul 18, 2023
89966ba
Added tests for language module
mickeyshi Jul 21, 2023
fcac8d7
Added tests for language module
mickeyshi Jul 21, 2023
e4f09f4
Changed referents to better match world objects, rather than POS tags
mickeyshi Jul 21, 2023
a5a0d88
Changed referents to better match world objects, rather than POS tags
mickeyshi Jul 21, 2023
f099459
Made POS changes to tests
mickeyshi Jul 21, 2023
0e917dd
Made POS changes to tests
mickeyshi Jul 21, 2023
2be6c3a
cruft unnecessary cruft from languages
mickeyshi Jul 23, 2023
68f799d
cruft unnecessary cruft from languages
mickeyshi Jul 23, 2023
ee670f8
Fixed some ultk pypi publish stuff, renamed information to probabilit…
mickeyshi Jul 26, 2023
cb775d0
Fixed some ultk pypi publish stuff, renamed information to probabilit…
mickeyshi Jul 26, 2023
570f91c
Added some language tests, renamed util to probability and informatio…
mickeyshi Jul 26, 2023
9d78ea8
Added some language tests, renamed util to probability and informatio…
mickeyshi Jul 26, 2023
be5f42d
marked some bugs in information and agent relating to the IB listener
Jul 27, 2023
d5ea225
mark bayes in effcomm.util as potentially dangerous
Jul 27, 2023
ada092c
raise notimplementederrors for everything deterministic bayes decoder…
Jul 27, 2023
f88d766
Merge branch 'main' of https://github.com/CLMBRs/altk into actions
mickeyshi-bah Jul 28, 2023
ca2ec67
Merge branch 'actions' into ultk-change
mickeyshi-bah Jul 28, 2023
3264b97
Merge branch 'actions' into ultk-change
mickeyshi-bah Jul 28, 2023
8e688a2
Added build folder to gitignore
mickeyshi Jul 28, 2023
6cd588d
Added build folder to gitignore
mickeyshi Jul 28, 2023
20e90bc
Changed the decoders back to notimplemented errors
mickeyshi Jul 28, 2023
f81c23e
Changed the decoders back to notimplemented errors
mickeyshi Jul 28, 2023
6e847dd
actually I think I was correct, marking as such for future
Jul 28, 2023
ab1eead
fixed bugs in information and agent and cleanup
Jul 28, 2023
be39c8c
forgot to cast to array in rows_zero_to_uniform
Jul 29, 2023
bada161
add GNID
Jul 29, 2023
a52013d
Pulled Nathaniel's changes
mickeyshi Jul 31, 2023
1df9c50
Pulled Nathaniel's changes
mickeyshi Jul 31, 2023
8ec4e7e
Merge branch 'main' into ultk-change
mickeyshi Jul 31, 2023
cf62af1
Merge branch 'main' into ultk-change
mickeyshi Jul 31, 2023
b59c3ee
Automated black formatting
github-actions[bot] Jul 31, 2023
3099416
Automated black formatting
github-actions[bot] Jul 31, 2023
5a62458
Added WCS color dict files
mickeyshi Aug 3, 2023
720ba07
Added WCS color dict files
mickeyshi Aug 3, 2023
5eabd0b
update signaling game example readme
Oct 29, 2023
ac25c5b
Initial work on quantifier example
haberchr Oct 31, 2023
5bc1ca2
some type annotation cleaning
shanest Nov 3, 2023
0fc132b
some type cleaning in language, esp Expression
shanest Nov 3, 2023
8e60ada
clean grammar.py for mypy
shanest Nov 3, 2023
3c07573
Subclass referents to make quantifiers, create universe with itertools
haberchr Nov 4, 2023
a151665
cache for efficient grammar enum + uniqueness!
shanest Nov 8, 2023
bc0f9b4
some updated docstrings
shanest Nov 8, 2023
0e6623d
add weights to Grammar.from_yaml
shanest Nov 8, 2023
db19d07
Merge main into learn_quant
haberchr Nov 9, 2023
0c56e06
Add weights to grammar, add timer and results of timer with small gen…
haberchr Nov 9, 2023
7ea182f
Add small generated expressions AFTER change with times
haberchr Nov 9, 2023
662c5bc
store unique meanings by LHS in grammar enumerate
shanest Nov 9, 2023
5557404
Merge branch 'main' into learn_quant
haberchr Nov 9, 2023
a5697eb
Generation results after Shane's fix
haberchr Nov 9, 2023
e58b3d9
Add generation times after edits
haberchr Nov 9, 2023
d7b6e6e
Ensure elements of M may be any index in alien set in defined range(0…
haberchr Nov 9, 2023
ffaf43d
Remove X from QuantifierModel - names will not encode anymore the X f…
haberchr Nov 11, 2023
5fc0038
Don't generate depth=1
haberchr Nov 11, 2023
cda6fef
Ensure universe has uniquely named referents - therefor, unique refer…
haberchr Nov 14, 2023
4dfa9da
Generated at M=4 X=5 D=3 and still only outputs one expression
haberchr Nov 14, 2023
72df8b0
Converted sets to frozensets, set eq=True frozen=True for QuantifierM…
haberchr Nov 16, 2023
dbf7bec
Add x_size to a subclass of Universe (QuantifierUniverse), begin Mono…
haberchr Nov 20, 2023
a6881cc
Update monotonicity measurer
haberchr Nov 21, 2023
1d10c5e
cast expressions to tuple in add expression
Nov 22, 2023
1c1befc
fix bug w x y -> objectives in tradeoff.tradeoff
Nov 22, 2023
922de09
Rules are added for primitives dynamically with new class QuantifierG…
haberchr Nov 26, 2023
95585ba
Ensure that truth_values are only calculated dynamically in monotonic…
haberchr Nov 26, 2023
8b61e53
Fix minor bugs; add iter method to grammar
haberchr Nov 26, 2023
62e56b4
Add tutorial beginning. TODO: monotonicity. Added fix to indexing in …
haberchr Nov 27, 2023
e02d2b9
Minor progress on tutorial check in, minor changes toward using set o…
haberchr Nov 28, 2023
35db091
Update tutorial with monotonicity of specific expressions; check in g…
haberchr Nov 28, 2023
f69dfbc
Add initial log file of upward monotonicity
haberchr Nov 28, 2023
70ce61f
Comments
haberchr Nov 28, 2023
1b56466
Incorporate Shane's comments
haberchr Nov 30, 2023
2fb4863
Incorporate Shane's comments
haberchr Nov 30, 2023
cb81ec6
Merge branch 'main' into ultk-change
haberchr Nov 30, 2023
f39d942
Merge branch 'main' into ultk-change
haberchr Nov 30, 2023
882b4c0
Automated black formatting
github-actions[bot] Nov 30, 2023
1cf342f
Automated black formatting
github-actions[bot] Nov 30, 2023
5de9269
Additional args required in get_unique_expressions to pass pytest
haberchr Nov 30, 2023
9652b39
Additional args required in get_unique_expressions to pass pytest
haberchr Nov 30, 2023
9f3fc61
Ensure names are how they are on main
haberchr Nov 30, 2023
2aabc50
Ensure names are how they are on main
haberchr Nov 30, 2023
2884ac6
Automated black formatting
github-actions[bot] Nov 30, 2023
b9aaffa
Automated black formatting
github-actions[bot] Nov 30, 2023
8f839a1
Merge pull request #20 from CLMBRs/ultk-change
shanest Nov 30, 2023
dd3f6db
Merge pull request #20 from CLMBRs/ultk-change
shanest Nov 30, 2023
4da6707
update final refs to altk, clean todo in example
shanest Nov 30, 2023
7d99289
update final refs to altk, clean todo in example
shanest Nov 30, 2023
20d417d
update website build GH action
shanest Nov 30, 2023
b7d419f
update website build GH action
shanest Nov 30, 2023
0c72c78
manual pdoc commit with name change
shanest Nov 30, 2023
8d48063
manual pdoc commit with name change
shanest Nov 30, 2023
5c732d8
manual pdoc run for name change
shanest Nov 30, 2023
4c194c8
manual pdoc run for name change
shanest Nov 30, 2023
c060cde
adding Chris to author list
shanest Nov 30, 2023
e1b0181
adding Chris to author list
shanest Nov 30, 2023
d451381
adding forgotten comma
shanest Nov 30, 2023
37a41ef
adding forgotten comma
shanest Nov 30, 2023
c380015
a couple more altk -> ultlk
shanest Nov 30, 2023
82c3cde
a couple more altk -> ultlk
shanest Nov 30, 2023
762b487
add GrammaticalExpression.call_on_universe
shanest Nov 30, 2023
f87d953
add GrammaticalExpression.call_on_universe
shanest Nov 30, 2023
0e7fcf7
() -> None in test grammar
shanest Dec 1, 2023
726ef9d
() -> None in test grammar
shanest Dec 1, 2023
1d2f2e4
Checkin dataclass change. Referrent not changed to dataclass yet - ne…
haberchr Dec 5, 2023
fe13965
Checkin dataclass change. Referrent not changed to dataclass yet - ne…
haberchr Dec 5, 2023
cbcc256
update Referent to be frozen
shanest Dec 5, 2023
018f5cc
update Referent to be frozen
shanest Dec 5, 2023
0986e1c
ensure meaning 'referents' are hashable
Dec 15, 2023
d5888d9
ensure meaning 'referents' are hashable
Dec 15, 2023
5e4e34e
Minor changes
Dec 15, 2023
af0d87b
Merge 'main' into 'learn_quant'
Dec 15, 2023
5a216be
Fix tuple bug
Dec 24, 2023
f1b33fc
Fix tuple bug
Dec 24, 2023
271bcb9
Tuple bug cont.
Dec 24, 2023
3f5064f
Tuple bug cont.
Dec 24, 2023
05a6df7
Try to make GrammaticalExpression frozen - impossible due to changing…
Dec 24, 2023
c46053e
Try to make GrammaticalExpression frozen - impossible due to changing…
Dec 24, 2023
5486ac1
GrammaticalExpression shouldn't / can't be frozen
Dec 24, 2023
19a8ee6
GrammaticalExpression shouldn't / can't be frozen
Dec 24, 2023
70a00c8
Ensure that '_frozen' doesn't trip up equality in from_df test
Dec 24, 2023
4e8e5b3
Ensure that '_frozen' doesn't trip up equality in from_df test
Dec 24, 2023
622725b
Automated black formatting
github-actions[bot] Dec 24, 2023
fbee72b
Automated black formatting
github-actions[bot] Dec 24, 2023
6704077
remove results.txt from pytest
Dec 24, 2023
6dfea15
remove results.txt from pytest
Dec 24, 2023
3c01e02
major cleanup in rate distortion
Dec 25, 2023
2c2af64
major cleanup in rate distortion
Dec 25, 2023
9620688
make rate_distortion docstrings more consistent and use pypi instead …
Dec 25, 2023
c3de1fa
make rate_distortion docstrings more consistent and use pypi instead …
Dec 25, 2023
cd2938c
missing comma in toml list
Dec 25, 2023
382ab6d
missing comma in toml list
Dec 25, 2023
7e30957
Response to Shane's comments
haberchr Jan 4, 2024
f306b76
Response to Shane's comments
haberchr Jan 4, 2024
a617072
Automated black formatting
github-actions[bot] Jan 4, 2024
9728365
Automated black formatting
github-actions[bot] Jan 4, 2024
6998fd5
Merge pull request #23 from CLMBRs/dataclass_refactor
shanest Jan 4, 2024
8a69003
Merge pull request #23 from CLMBRs/dataclass_refactor
shanest Jan 4, 2024
25421df
keep build_utility_matrix in informativity
Jan 10, 2024
94d86a8
keep build_utility_matrix in informativity
Jan 10, 2024
9b715f4
implement shane style requests
Jan 10, 2024
c755f2b
implement shane style requests
Jan 10, 2024
7c75a6d
Merge pull request #25 from CLMBRs/rdot-integration
nathimel Jan 10, 2024
87e5dc2
Merge pull request #25 from CLMBRs/rdot-integration
nathimel Jan 10, 2024
3dc97e0
add authors in references for kemp regier 2012
Jan 14, 2024
18a8ae1
add authors in references for kemp regier 2012
Jan 14, 2024
479e2ee
Ultk name change, add from_sets QuantifierModel method, add antimeani…
haberchr Jan 26, 2024
8012b2f
Merge remote-tracking branch 'origin/color-categories' into ultk-change
mickeyshi Jan 30, 2024
cc337d7
Merge remote-tracking branch 'origin/color-categories' into ultk-change
mickeyshi Jan 30, 2024
eb89e66
resolve issues 26-29
Feb 4, 2024
6023cdc
resolve issues 26-29
Feb 4, 2024
36620ab
Merge branch 'main' into ultk-change
mickeyshi Feb 4, 2024
56cf670
Merge branch 'main' into ultk-change
mickeyshi Feb 4, 2024
a8415ba
Allow for merging universes, draw function for GrammaticalExpression,…
haberchr Feb 4, 2024
41abd08
Roll in different generation procedures (inclusive universes, time tr…
haberchr Feb 5, 2024
11bbf7c
No longer needed - now consolidated in 'generated_expressions.py'
haberchr Feb 5, 2024
9f7a17f
Merge branch 'main' into learn_quant
haberchr Feb 5, 2024
26e4ca1
Match main branch - correct language test
haberchr Feb 5, 2024
2955a1b
change dist to tuple
Feb 6, 2024
9cbe92e
Read the WCS color data into ULTK structures
mickeyshi Feb 8, 2024
5aed9d3
Read the WCS color data into ULTK structures
mickeyshi Feb 8, 2024
1ccec6b
fixed some errors in rate_distortion, generates complexity/accuracy/d…
mickeyshi Feb 20, 2024
c23412c
fixed some errors in rate_distortion, generates complexity/accuracy/d…
mickeyshi Feb 20, 2024
ee9014f
mypy-induced cleaning
shanest Feb 23, 2024
ea3d45a
rename language.to_dict(), remove other to_dict() methods
shanest Feb 23, 2024
4fbc8a2
roll back some to_dict to avoid yaml reading errors
shanest Feb 23, 2024
7cdeab5
major plumbing issue fixes in rate_distortion
Feb 24, 2024
5f0420d
major plumbing issue fixes in rate_distortion
Feb 24, 2024
9b4d2d0
remove breakpoint in language run black
Feb 24, 2024
f386b86
remove breakpoint in language run black
Feb 24, 2024
e5e1c69
Automated black formatting
github-actions[bot] Feb 26, 2024
dad22d7
Merge pull request #36 from CLMBRs/to_dict-pretty_print
shanest Feb 26, 2024
1357ead
Substituted meaning/prior with noga values
mickeyshi Mar 4, 2024
8338c36
Merge branch 'color-categories' of https://github.com/CLMBRs/ultk int…
mickeyshi Mar 4, 2024
1897555
Merged in additional changes from main branch
mickeyshi Mar 4, 2024
f8a3112
Removed model pickle file
mickeyshi Mar 4, 2024
f57cdec
Merge branch 'color-categories' of https://github.com/CLMBRs/ultk int…
mickeyshi Mar 5, 2024
ee0814c
Merge branch 'color-categories' of https://github.com/CLMBRs/ultk int…
mickeyshi Mar 5, 2024
16c7a79
resolve mcs
Mar 7, 2024
afbc5de
resolve mcs for color
Mar 7, 2024
cd65691
update signaling game with rdot bound
Apr 8, 2024
4cb3feb
module name change in rdot from ba to optimizers
Apr 21, 2024
36850ec
Merge branch 'main' into learn_quant
haberchr Apr 24, 2024
0702a8e
Merge pull request #3 from haberchr/learn_quant
haberchr Apr 24, 2024
e14367b
Fix func bug
haberchr Apr 24, 2024
1203109
Fix tuple(referents) bug to catch up with main, refactor monotonicity…
haberchr Apr 25, 2024
45fa077
Add hydra commanands for generation, monotonicity measurement
haberchr Apr 28, 2024
5475df3
Fix path issue, print after dynamically adding primitives for indices
haberchr Apr 28, 2024
50f6057
Create function for converting QuantifierModel to a numpy array
haberchr Apr 28, 2024
1344441
change name of antimeaning to complement, remove extraneous 1st time …
haberchr Apr 28, 2024
9e6ef27
Incorporate comments from PR review, run black
haberchr Apr 30, 2024
1859344
stage fix to calculate_lattice, add docstrings
haberchr May 9, 2024
d1859d2
Merge in working frozendict change from generic-meaning
haberchr May 9, 2024
f444a4b
Fix change from 'referents' to 'mapping' in meaning
haberchr May 9, 2024
0ca5463
Add binarizing functions, temporary work-in of frozendict, will solve…
haberchr Jul 8, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- run: pip install pdoc
# ADJUST THIS: build your documentation into docs/.
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
- run: pdoc src/altk -d google --math -o ./docs
- run: pdoc src/ultk -d google --math -o ./docs

- uses: actions/upload-pages-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/project/clmbr-altk
url: https://test.pypi.org/project/ultk
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ src/altk.egg-info
dist/
*.egg-info/
.installed.cfg
*.egg
*.egg
build/

*.zip

model/
build/
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# The Artificial Language ToolKit (ALTK)
# The Unnatural Language ToolKit (ULTK)

<img alt="Four examples of many recent results showing that natural languages are optimized for efficient communication." src="https://raw.githubusercontent.com/CLMBRs/altk/main/images/plots.jpeg" width="100%" />
<img alt="Four examples of many recent results showing that natural languages are optimized for efficient communication." src="https://raw.githubusercontent.com/CLMBRs/ultk/main/images/plots.jpeg" width="100%" />

## Introduction

ALTK is a software library that aims to support [efficient communication analyses](https://github.com/CLMBRs/altk/blob/main/images/mit-altk.pdf) of natural language. This is a line of research that aims to explain why natural languages have the structure that they do in terms competing pressures to minimize cognitive complexity and maximize communicative accuracy.
ULTK is a software library that aims to support [efficient communication analyses](https://github.com/CLMBRs/ultk/blob/main/images/mit-altk.pdf) of natural language. This is a line of research that aims to explain why natural languages have the structure that they do in terms competing pressures to minimize cognitive complexity and maximize communicative accuracy.

Key features:

Expand All @@ -13,45 +13,45 @@ Key features:
- Language population sampling and optimization w.r.t Pareto fronts
- Rate-Distortion and Information Bottleneck style analyses

ALTK is a long term project and it is currently in its early stages. It is intended to help lower the barrier to entry for certain research in computational semantics, and to unify methodologies. If you find something confusing, please open an issue. If you have a phenomena of interest in linguistic semantics that you want to run an efficient communication analysis on, please contact the contributors.
ULTK is a long term project and it is currently in its early stages. It is intended to help lower the barrier to entry for certain research in computational semantics, and to unify methodologies. If you find something confusing, please open an issue. If you have a phenomena of interest in linguistic semantics that you want to run an efficient communication analysis on, please contact the contributors.

Read the [documentation](https://clmbr.shane.st/altk).
Read the [documentation](https://clmbr.shane.st/ultk).

## Installing ALTK
## Installing ULTK

First, set up a virtual environment (e.g. via [miniconda](https://docs.conda.io/en/latest/miniconda.html), `conda create -n altk python=3.11`, and `conda activate altk`).
First, set up a virtual environment (e.g. via [miniconda](https://docs.conda.io/en/latest/miniconda.html), `conda create -n ultk python=3.11`, and `conda activate ultk`).

1. Download or clone this repository and navigate to the root folder.

2. Install ALTK (We recommend doing this inside a virtual environment)
2. Install ULTK (We recommend doing this inside a virtual environment)

`pip install -e .`

## Getting started

- Check out the [examples](https://github.com/CLMBRs/altk/tree/main/src/examples), starting with a basic signaling game. The examples folder also contains a simiple efficient communication analysis of [indefinites](https://github.com/CLMBRs/altk/tree/main/src/examples/indefinites).
- Check out the [examples](https://github.com/CLMBRs/ultk/tree/main/src/examples), starting with a basic signaling game. The examples folder also contains a simiple efficient communication analysis of [indefinites](https://github.com/CLMBRs/ultk/tree/main/src/examples/indefinites).
- To see more scaled up usage examples, visit the codebase for an efficient communication analysis of [modals](https://github.com/nathimel/modals-effcomm) or [sim-max games](https://github.com/nathimel/rdsg).
- For an introduction to efficient communication research, here is a [survey paper](https://www.annualreviews.org/doi/abs/10.1146/annurev-linguistics-011817-045406) of the field.
- For an introduction to the RSA framework, see [this online textbook](http://www.problang.org/).

## Modules

There are two modules. The first is [altk.effcomm](https://clmbr.shane.st/altk/altk/effcomm.html), which includes methods for measuring informativity of languages and/or communicative success of Rational Speech Act agents, and for language population sampling and optimization w.r.t Pareto fronts.
There are two modules. The first is [ultk.effcomm](https://clmbr.shane.st/ultk/ultk/effcomm.html), which includes methods for measuring informativity of languages and/or communicative success of Rational Speech Act agents, and for language population sampling and optimization w.r.t Pareto fronts.

The second module is [altk.language](https://clmbr.shane.st/altk/altk/language.html), which contains primitives for constructing semantic spaces, expressions, and languages. It also has a `grammar` module which can be used for building expressions in a Language of Thought and measuring complexity in terms of minimum description length, as well as for natural language syntax.
The second module is [ultk.language](https://clmbr.shane.st/ultk/ultk/language.html), which contains primitives for constructing semantic spaces, expressions, and languages. It also has a `grammar` module which can be used for building expressions in a Language of Thought and measuring complexity in terms of minimum description length, as well as for natural language syntax.

The source code is available on github [here](https://github.com/CLMBRs/altk).
The source code is available on github [here](https://github.com/CLMBRs/ultk).

## Testing

Unit tests are written in [pytest](https://docs.pytest.org/en/7.3.x/) and executed via running `pytest` in the `src/tests` folder.
Unit tests are written in [pytest](https://docs.pytest.org/en/7.3.x/) and executed via running `pytest` in the `src/tests` folder.

## References

<details>
<summary>Figures:</summary>

> Kinship Categories Across Languages Reflect General Communicative Principles | Science. (n.d.). Retrieved February 27, 2023, from https://www.science.org/doi/10.1126/science.1218811
> Kemp, C. & Regier, T. (2012) Kinship Categories Across Languages Reflect General Communicative Principles. Science. https://www.science.org/doi/10.1126/science.1218811

> Zaslavsky, N., Kemp, C., Regier, T., & Tishby, N. (2018). Efficient compression in color naming and its evolution. Proceedings of the National Academy of Sciences, 115(31), 7937–7942. https://doi.org/10.1073/pnas.1800521115

Expand Down
1,385 changes: 0 additions & 1,385 deletions docs/altk/effcomm/information.html

This file was deleted.

666 changes: 0 additions & 666 deletions docs/altk/language/semantics.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./altk.html"/>
<meta http-equiv="refresh" content="0; url=./ultk.html"/>
</head>
</html>
2 changes: 1 addition & 1 deletion docs/search.js

Large diffs are not rendered by default.

70 changes: 36 additions & 34 deletions docs/altk.html → docs/ultk.html

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions docs/altk/effcomm.html → docs/ultk/effcomm.html

Large diffs are not rendered by default.

1,740 changes: 916 additions & 824 deletions docs/altk/effcomm/agent.html → docs/ultk/effcomm/agent.html

Large diffs are not rendered by default.

322 changes: 160 additions & 162 deletions docs/altk/effcomm/analysis.html → docs/ultk/effcomm/analysis.html

Large diffs are not rendered by default.

1,686 changes: 1,686 additions & 0 deletions docs/ultk/effcomm/information.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,664 changes: 910 additions & 754 deletions docs/altk/effcomm/optimization.html → docs/ultk/effcomm/optimization.html

Large diffs are not rendered by default.

427 changes: 427 additions & 0 deletions docs/ultk/effcomm/sampling.html

Large diffs are not rendered by default.

808 changes: 482 additions & 326 deletions docs/altk/effcomm/tradeoff.html → docs/ultk/effcomm/tradeoff.html

Large diffs are not rendered by default.

541 changes: 319 additions & 222 deletions docs/altk/effcomm/util.html → docs/ultk/effcomm/util.html

Large diffs are not rendered by default.

38 changes: 20 additions & 18 deletions docs/altk/language.html → docs/ultk/language.html

Large diffs are not rendered by default.

2,245 changes: 2,245 additions & 0 deletions docs/ultk/language/grammar.html

Large diffs are not rendered by default.

757 changes: 479 additions & 278 deletions docs/altk/language/language.html → docs/ultk/language/language.html

Large diffs are not rendered by default.

2,173 changes: 1,221 additions & 952 deletions docs/altk/effcomm/sampling.html → docs/ultk/language/sampling.html

Large diffs are not rendered by default.

1,063 changes: 1,063 additions & 0 deletions docs/ultk/language/semantics.html

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "altk"
version = "0.0.1"
name = "ultk"
version = "0.0.1c"
authors = [
{ name="Chris Haberland", email="[email protected]"},
{ name="Nathaniel Imel", email="[email protected]"},
{ name="Shane Steinert-Threlkeld", email="[email protected]" },
]
description = "ALTK is a software library that aims to support efficient communication analyses of natural language. This is a line of research that aims to explain why natural languages have the structure that they do in terms competing pressures to minimize cognitive complexity and maximize communicative accuracy."
description = "ULTK is a software library that aims to support efficient communication analyses of natural language. This is a line of research that aims to explain why natural languages have the structure that they do in terms competing pressures to minimize cognitive complexity and maximize communicative accuracy."
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
Expand All @@ -19,17 +20,19 @@ classifiers = [
]
license = {file = "LICENSE.txt"}
dependencies = [
"mypy",
"numpy",
"nltk",
"pyyaml",
"pandas",
"plotnine",
"pathos",
"embo",
"pytest",
"mypy"
"mypy",
"concepts",
"rdot",
]

[project.urls]
"Homepage" = "https://clmbr.shane.st/altk"
"Bug Tracker" = "https://github.com/CLMBRs/altk/issues"
"Homepage" = "https://clmbr.shane.st/ultk"
"Bug Tracker" = "https://github.com/CLMBRs/ultk/issues"
Loading
Loading