grammarly / gector

Official implementation of the papers "GECToR – Grammatical Error Correction: Tag, Not Rewrite" (BEA-20) and "Text Simplification by Tagging" (BEA-21)
Apache License 2.0
891 stars 216 forks source link

TypeError: 'type' object is not subscriptable #184

Open KotobaSuke opened 1 year ago

KotobaSuke commented 1 year ago

I am trying to use gector on Windows, but this exception has been raised when I import the model.

Traceback (most recent call last):
  File "d:\...\main.py", line 1, in <module>
    from gector.gector.gec_model import GecBERTModel
  File "C:\Users\Kotoba Trily\AppData\Local\Programs\Python\Python39\lib\gector\gector\gec_model.py", line 18, in <module>
    from gector.gector.tokenizer_indexer import PretrainedBertIndexer
  File "C:\Users\Kotoba Trily\AppData\Local\Programs\Python\Python39\lib\gector\gector\tokenizer_indexer.py", line 24, in <module>
    class TokenizerIndexer(TokenIndexer[int]):
TypeError: 'type' object is not subscriptable