-
Notifications
You must be signed in to change notification settings - Fork 0
Add CSI coarse-sense layer as an add-on over frozen lexen-v1 #1
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
Open
vassiliphilippov
wants to merge
4
commits into
main
Choose a base branch
from
csi-coarsening-add-on
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0060a7c
Add CSI coarse-sense layer as an add-on over frozen lexen-v1
vassiliphilippov b54d9f7
Fix lint/format/typing in scripts/apply_csi.py
vassiliphilippov bfd059b
Apply Python style-review fixes to scripts/apply_csi.py
vassiliphilippov 15a39c1
chore: flowmark-format README.md and docs/selection.md
vassiliphilippov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Coarse-sense add-on layers for lexEN | ||
|
|
||
| This directory holds **add-on coarse-sense layers** that map onto the frozen `lexen-v1` | ||
| release **without modifying it**. The released dataset (`data/lexen-v1/items.jsonl`, | ||
| `data/lexen-v1/dataset.json`) and its source ledger (`sources/manifest.json`) are | ||
| unchanged and still pass `lexen-verify-release`; these layers live entirely outside that | ||
| verified surface. | ||
|
|
||
| Two coarsenings are available for lexEN: | ||
|
|
||
| - **Glite** — shipped *in-record* as `item["glite"]` inside `data/lexen-v1/items.jsonl` | ||
| (the dataset's native coarse layer; a learner-dictionary inventory). | ||
| - **CSI** — shipped *here* as an add-on (`coarsenings/csi/`), a public third-party | ||
| inventory (Coarse Sense Inventory, Lacerra et al., AAAI 2020) provided so coarse-sense | ||
| results can be reproduced under an inventory no lexEN author controls. | ||
|
|
||
| ## `coarsenings/csi/` | ||
|
|
||
| | Path | Purpose | | ||
| | --- | --- | | ||
| | `files/wordnet_sense_key_to_csi_concept.jsonl` | Forward map: WordNet sense key → CSI composite concept id. | | ||
| | `files/csi_report_aliases.json` | Aliases for legacy/British keys, remapped to their CSI concept. | | ||
| | `files/mapping_coverage.json` | Coverage over the lexEN candidate/gold/review inventory (79.2%). | | ||
| | `csi_layer.jsonl` | **Per-item sidecar**, one line `{ "item_id", "csi": {…} }`, the `csi` block in the same shape as `item["glite"]`. Join to `items.jsonl` on `item_id`. | | ||
| | `details.json`, `description.md` | Package metadata, provenance, and license. | | ||
|
|
||
| Regenerate the sidecar with `python scripts/apply_csi.py` (stdlib only). That script also | ||
| asserts it reproduces the existing `item["glite"]` block exactly before emitting CSI, so | ||
| the CSI block is structurally identical to the native Glite layer. | ||
|
|
||
| **License:** CSI is **CC-BY-NC-SA 4.0** (Lacerra et al. 2020); this derived subset is | ||
| distributed under the same terms with attribution. See `coarsenings/csi/details.json`. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| spec_version: "1" | ||
| dataset_id: "csi-coarsening-maru2022-subset" | ||
| source_dataset_id: "csi" | ||
| source_package_generated_at: "2026-06-16" | ||
| date_added_to_lexen: "2026-06-16" | ||
| --- | ||
| # CSI Coarsening Subset (third-party public coarse inventory) | ||
|
|
||
| This directory contains a **CSI** coarse-sense layer for lexEN — an independent, third-party | ||
| alternative to the Glite coarsening. CSI (Coarse Sense Inventory) is the 45-domain inventory of | ||
| Lacerra, Bevilacqua, Pasini & Navigli (AAAI 2020). It is provided so coarse-sense results computed | ||
| against lexEN can be reproduced under a public inventory that no lexEN author controls. | ||
|
|
||
| This layer is an **add-on resource over the frozen `lexen-v1` release**: it does not modify | ||
| `data/lexen-v1/items.jsonl` or the release content hash. Per-item CSI labels are shipped as the | ||
| sidecar `data/lexen-v1/csi_layer.jsonl`, keyed by `item_id`, mirroring the in-record `glite` block. | ||
|
|
||
| ## Included Files | ||
|
|
||
| | File | Purpose | | ||
| | --- | --- | | ||
| | `files/wordnet_sense_key_to_csi_concept.jsonl` | Forward map: WordNet sense key → CSI composite concept id. | | ||
| | `files/mapping_coverage.json` | Coverage summary over the lexEN candidate/gold/review inventory. | | ||
| | `files/csi_report_aliases.json` | Report-local aliases for legacy/British WordNet sense keys, remapped to their CSI concept. | | ||
|
|
||
| ## Coarsening Policy | ||
|
|
||
| Each WordNet synset that lexEN references is mapped to a single **composite CSI concept** | ||
| `csi:<sorted+joined domain labels>`. CSI assigns some synsets more than one domain; we collapse a | ||
| synset's full domain set into one composite class. This keeps the layer a clean **partition** that | ||
| plugs into the same single-concept coarse-scoring contract as Glite (a coarse hit inherits a fine hit, | ||
| else predicted concept ∈ gold concepts). If a sense key is not present in the public CSI map, the | ||
| coarsener first checks the alias file; if no alias exists it keeps an explicit `unmapped:<sense_key>` | ||
| marker rather than guessing a concept. CSI covers 79.2% of the referenced keys; the remainder are | ||
| `unmapped:` and therefore never silently merged. | ||
|
|
||
| ## Provenance & License | ||
|
|
||
| Derived from the released CSI resource (`wn_synset2csi.txt`, WordNet 3.0 synset offsets) at | ||
| <https://sapienzanlp.github.io/csi/>. CSI is licensed **CC-BY-NC-SA 4.0**; this derived subset is | ||
| distributed under the same terms, with attribution to Lacerra et al. (2020). The only modification is | ||
| the join to lexEN's referenced sense keys plus the multi-domain→composite reduction described above | ||
| (declared as a change per the ShareAlike terms). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "access_kind": "public", | ||
| "authors": [ | ||
| {"country": "Italy", "institution": "Sapienza University of Rome", "name": "Caterina Lacerra", "orcid": null}, | ||
| {"country": "Italy", "institution": "Sapienza University of Rome", "name": "Michele Bevilacqua", "orcid": null}, | ||
| {"country": "Italy", "institution": "Sapienza University of Rome", "name": "Tommaso Pasini", "orcid": null}, | ||
| {"country": "Italy", "institution": "Sapienza University of Rome", "name": "Roberto Navigli", "orcid": null} | ||
| ], | ||
| "categories": [ | ||
| "sense-mapping", | ||
| "knowledge-base", | ||
| "wsd" | ||
| ], | ||
| "checksums": { | ||
| "csi_report_aliases.json": "sha256:fb4996937b97e866a6741f71a1814874f79838819f961ae70e2667ccce02fd3a", | ||
| "mapping_coverage.json": "sha256:35318031756ad4151a53eb8716cc5d7065bb8417616430659f89244caca85848", | ||
| "wordnet_sense_key_to_csi_concept.jsonl": "sha256:b84ee722e7cb6df6ad86e2fe55985e736b7d28e5871d6baef23e9f754f2b5e2a" | ||
| }, | ||
| "dataset_id": "csi-coarsening-maru2022-subset", | ||
| "date_added": "2026-06-16", | ||
| "date_added_to_lexen": "2026-06-16", | ||
| "date_published": "2020-02-07", | ||
| "download_url": "https://raw.githubusercontent.com/SapienzaNLP/csi/master/docs/_download/csi_data.zip", | ||
| "files": [ | ||
| {"description": "Forward map from Maru2022/lexEN WordNet sense keys to CSI composite concept ids (sorted+joined domain labels).", "format": "jsonl", "path": "files/wordnet_sense_key_to_csi_concept.jsonl"}, | ||
| {"description": "Machine-readable coverage summary for the CSI coarsening subset.", "format": "json", "path": "files/mapping_coverage.json"}, | ||
| {"description": "Report-local alias table for legacy/British WordNet sense keys, remapped to their CSI concept.", "format": "json", "path": "files/csi_report_aliases.json"} | ||
| ], | ||
| "institutions": ["Sapienza NLP Group, Sapienza University of Rome"], | ||
| "license": "CC-BY-NC-SA-4.0", | ||
| "modifications": "Derived from the released CSI WordNet-3.0 synset->domain mapping (wn_synset2csi.txt). We (1) joined each synset's CSI sense keys to the WordNet sense keys lexEN references, and (2) reduced each synset's multi-domain label set to a single composite class (sorted+joined), a conservative partition for single-concept coarse scoring. Distributed under the same CC-BY-NC-SA 4.0 license as the original.", | ||
| "name": "CSI Coarse Sense Inventory subset for Maru2022/lexEN", | ||
| "short_description": "Public WordNet sense-key to CSI composite-concept subset, a third-party coarse inventory used as an independent coarse-sense label layer alongside Glite.", | ||
| "size_description": "3 files; the forward map contains 7,783 WordNet sense-key mappings to 413 composite CSI concepts over the lexEN candidate/gold/review inventory (79.2% of 9,833 referenced keys; uncovered keys carry an explicit unmapped: marker).", | ||
| "source_dataset_id": "csi", | ||
| "source_package_generated_at": "2026-06-16", | ||
| "source_paper_id": "lacerra2020", | ||
| "spec_version": "1", | ||
| "url": "https://sapienzanlp.github.io/csi/", | ||
| "version": null, | ||
| "year": 2020 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "spec_version": "1", | ||
| "aliases": [ | ||
| { | ||
| "source_sense_key": "court%1:06:05::", | ||
| "target_sense_key": "court%1:14:00::", | ||
| "concept_id": "csi:LAW_AND_CRIME_", | ||
| "reason": "Legacy WordNet sense key for the legal-tribunal noun sense; Glite maps the equivalent legal-court concept through court%1:14:00:: and court%1:06:02::." | ||
| }, | ||
| { | ||
| "source_sense_key": "organisation%1:04:01::", | ||
| "target_sense_key": "organization%1:04:01::", | ||
| "concept_id": "csi:POLITICS_GOVERNMENT_AND_NOBILITY_", | ||
| "reason": "British-spelling WordNet sense key; canonical Glite map contains the equivalent American-spelling organization sense key." | ||
| }, | ||
| { | ||
| "source_sense_key": "organisation%1:14:00::", | ||
| "target_sense_key": "organization%1:14:00::", | ||
| "concept_id": "csi:POLITICS_GOVERNMENT_AND_NOBILITY_", | ||
| "reason": "British-spelling WordNet sense key; canonical Glite map contains the equivalent American-spelling organization sense key." | ||
| }, | ||
| { | ||
| "source_sense_key": "organisation%1:14:01::", | ||
| "target_sense_key": "organization%1:14:01::", | ||
| "concept_id": "csi:BUSINESS_ECONOMICS_AND_FINANCE_+POLITICS_GOVERNMENT_AND_NOBILITY_", | ||
| "reason": "British-spelling WordNet sense key; canonical Glite map contains the equivalent American-spelling organization sense key." | ||
| }, | ||
| { | ||
| "source_sense_key": "show%1:10:00::", | ||
| "target_sense_key": "show%1:04:00::", | ||
| "concept_id": "csi:ART_ARCHITECTURE_AND_ARCHAEOLOGY_+MEDIA_", | ||
| "reason": "Legacy WordNet noun sense for a public entertainment/performance; Glite maps the equivalent event concept through show%1:04:00::." | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the CSI sidecar output path in description.md.
Line 17 states the sidecar is shipped at
data/lexen-v1/csi_layer.jsonl, but according to the actual builder script (scripts/apply_csi.pyline 22) andcoarsenings/README.mdline 24, the sidecar path iscoarsenings/csi/csi_layer.jsonl. This path mismatch will confuse users who consult the documentation.Update line 17 to specify the correct path:
coarsenings/csi/csi_layer.jsonl.Suggested fix