Skip to content

Commit

Permalink
Merge pull request #46 from bab2min/documentation
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
bab2min authored Sep 11, 2021
2 parents ebd7ba8 + 5a52c6f commit 0c05a42
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion include/kiwi/BitEncoder.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include <vector>
#include <array>
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/BitUtils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <cstdint>

#if defined(__SSE2__) || defined(__AVX2__)
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/FixedVector.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <memory>

namespace kiwi
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/Form.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @file Form.h
* @author bab2min ([email protected])
* @brief 형태 및 형태소에 관한 정보를 담는 구조체들이 선언된 헤더
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/FrozenTrie.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include <array>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion include/kiwi/Kiwi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @file Kiwi.h
* @author bab2min ([email protected])
* @brief Kiwi C++ API를 담고 있는 헤더 파일
Expand All @@ -11,6 +11,7 @@

#include <iostream>
#include <future>
#include "Macro.h"
#include "Types.h"
#include "Form.h"
#include "Utils.h"
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/Knlm.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include <array>
#include <vector>
Expand Down
10 changes: 10 additions & 0 deletions include/kiwi/Macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

#define KIWI_STR_HELPER(x) #x
#define KIWI_STR(x) KIWI_STR_HELPER(x)

#define KIWI_VERSION_MAJOR 0
#define KIWI_VERSION_MINOR 10
#define KIWI_VERSION_PATCH 1

#define KIWI_VERSION_STRING KIWI_STR(KIWI_VERSION_MAJOR) "." KIWI_STR(KIWI_VERSION_MINOR) "." KIWI_STR(KIWI_VERSION_PATCH)
2 changes: 1 addition & 1 deletion include/kiwi/Mmap.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <string>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/PatternMatcher.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include <vector>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/ThreadPool.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

/*
A simple C++11 Thread Pool implementation(https://github.com/progschj/ThreadPool)
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/Trainer.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#pragma once
#pragma once
2 changes: 1 addition & 1 deletion include/kiwi/Trie.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <vector>
#include <map>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/Types.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @file Types.h
* @author bab2min ([email protected])
* @brief Kiwi C++ API에 쓰이는 주요 타입들을 모아놓은 헤더 파일
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/Utils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <iostream>
#include <string>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion include/kiwi/WordDetector.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once

#include <kiwi/Types.h>

Expand Down
4 changes: 3 additions & 1 deletion include/kiwi/capi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @file capi.h
* @author bab2min ([email protected])
* @brief Kiwi C API를 담고 있는 헤더 파일
Expand All @@ -10,6 +10,8 @@

#pragma once

#include "Macro.h"

#define KIWIERR_FAIL -1
#define KIWIERR_INVALID_HANDLE -2
#define KIWIERR_INVALID_INDEX -3
Expand Down
1 change: 1 addition & 0 deletions kiwi_shared_library.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<ClInclude Include="include\kiwi\FrozenTrie.h" />
<ClInclude Include="include\kiwi\Kiwi.h" />
<ClInclude Include="include\kiwi\Knlm.h" />
<ClInclude Include="include\kiwi\Macro.h" />
<ClInclude Include="include\kiwi\Mmap.h" />
<ClInclude Include="include\kiwi\PatternMatcher.h" />
<ClInclude Include="include\kiwi\ThreadPool.h" />
Expand Down
3 changes: 3 additions & 0 deletions kiwi_shared_library.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
<ClInclude Include="include\kiwi\BitUtils.h">
<Filter>Header Files\kiwi</Filter>
</ClInclude>
<ClInclude Include="include\kiwi\Macro.h">
<Filter>Header Files\kiwi</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Form.cpp">
Expand Down
3 changes: 1 addition & 2 deletions src/capi/kiwi_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ using namespace kiwi;

const char* kiwi_version()
{
//return Kiwi::getVersion();
return nullptr;
return KIWI_VERSION_STRING;
}

struct ResultBuffer
Expand Down

0 comments on commit 0c05a42

Please sign in to comment.