Class: Dictionary

Dictionary(pointer)

Class representing a dictionary.

Constructor

new Dictionary(pointer)

Do not use this constructor. You can make dictionary instance by using Dictionary.createFromFile or Dictionary.createFromWeb.
Parameters:
Name Type Description
pointer Buffer A mutable pointer of dictionary for Rust
Source:

Methods

(static) createFromFile(filePath) → {Dictionary}

사전 TSV 파일을 읽어 Dictionary를 생성합니다.
Parameters:
Name Type Description
filePath string
Source:
Returns:
Type
Dictionary

(static) createFromWeb(threadNum) → {Dictionary}

웹에서 표준국어대사전을 크롤링해 Dictionary를 생성합니다.
Parameters:
Name Type Description
threadNum number How many threads you use for crawling
Source:
Returns:
Type
Dictionary

find(wordText) → {DictionaryItem}

사전에 해당 단어가 있는지 확인하고 해당 단어를 반환합니다.
Parameters:
Name Type Description
wordText string
Source:
Returns:
Type
DictionaryItem

findAll(wordText) → {Array.<DictionaryItem>}

사전에 해당 단어가 있는지 확인하고 해당하는 모든 단어를 반환합니다.
Parameters:
Name Type Description
wordText string
Source:
Returns:
Type
Array.<DictionaryItem>

has(wordText) → {boolean}

사전에 해당 단어가 있는지 확인합니다.
Parameters:
Name Type Description
wordText string
Source:
Returns:
Type
boolean

saveAsTsv(filePath)

사전을 TSV 파일로 저장합니다.
Parameters:
Name Type Description
filePath string
Source:

size() → {number}

사전에 포함된 단어 개수를 반환합니다.
Source:
Returns:
Type
number