issues
search
NewBornRustacean
/
mark
MARK; Morphological Analysis with Rust for Korean
2
stars
1
forks
source link
한글 처리 및 트라이 구조체 관련 기능
#2
Open
NewBornRustacean
opened
1 year ago
NewBornRustacean
commented
1 year ago
배경 및 관련 포스트
키위 개발하신 분 블로그
쓰리빌 스터디에서 정리한 내용
키위 깃허브
키위
scheme(위 블로그의 0번 포스트 中)
세종 계획 말뭉치를 Python으로 처리하여 형태소 등장 확률, 품사 간 전이확률, 형태소가 특정 품사일 확률을 추출한다.
어미 등이 동사에 붙어 형태가 변할 수 있으므로 그 변이규칙을 작성하고, Python 코드로 가능한 모든 결합형태를 나열한다.
C++로 아호-코라식 알고리즘을 구현하여, 특정 한글 텍스트가 어떤 형태소로 분할될 수 있는지 나열하도록 한다.
1번에서 계산된 베이즈 확률 모델을 가지고 입력 텍스트가 해당 형태소 조합으로 분할될 확률을 추론하여 가장 큰 녀석을 반환한다.
트라이 구현 참고
python implementation of trie:
어떤 중국인 블로그
는 링크드인 엔지니어 크..
post on towards datascience
trie on rust
implementation details on aho-corasick
할 일
[ ] 한글 문자열 처리 기능
[x] #6
[ ] 한글 문장을 어절 단위(띄어쓰기 단위와 대체로 일치)로 분리
[ ] #11
[ ] 형태소 사전 구축
[x] #7
[ ] #8
고려 사항
러스트는 널포인터 허용 안되는데 어떻게 처리할 것인지
트라이 사전을 메모리에 들고 있어도 되나...?
한글과 다른 문자(영어, 숫자 등)가 결합된 어절은 어떻게 분리/결합해야 하는지
아호-코라식 구현체를 한글 처리에 바로 적용할 수 있는지 확인 필요
걍 새로 짜자. 어차피 이 프로젝트 취지가 공부하면서 바퀴를 다시 발명하는 건데 히힣(we do re-invent a wheel)
trie
에서
insert
를 스레드세이프하게 만들어야 -> 병렬처리 할 수 있도록
배경 및 관련 포스트
어떤 중국인 블로그는 링크드인 엔지니어 크..할 일
고려 사항
아호-코라식 구현체를 한글 처리에 바로 적용할 수 있는지 확인 필요걍 새로 짜자. 어차피 이 프로젝트 취지가 공부하면서 바퀴를 다시 발명하는 건데 히힣(we do re-invent a wheel)trie
에서insert
를 스레드세이프하게 만들어야 -> 병렬처리 할 수 있도록