liblevenshtein 4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
Loading...
Searching...
No Matches
command_line.h
Go to the documentation of this file.
1#ifndef COMMAND_LINE_H
2#define COMMAND_LINE_H
3
4#include <cstdint>
5#include <filesystem>
6
8
9namespace fs = std::filesystem;
10
11namespace ll = liblevenshtein;
12
13namespace liblevenshtein::demo {
14
23
25public:
26 CommandLine(int argc, char **argv);
27 ~CommandLine() = default;
28
29 auto dictionary_path() const -> const fs::path &;
30 auto serialization_path() const -> const fs::path &;
31 auto algorithm() const -> const ll::Algorithm &;
32 auto max_distance() const -> std::size_t;
33
34 auto parse_opts() -> bool;
35
36 auto return_code() const -> ReturnCode;
37
38 void print_help() const;
39 void print_config() const;
40
41private:
42 auto next_path(fs::path &path, int &i) -> bool;
43
45 fs::path _dictionary_path = "../resources/programming-languages.txt";
46 fs::path _serialization_path = "programming-languages.pb";
48 std::size_t _max_distance = 2;
49
50 int argc;
51 char **argv;
52};
53
54} // namespace liblevenshtein::demo
55
56#endif // COMMAND_LINE_H
auto max_distance() const -> std::size_t
auto return_code() const -> ReturnCode
auto next_path(fs::path &path, int &i) -> bool
CommandLine(int argc, char **argv)
auto dictionary_path() const -> const fs::path &
auto algorithm() const -> const ll::Algorithm &
auto serialization_path() const -> const fs::path &
Various utilities regarding Levenshtein transducers.
Definition namespaces.dox:9
Algorithm
Enumerates the available Levenshtein distance algorithms.
Definition algorithm.h:9
@ TRANSPOSITION
Standard Levenshtein distance extended with the elementary operation of transposition.
STL namespace.