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

Adding HONEST score #279

Merged
merged 28 commits into from
Sep 29, 2022
Merged

Adding HONEST score #279

merged 28 commits into from
Sep 29, 2022

Conversation

sashavor
Copy link
Contributor

Adding HONEST score from https://github.com/MilaNLProc/honest

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 31, 2022

The documentation is not available anymore as the PR was closed or merged.

@sashavor sashavor marked this pull request as ready for review September 2, 2022 14:32
@sashavor
Copy link
Contributor Author

sashavor commented Sep 2, 2022

@lvwerra I'm getting an import error for the unidecode package, but it is in requirements.txt, as well as in the imports of honest.py...

Any ideas?

Example 1: Calculating HONEST without groups

```python
>>> honest = evaluate.load('measurements/honest', lang = 'en')
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a config_name, not a lang, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so I'm waiting for the big config to be merged so we can have different config names, including lang.

measurements/honest/README.md Outdated Show resolved Hide resolved
measurements/honest/README.md Outdated Show resolved Hide resolved
measurements/honest/README.md Outdated Show resolved Hide resolved
measurements/honest/README.md Outdated Show resolved Hide resolved
measurements/honest/honest.py Show resolved Hide resolved
measurements/honest/honest.py Show resolved Hide resolved
measurements/honest/honest.py Outdated Show resolved Hide resolved
measurements/honest/honest.py Show resolved Hide resolved
measurements/honest/README.md Show resolved Hide resolved
Sasha Luccioni and others added 13 commits September 8, 2022 14:48
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Copy link
Member

@lvwerra lvwerra left a comment

Choose a reason for hiding this comment

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

Looks really good, thanks for adding this! Left a few minor things to clean up.

measurements/honest/honest.py Outdated Show resolved Hide resolved
measurements/honest/honest.py Outdated Show resolved Hide resolved
measurements/honest/honest.py Outdated Show resolved Hide resolved
word = strip_accent(word)
if word in self.words:
list_score["count"] += 1
list_score[self.get_hurtlex_category(word)] += 1
Copy link
Member

Choose a reason for hiding this comment

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

the key "count" never occurs in self.get_hurtlex_category(word)? Otherwise you would overwrite it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no it doesn't, it's not part of the lexicon. (although I do admit it's a fragile way of implementing it -- I took it directly from the HONEST code).

measurements/honest/honest.py Show resolved Hide resolved
measurements/honest/requirements.txt Outdated Show resolved Hide resolved
measurements/honest/honest.py Outdated Show resolved Hide resolved
removing `predicted_words`
Sasha Luccioni and others added 5 commits September 27, 2022 12:01
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
removing pandas and nump
@sashavor sashavor merged commit 81f841b into main Sep 29, 2022
@sashavor sashavor deleted the honest-score branch September 29, 2022 13:02
NimaBoscarino pushed a commit that referenced this pull request Oct 17, 2022
* Adding HONEST score

* adding source of code

* running make

* added two modes for the score, group and no group

* ran make

* polishing up

* ran make

* updating requirements

* adding unidecode to tests

* Update measurements/honest/README.md

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update measurements/honest/README.md

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update measurements/honest/README.md

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update measurements/honest/README.md

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update README.md

* Update measurements/honest/README.md

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update measurements/honest/honest.py

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* Update README.md

* Update honest.py

* Update measurements/honest/honest.py

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>

* keeping lang as a parameter for now

* fixing loading

* Update honest.py

removing `predicted_words`

* Update measurements/honest/honest.py

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Update measurements/honest/honest.py

Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>

* Update requirements.txt

removing pandas and nump

* raising value error is config incorrect

* Update honest.py

Co-authored-by: helen <31600291+mathemakitten@users.noreply.github.com>
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
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.

None yet

4 participants