
enchant_broker_request_dict는 Enchant 라이브러리의 BrokerRequest 구조를 나타내는 딕셔너리입니다.
BrokerRequest는 spell-checking, word-completion, 그리고 thesaurus 기능과 같은 여러 기능을 요청할 때 사용됩니다.
enchant_broker_request_dict는 다음과 같은 형식으로 구성됩니다.
- 'action' : 요청할 기능('spell', 'word-completion', 'thesaurus' 등)
- 'lang' : 언어 코드('en_US', 'ko_KR' 등)
- 'word' : 작업할 단어
- 'what' : 작업할 내용('spell', 'list', 'synonym' 등)
예를 들어, spell-checking 기능을 요청하는 경우 다음과 같이 구성할 수 있습니다.
#hostingforum.kr
python
enchant_broker_request_dict = {
'action': 'spell',
'lang': 'en_US',
'word': 'hello',
'what': 'spell'
}
이 딕셔너리를 Enchant 라이브러리의 BrokerRequest 함수에 전달하면 spell-checking 기능을 요청할 수 있습니다.
2025-04-09 16:27