[
](LICENSE)

Modern C++ Text Processing Framework
STL์์ ์๊ฐ์ ๋ฐ์ ์ง๊ด์ ์ด๊ณ ๊ณ ์ฑ๋ฅ์ ๋ค๊ตญ์ด ํ
์คํธ ์ฒ๋ฆฌ ๋ฐ ์ธ์ด ๊ฐ ๋ณํ ํ๋ ์์ํฌ
๐ ์ฃผ์ ํน์ง
- ๐ค Rune ์์คํ
: ์ ๋์ฝ๋ ๋ฌธ์์ ๋ฌธ์์ด์ ๋ค๋ฃจ๋ STL ์คํ์ผ ์ปจํ
์ด๋
- โก Zero-cost Abstractions: ๋ฐํ์ ์ค๋ฒํค๋ ์๋ ๊ณ ์ฑ๋ฅ ์ฒ๋ฆฌ
- ๐ ๋ค๊ตญ์ด ์ง์: ํ๊ตญ์ด, ์์ด, ์ผ๋ณธ์ด ๋ฑ Unicode ํ
์คํธ ์ฒ๋ฆฌ
- ๐ฏ STL ํธํ: ์ต์ํ ์ปจํ
์ด๋-์๊ณ ๋ฆฌ์ฆ-์ดํฐ๋ ์ดํฐ ํจํด
- ๐ง C++20: Modern C++ ๊ธฐ๋ฅ์ ์ ๊ทน ํ์ฉํ ํ์
์์ ํ API
๐ ํ์ฌ ๊ตฌํ ์ํ
๐ง ๊ฐ๋ฐ ์ด๊ธฐ ๋จ๊ณ (์งํ ์ค)
- ํ๋ก์ ํธ ๊ตฌ์กฐ: CMake ๋น๋ ์์คํ
, ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์์ฑ
- ๋ฌธ์ํ: ์์ ํ ์ค๊ณ ๋ฌธ์ (PRD, ๊ธฐ์ ์ํคํ
์ฒ, API ์ค๊ณ)
- ํค๋ ํ์ผ: ์ธํฐํ์ด์ค ์ ์ (์ปดํ์ผ ์ค๋ฅ ์์ ํ์)
โ ๏ธ ์๋ ค์ง ์ด์
- ์ปดํ์ผ ์ค๋ฅ: ํ์ฌ ๋น๋ ์ ๋ฌธ๋ฒ ์ค๋ฅ ๋ฐ์
- ์ธ์ฝ๋ฉ ๋ฌธ์ : Windows ํ๊ตญ์ด ํ๊ฒฝ์์ UTF-8 ์ฒ๋ฆฌ ์ด์
- ์์กด์ฑ ์ค๋ฅ: ํด๋์ค ๊ฐ ์ฐธ์กฐ ๋ฌธ์
๐ฏ ์ฆ์ ํ์ํ ์์
- ๊ธฐ๋ณธ ์ปดํ์ผ ๋ฌธ์ ํด๊ฒฐ
- Rune ํด๋์ค ๊ธฐ๋ณธ ๊ตฌํ
- Unicode ์ฒ๋ฆฌ ์์คํ
๊ตฌํ
- RuneSequence ์ปจํ
์ด๋ ๊ตฌํ
๐ฎ ํฅํ ๊ณํ
- Spell ์์คํ
: ํ
์คํธ ์ฒ๋ฆฌ ์๊ณ ๋ฆฌ์ฆ (์ ๊ทํ, ์ ์ , ํํฐ๋ง)
- Caster ํ์ดํ๋ผ์ธ: ํจ์ํ ์ฒด์ด๋๊ณผ ๋ณ๋ ฌ ์ฒ๋ฆฌ
- Posterior Phonetic Gram: ์ธ์ด ๊ฐ ์์ฑํ์ ๋ณํ
- ๋ค๊ตญ์ด ๋ชจ๋: ์ธ์ด๋ณ ํนํ ์ฒ๋ฆฌ ๊ท์น
๐ ๋น ๋ฅธ ์์
์ ์ ์กฐ๊ฑด
- C++ ์ปดํ์ผ๋ฌ: C++20 ์ง์ (GCC 9+, Clang 10+, MSVC 19.20+)
- CMake: 3.20 ์ด์
- Git: ์์ค ์ฝ๋ ํด๋ก ์ฉ
์์กด์ฑ (์ ํ์ฌํญ)
# Ubuntu/Debian
sudo apt update
sudo apt install libicu-dev libfmt-dev libspdlog-dev
# macOS (Homebrew)
brew install icu4c fmt spdlog
# Windows (vcpkg)
vcpkg install icu fmt spdlog
์ฐธ๊ณ : ์์กด์ฑ์ด ์์ด๋ ๊ธฐ๋ณธ ๊ธฐ๋ฅ์ ์๋ํ์ง๋ง, ICU ์ค์น๋ฅผ ๊ถ์ฅํฉ๋๋ค.
๐จ ๋น๋ ๋ฐฉ๋ฒ
1. ์์ค ์ฝ๋ ํด๋ก
git clone https://github.com/yourusername/rune-caster.git
cd rune-caster
2. ๋น๋ ๋๋ ํ ๋ฆฌ ์์ฑ
3. CMake ์ค์
# ๊ธฐ๋ณธ ๋น๋
cmake ..
# Release ๋ชจ๋
cmake -DCMAKE_BUILD_TYPE=Release ..
# ์ต์
์ค์
cmake -DRUNE_CASTER_ENABLE_TESTS=ON \
-DRUNE_CASTER_ENABLE_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Debug ..
4. ์ปดํ์ผ
# Windows (Visual Studio)
cmake --build . --config Release
# Linux/macOS
make -j$(nproc)
# ๋๋ ninja ์ฌ์ฉ ์
ninja
5. ์ค์น (์ ํ์ฌํญ)
๐ ๋ฌธ์
๐ ์จ๋ผ์ธ ๋ฌธ์
- API Documentation: Doxygen์ผ๋ก ์์ฑ๋ ์์ธํ API ๋ฌธ์
- ๋น ๋ฅธ ์์ ๊ฐ์ด๋: ํ๋ก์ ํธ ์์์ ์ํ ๋จ๊ณ๋ณ ๊ฐ์ด๋
- ๋ณด์ ์ค์ ๊ฐ์ด๋: GitHub Code Scanning ๋ฐ ๋ณด์ ์ค์บ ์ค์
๐ ๋ก์ปฌ ๋ฌธ์ ์์ฑ
# ๋ฌธ์ ์์ฑ (Doxygen ํ์)
cmake -DRUNE_CASTER_ENABLE_DOCS=ON ..
cmake --build . --target docs
# ๋ธ๋ผ์ฐ์ ์์ ์ด๊ธฐ
open docs/html/index.html # macOS
xdg-open docs/html/index.html # Linux
start docs/html/index.html # Windows
๐ค ์๋ ๋ฐฐํฌ
๐ ์ฌ์ฉ ์์
๊ธฐ๋ณธ Rune ์ฌ์ฉ๋ฒ
#include <iostream>
int main() {
std::cout << "Korean detected: "
<< static_cast<int>(korean.language()) << std::endl;
std::cout << "UTF-8: " << korean.to_utf8() << std::endl;
std::cout << "Is vowel: " << english.is_vowel() << std::endl;
std::cout << "Is consonant: " << english.is_consonant() << std::endl;
return 0;
}
Represents a single textual unit with Unicode and linguistic properties.
RuneSequence ์ฌ์ฉ๋ฒ
#include <iostream>
int main() {
for (const auto& rune : sequence) {
std::cout << "Char: " << rune.to_utf8()
<< ", Language: " << static_cast<int>(rune.language())
<< std::endl;
}
auto substr = sequence.substr(0, 5);
std::cout << "Substring: " << substr.to_utf8() << std::endl;
return 0;
}
static RuneString from_utf8(std::string_view utf8_text)
Create a RuneString from UTF-8 text.
๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
rune-caster/
โโโ ๐ CMakeLists.txt # ๋ฉ์ธ ๋น๋ ์ค์
โโโ ๐ include/ # ๊ณต๊ฐ ํค๋ ํ์ผ
โ โโโ rune_caster/
โ โโโ rune.hpp # Rune ํด๋์ค
โ โโโ rune_sequence.hpp # RuneSequence ์ปจํ
์ด๋
โ โโโ language.hpp # ์ธ์ด ์ฝ๋ ์ ์
โ โโโ unicode.hpp # Unicode ์ ํธ๋ฆฌํฐ
โ โโโ concepts.hpp # C++20 Concepts
โ โโโ version.hpp # ๋ฒ์ ์ ๋ณด
โโโ ๐ src/ # ๊ตฌํ ํ์ผ
โ โโโ rune/ # โ
Rune ์์คํ
(๊ตฌํ๋จ)
โ โโโ spell/ # ๐ง Spell ์๊ณ ๋ฆฌ์ฆ (์์ )
โ โโโ caster/ # ๐ง Caster ํ์ดํ๋ผ์ธ (์์ )
โ โโโ language/ # ๐ง ์ธ์ด ๋ชจ๋ (์์ )
โ โโโ phonetic/ # ๐ง ์์ฑํ์ ๋ณํ (์์ )
โโโ ๐ examples/ # ์ฌ์ฉ ์์
โ โโโ basic_usage.cpp # ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ
โ โโโ sequence_usage.cpp # ์ํ์ค ์ฌ์ฉ๋ฒ
โโโ ๐ tests/ # ํ
์คํธ ํ์ผ
โ โโโ unit/ # ๋จ์ ํ
์คํธ
โ โโโ integration/ # ํตํฉ ํ
์คํธ
โ โโโ benchmark/ # ์ฑ๋ฅ ๋ฒค์น๋งํฌ
โโโ ๐ docs/ # ๋ฌธ์
โโโ PRD.md # ํ๋ก์ ํธ ์๊ตฌ์ฌํญ
โโโ api-design.md # API ์ค๊ณ
โโโ technical-architecture.md # ๊ธฐ์ ์ํคํ
์ฒ
โโโ development-guide.md # ๊ฐ๋ฐ ๊ฐ์ด๋
๐ง CMake ๋น๋ ์ต์
์ต์
| ๊ธฐ๋ณธ๊ฐ | ์ค๋ช
|
RUNE_CASTER_ENABLE_TESTS | ON | ๋จ์ ํ
์คํธ ๋น๋ |
RUNE_CASTER_ENABLE_BENCHMARKS | OFF | ์ฑ๋ฅ ๋ฒค์น๋งํฌ ๋น๋ |
RUNE_CASTER_ENABLE_EXAMPLES | ON | ์์ ํ๋ก๊ทธ๋จ ๋น๋ |
RUNE_CASTER_ENABLE_STATIC_ANALYSIS | OFF | ์ ์ ๋ถ์ ๋๊ตฌ |
์ฌ์ฉ ์์
# ๋ชจ๋ ๊ธฐ๋ฅ ํ์ฑํ
cmake -DRUNE_CASTER_ENABLE_TESTS=ON \
-DRUNE_CASTER_ENABLE_BENCHMARKS=ON \
-DRUNE_CASTER_ENABLE_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Release ..
# ์ต์ ๋น๋ (๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ง)
cmake -DRUNE_CASTER_ENABLE_TESTS=OFF \
-DRUNE_CASTER_ENABLE_EXAMPLES=OFF ..
๐ ๋ฌธ์ ํด๊ฒฐ
์์ฃผ ๋ฐ์ํ๋ ๋ฌธ์
1. ICU ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฐพ์ ์ ์์
# ํด๊ฒฐ: ICU ์ค์น ๊ฒฝ๋ก ๋ช
์
cmake -DICU_ROOT=/usr/local ..
2. C++20 ์ปดํ์ผ๋ฌ ์ง์ ๋ถ์กฑ
# ํด๊ฒฐ: ์ต์ ์ปดํ์ผ๋ฌ ์ฌ์ฉ
sudo apt install gcc-10 g++-10
export CXX=g++-10
3. Windows์์ UTF-8 ์ถ๋ ฅ ๋ฌธ์
#ifdef _WIN32
#include <io.h>
#include <fcntl.h>
_setmode(_fileno(stdout), _O_U8TEXT);
#endif
๐ ๋ฌธ์
- API ์ค๊ณ: ์์ธํ API ๋ฌธ์
- ๊ธฐ์ ์ํคํ
์ฒ: ์์คํ
์ค๊ณ ๋ฌธ์
- ๊ฐ๋ฐ ๊ฐ์ด๋: ๊ธฐ์ฌ์๋ฅผ ์ํ ๊ฐ์ด๋
- ํ๋ก์ ํธ ์๊ตฌ์ฌํญ: ์ ์ฒด ํ๋ก์ ํธ ๋ก๋๋งต
๐ค ๊ธฐ์ฌํ๊ธฐ
- Fork ์ด ์ ์ฅ์
- Feature ๋ธ๋์น ์์ฑ (git checkout -b feature/amazing-feature)
- ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ (‘git commit -m 'Add amazing feature’)
- **๋ธ๋์น์ Push** (git push origin feature/amazing-feature`)
- Pull Request ์์ฑ
์์ธํ ๊ธฐ์ฌ ๊ฐ์ด๋๋ CONTRIBUTING.md๋ฅผ ์ฐธ์กฐํ์ธ์.
๐ ๋ผ์ด์ ์ค
์ด ํ๋ก์ ํธ๋ [MIT ๋ผ์ด์ ์ค](LICENSE) ํ์ ๋ฐฐํฌ๋ฉ๋๋ค.
๐ ๊ฐ์ฌ์ ๋ง
- STL: ์ค๊ณ ์ฒ ํ๊ณผ API ํจํด์ ์๊ฐ
- ICU: ๊ฐ๋ ฅํ ์ ๋์ฝ๋ ์ง์
- C++20: ํ๋์ ์ธ ์ธ์ด ๊ธฐ๋ฅ๋ค
โญ ์ด ํ๋ก์ ํธ๊ฐ ์ ์ฉํ๋ค๋ฉด Star๋ฅผ ๋๋ฌ์ฃผ์ธ์!