Rune Caster 1.0.0
Modern C++ Text Processing Framework
Loading...
Searching...
No Matches
spell_token.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "spell_base.hpp"
4#include "unicode.hpp"
5#include <vector>
6
7namespace rune_caster {
8namespace spell {
9namespace core {
10
15class WhitespaceTokenizer : public spell_base<RuneSequence, std::vector<RuneSequence>> {
16public:
18 using output_type = std::vector<RuneSequence>;
19
20 output_type operator()(const input_type& input) const override;
21
22 std::string description() const override { return "Tokenize on Unicode whitespace"; }
23 std::string name() const override { return "WhitespaceTokenizer"; }
24};
25
26} // namespace core
27} // namespace spell
28} // namespace rune_caster
Simple whitespace tokenizer Splits input RuneSequence into tokens separated by Unicode whitespace.
output_type operator()(const input_type &input) const override
Apply the spell transformation.
std::string name() const override
Get the spell's name.
std::string description() const override
Get the spell's description.
Base interface for all spell algorithms with C++20 enhancements.
RuneString RuneSequence
Backward compatibility alias for RuneString.