Using PyO3, Rust helps Python to calculate lexical diversity

Using PyO3, Rust helps Python to calculate lexical diversity

EKB PhD

54 года назад

247 Просмотров

I use PyO3 to write Rust code that I call from within Python to calculate lexical diversity, specifically the MTLD_wrap algorithm (MTLD = Measure of Textual Lexical Diversity).

Thanks to Scott Jarvis for his Python code that highly informed my Python code here:
https://github.com/ekbrown/scripting_for_linguists/blob/main/Script_MTLD_wrap.py

Here's my Rust code:
https://github.com/ekbrown/scripting_for_linguists/blob/main/lib_mtld_wrap.rs

#corpuslinguistics #pythonprogramming #rustlang #pyo3
Ссылки и html тэги не поддерживаются


Комментарии: