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

Reorganization of cg #396

Merged
merged 18 commits into from
Apr 6, 2021
Merged

Reorganization of cg #396

merged 18 commits into from
Apr 6, 2021

Conversation

ajmalanoski
Copy link
Collaborator

@ajmalanoski ajmalanoski commented Mar 26, 2021

  • Updated Unreleased in CHANGELOG.md to reflect the changes in code or data.

Closes #385

This PR changes the organization of the data/cg directory in a similar way to #394 and #395. Changes include the following:

  • Renamed data/cg to data/covering_grammar and added folders data/covering_grammar/lib and data/covering_grammar/tsv
  • Renamed covering grammar files to include script info and transcription type (phonemic/phonetic)
  • Moved relevant scripts from data/src and data/src/error_analysis to data/covering_grammar/lib
  • Added a file to make the input files for data/covering_grammar/lib/error_analysis.py (for some reason, this file wasn't in WikiPron, even though it existed at the time that Arundhati added the CG stuff)
  • Added a placeholder README for data/covering_grammar

I imagine we'll eventually want the README to be a table like the ones we have for data/phones and data/scrape, and that we'll probably want some sort of generate_cg_summary.py to make that table.

Sorry, something went wrong.

Copy link
Collaborator

@kylebgorman kylebgorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree we may want a covering grammar generated README too, why not. It'd look cool and encourage more submitted CGs maybe.

The error analysis code and README is still here: data/src/error_analysis.

I just ruthlessly bikesheaded your make_test_file.py, sorry about that.



def main(args: argparse.Namespace) -> None:
with open(args.gold, "r") as gf, open(args.pred, "r") as pf:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is a plus here or not but when you're doing a lot of file-opening, contextlib's ExitStack helps a lot: https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack

@lfashby
Copy link
Collaborator

lfashby commented Mar 27, 2021

I don’t have much to add. I generally prefer more verbose variable names but that's just me. After this we just have to write up these temporary TSVs.

The error analysis code and README is still here: data/src/error_analysis.

Are you saying that those file should stay in data/src? They’ve moved to data/covering_grammar/lib from what I can see.

@kylebgorman
Copy link
Collaborator

The error analysis code and README is still here: data/src/error_analysis.

Are you saying that those file should stay in data/src? They’ve moved to data/covering_grammar/lib from what I can see.

No, just that pace the description they're still in-repo. I trust that y'all will place them somewhere sensible.

Copy link
Collaborator

@kylebgorman kylebgorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments below, looking pretty good.

@kylebgorman
Copy link
Collaborator

kylebgorman commented Apr 6, 2021 via email

Copy link
Collaborator

@kylebgorman kylebgorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ++

@ajmalanoski ajmalanoski merged commit 0a61d91 into CUNY-CL:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Covering grammar naming
3 participants