fromsun2moon / koreanf2i Goto Github PK
View Code? Open in Web Editor NEW한국어 높임말 교정
License: MIT License
한국어 높임말 교정
License: MIT License
[해결법]: 라이브러리 설치시, 최신 버전이 아닌 지정해준 버전을 설치하세요.
안녕하세요, 저는 대학생 박지열이라고 합니다. 우선 좋은 취지의 오픈 소스 감사드립니다.
하지만 사용하고자, test.py 를 실행시켰더니 제목과 같은 오류가 발생했습니다. 제가 디버깅해본 결과, changer.py 에서 token 에 접근하는 방식에서 TypeError 가 발생하는 것을 확인했습니다.
if token[:2] in lk: -> TypeError: sequence index must be integer, not 'slice'
확인해보니, 의도하는 바가 무엇인지 알겠으나 지금은 사용할 수 없는 형식인 듯 합니다.
print(token[0]) # '그랜드'
print(token[1]) # 'NNG'
print(token[:2]) # TypeError!!
저는 임시방편으로 코드를 다음과 같이 수정했습니다.
tmp = []
for token in tokens[0][0]:
token_tuple = (token[0], token[1]) # token[:2] 대신 새롭게 만든 변수
if token_tuple in lk:
#key로 value
token = informaldic().get(token_tuple)
if token_tuple in ak:
token = abnormaldic().get(token_tuple)
tmp.append(token)
저는 class 에서 slicing 을 하는 방법에 대해서 잘 모르기 때문에, 기회가 되신다면 그쪽을 바꿔서 사용해봐도 좋을 것 같습니다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.