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

Problem using --exclude in lemma testing #63

Open
trondtynnol opened this issue Sep 11, 2024 · 2 comments
Open

Problem using --exclude in lemma testing #63

trondtynnol opened this issue Sep 11, 2024 · 2 comments

Comments

@trondtynnol
Copy link
Contributor

I have just noticed that the lemma generation test does not seem to like the --exclude option, at least not as it is used in the generate-POS-lemmas.sh scripts. For example, in lang-sma/src/fst/morphology/test, I get this error when running make devtest:

TEST: generate-noun-lemmas.sh
grep: unrecognized option '--exclude (CmpN/Only| R | Rreal |\+Gen\+|\+Der\+|\+CmpN\/Suff|\+Use\/MT)'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

Digging a bit into this revealed that:

  1. --exclude should be used with =
  2. --exclude is used for excluding certain files, but we want to exclude certain patterns, so it is not suitable anyways.

Most guides suggest piping from grep into grep -v to exclude patterns, as grep does not do both (inclusion and exclusion matching) in a single run.

(I put this issue here as it concerns all the lang- repositories, not one in particular. Please move if it should rather be put under another repo.)

@trondtynnol
Copy link
Contributor Author

@flammie

@flammie
Copy link
Contributor

flammie commented Sep 11, 2024

the exclude should be parsed by the script before it reaches grep actually, I think it just got doubled somewhere in the reorg,

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

No branches or pull requests

2 participants