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

Can use this lib in Chinese? #15

Open
hueiyuan opened this issue Nov 18, 2020 · 3 comments
Open

Can use this lib in Chinese? #15

hueiyuan opened this issue Nov 18, 2020 · 3 comments

Comments

@hueiyuan
Copy link

I want to check something. I have viewed source code and found it use DistillBert which use "distilbert-base-uncased".
I want to ask this lib if can be used in chinese language? Thanks

@andyweizhao
Copy link
Collaborator

Thanks a lot for your interest! Yes, you can specify Chinese BERT (e.g., bert-base-chinese) as the model_name. Note that this project is designed for measuring the similarity of monolingual texts. If you are of interest in multilingual texts (e.g., the similarity between Chinese and English texts), please refer to our recent project in https://github.com/AIPHES/ACL20-Reference-Free-MT-Evaluation, where we made some modification to get better results in the multilingual evaluation context.

@hueiyuan
Copy link
Author

@andyweizhao
Understood! but how to specify Chinese BERT (e.g., bert-base-chinese) as the model_name with this lib?
I have not seen this parameter setting in the source code. Thanks for help.

@xhluca
Copy link

xhluca commented Feb 7, 2022

@hueiyuan It is now specified in the readme:

import os 
os.environ['MOVERSCORE_MODEL'] = "albert-base-v2"

from moverscore_v2 import get_idf_dict
idf_dict_hyp = get_idf_dict(translations)

Here the model would be the bert model you want to use.

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

3 participants