본문 바로가기

Computer82

python editdistance library 속도 비교(timeit) python editdistance library를 검색하면 다양한 라이브러리가 나옵니다. 그중 editditsance, python-Levenshtein에 대해 속도 비교한 내용입니다. timeit을 배우려고 timeit으로 속도 비교를 해봤습니다. 참고 1, editdistance, https://github.com/roy-ht/editdistance 참고 2, python-Levenshtein, https://maxbachmann.github.io/Levenshtein/ 참고 3, timeit, https://docs.python.org/ko/3/library/timeit.html [timeit — 작은 코드 조각의 실행 시간 측정 — Python 3.11.1 문서 timeit — 작은 코드 조각의.. 2022. 12. 8.
Bert Examples 1) huggingface bert를 많이 사용 huggingface.co/transformers/notebooks.html 🤗 Transformers Notebooks You can find here a list of the official notebooks provided by Hugging Face. Also, we would like to list here interesting content created by the community. I... huggingface.co 2) best practice: bert를 classification에 사용 colab.research.google.com/github/huggingface/notebooks/blob/master/examples/text_cla.. 2021. 4. 30.
symbolic link 깨져 있는지 확인하기 symbolic link가 깨져 있는 경우에는 다음과 같이 확인하면 됨 BROKEN_LINK=$(find /path/to -type l -xtype l | wc -l) if [ $BROKEN_LINK -gt 0 ]; then echo -e "CHECK BROKEN_LINK:\t$/path/to" error fi ref : https://www.commandlinefu.com/commands/view/8260/find-broken-symlinks 2018. 10. 1.
jaro-winkler similarity(jaro-winkler distance) 프로젝트 중 알게된 edit distance 비교 방법이 있어서 정리해본다.(사실 매번 Damerau–Levenshtein distance만 사용했었다...) jaro similarity(jaro distance) jaro distance는 두 단어간의 transpositions에 집중한 알고리즘이다.(insertion, deletion, substitution은 고려하지 않음) transposition은 간단히 위치 교환이라고 생각하면 된다. 아래와 같이 두 단어가 있을 때, transpositions은 총 2회 발생한다.(a=> b, b => a) word1 : a ---- bword2 : b ---- a jaro distance는 두 단어가 비슷할수록 1에 가까운 값을 가지고, 다를수록 0에 가까운.. 2018. 5. 13.