bheinzerling / bpemb

Pre-trained subword embeddings in 275 languages, based on Byte-Pair Encoding (BPE)
https://nlp.h-its.org/bpemb
MIT License
1.18k stars 101 forks source link

Incorrect type hints for encode_ids* #49

Closed cosine0 closed 3 years ago

cosine0 commented 3 years ago

The functions such as encode_ids and encode_ids_with_bos_eos returns piece ids as ints. But the type annotations say -> Union[Sequence[str], Sequence[Sequence[str]]]. This causes warnings in PyCharm.