Skip to content

Commit

Permalink
change LANG_DETECTOR to LID176FTZ_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
mkshing committed Mar 14, 2024
1 parent a6f92aa commit 497ec55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd evolving-merged-models
We use fastext to detect language for evaluation. Please download lid.176.ftz from [this link](https://fasttext.cc/docs/en/language-identification.html) and set the path as below.

```bash
export LANG_DETECTOR="path-to-lid.176.ftz"
export LID176FTZ_PATH="path-to-lid.176.ftz"
```

### 3. Install necesarry libraries
Expand Down
2 changes: 1 addition & 1 deletion evomerge/eval/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def rouge_ja(refs, preds):

class LanguageDetector:
def __init__(self):
model_path = os.environ.get("LANG_DETECTOR", "lid.176.ftz")
model_path = os.environ.get("LID176FTZ_PATH", "lid.176.ftz")
self.model = _FastText(model_path)

def __call__(self, text: str) -> dict:
Expand Down

0 comments on commit 497ec55

Please sign in to comment.