Copyright © Erlang Solutions Ltd. <hello@inaka.net>
Behaviours: gen_server.
This gen_server only creates the ets for the dictionary and ets for bazingas. This module also provides the 'candidates' feature. That feature returns the list of candidates when one word is misspelled and it also manages an ets table.
Copyright Erlang Solutions Ltd. 2017 <hello@inaka.net>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.language() = eng
candidates/2 | |
code_change/3 | |
dictionary_name/1 | returns the name of the dictionary given the language() as a parameter. |
get_bazinga/1 | returns a bazinga from the ETS. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
member/2 | evaluates if a given string() is member of the dictionary. |
start_link/1 | starts the gen_server. |
terminate/2 |
candidates(WordStr::string(), Lang::language()) -> [string()]
code_change(OldVsn::term() | {down, term()}, State, Extra::term()) -> {ok, State}
dictionary_name(Lang::language()) -> atom()
returns the name of the dictionary given the language() as a parameter
get_bazinga(Lang::language()) -> string()
returns a bazinga from the ETS
handle_call(Request::term(), From::{pid(), Tag::term()}, State) -> {reply, ok, State}
handle_cast(Request::term(), State) -> {noreply, State}
handle_info(Info::timeout() | term(), State) -> {noreply, State}
init(X1::[language()]) -> {ok, State::#{}}
member(Word::string(), Lang::language()) -> boolean()
evaluates if a given string() is member of the dictionary
start_link(Lang::language()) -> {ok, Pid::pid()} | ignore | {error, Reason::term()}
starts the gen_server
terminate(Reason::normal | shutdown | {shutdown, term()} | term(), State::#{}) -> term()
Generated by EDoc, Apr 12 2017, 15:07:08.