[NLP] FastText Python 바인딩 오류 해결하기
·
LLM/Project
이 글은 FastText 사용중에 NumPy 2.0으로 인해 Python 바인딩에서 오류 발생하여 해결한 방법을 공유하고자 작성되었다.https://c0mputermaster.tistory.com/64ErrorFastText 사용 중, 다음과 같은 오류가 발생했다.ValueError: Unable to avoid copy while creating an array as requested.If using `np.array(obj, copy=False)` replace it with `np.asarray(obj)` NumPy 2.0부터 np.array(..., copy=False)의 동작이 변경되어 발생한 문제이다. https://groups.google.com/g/fasttext-library/c/4EOM..
[NLP] FastText로 간단한 텍스트 분류 모델 만들기
·
LLM/Project
최근에 사용자 명령어를 인식해서 어떤 작업을 실행할지 구분하는 기능이 필요했다. 간단한 텍스트 분류 모델이 필요했는데, Facebook에서 만든 오픈소스 라이브러리 FastText를 사용하여 보았다. 이 글에서는 Python을 통해 FastText 분류 모델을 구현하는 전체 과정을 소개한다. https://fasttext.cc/ fastTextLibrary for efficient text classification and representation learningfasttext.ccFastText 설치먼저 설치부터 시작. FastText는 아래처럼 pip으로 간단하게 설치할 수 있다.pip install fasttext데이터 준비모델을 학습시키기 위해, 각 명령어에 해당하는 의도를 미리 정의해두었다. ..