wowool-sdk-cpp 3.6.1__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wowool/native/core/wowool_sdk.cpp +655 -0
- wowool/package/lib/_wowool_plugin.cp313-win_amd64.pyd +0 -0
- wowool/package/lib/_wowool_sdk.cp313-win_amd64.pyd +0 -0
- wowool/package/lib/afst++.exe +0 -0
- wowool/package/lib/concrt140.dll +0 -0
- wowool/package/lib/icudt77.dll +0 -0
- wowool/package/lib/icuuc77.dll +0 -0
- wowool/package/lib/msvcp140.dll +0 -0
- wowool/package/lib/msvcp140_1.dll +0 -0
- wowool/package/lib/msvcp140_2.dll +0 -0
- wowool/package/lib/msvcp140_atomic_wait.dll +0 -0
- wowool/package/lib/msvcp140_codecvt_ids.dll +0 -0
- wowool/package/lib/vcruntime140.dll +0 -0
- wowool/package/lib/vcruntime140_1.dll +0 -0
- wowool/package/lib/woc++.exe +0 -0
- wowool/package/lib/wow++.exe +0 -0
- wowool/package/lib/wowool.dll +0 -0
- wowool/package/lib/wowool_plugin.py +22 -0
- wowool/package/lib/wowool_sdk.py +36 -0
- wowool/plugin/wowool_plugin.cpp +1432 -0
- wowool/plugin/wowool_plugin.hpp +157 -0
- wowool_sdk_cpp-3.6.1.dist-info/METADATA +33 -0
- wowool_sdk_cpp-3.6.1.dist-info/RECORD +25 -0
- wowool_sdk_cpp-3.6.1.dist-info/WHEEL +5 -0
- wowool_sdk_cpp-3.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// ----------------------------------------------------------------------------------
|
|
3
|
+
// Copyright (c) 2020 Wowool, All Rights Reserved.
|
|
4
|
+
// NOTICE: All information contained herein is, and remains the property of Wowool.
|
|
5
|
+
// ----------------------------------------------------------------------------------
|
|
6
|
+
#include <functional>
|
|
7
|
+
#include <pybind11/pybind11.h>
|
|
8
|
+
#include <string>
|
|
9
|
+
#include "plugins/api.hpp"
|
|
10
|
+
#include "wowool/analyzer/tir.hpp"
|
|
11
|
+
#include "wowool/common/c/plugin.h"
|
|
12
|
+
#include "wowool/common/exception.hpp"
|
|
13
|
+
#include "wowool/common/options.hpp"
|
|
14
|
+
|
|
15
|
+
namespace py = pybind11;
|
|
16
|
+
using namespace wowool;
|
|
17
|
+
|
|
18
|
+
namespace wow {
|
|
19
|
+
namespace python {
|
|
20
|
+
|
|
21
|
+
typedef std::function<bool(plugin_Annotation const *)>
|
|
22
|
+
filter_annotation_filter_type;
|
|
23
|
+
|
|
24
|
+
struct AttributesPair
|
|
25
|
+
{
|
|
26
|
+
AttributesPair();
|
|
27
|
+
|
|
28
|
+
AttributesPair(void const *n, void *v);
|
|
29
|
+
|
|
30
|
+
std::string name() const { return name_; }
|
|
31
|
+
std::string value() const { return value_; }
|
|
32
|
+
|
|
33
|
+
std::string to_string() const;
|
|
34
|
+
|
|
35
|
+
std::string name_;
|
|
36
|
+
std::string value_;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
struct python_object_attributes
|
|
40
|
+
: public std::vector<AttributesPair>
|
|
41
|
+
{
|
|
42
|
+
public:
|
|
43
|
+
// typedef std::vector<AttributesPair> container_type;
|
|
44
|
+
using std::vector<AttributesPair>::begin;
|
|
45
|
+
using std::vector<AttributesPair>::end;
|
|
46
|
+
using std::vector<AttributesPair>::size;
|
|
47
|
+
|
|
48
|
+
python_object_attributes();
|
|
49
|
+
python_object_attributes(plugin_Annotation const *cncpt_);
|
|
50
|
+
|
|
51
|
+
bool has(std::string const &key) const;
|
|
52
|
+
bool pybool() const;
|
|
53
|
+
|
|
54
|
+
std::string to_string() const;
|
|
55
|
+
plugin_Annotation const *cncpt;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// object that represent a annotation range in python.
|
|
59
|
+
struct python_object_range
|
|
60
|
+
{
|
|
61
|
+
python_object_range();
|
|
62
|
+
python_object_range(plugin_Annotation const *cncpt);
|
|
63
|
+
python_object_range(plugin_Annotation const *begin_, plugin_Annotation const *end_);
|
|
64
|
+
|
|
65
|
+
~python_object_range();
|
|
66
|
+
|
|
67
|
+
void remove_concept();
|
|
68
|
+
|
|
69
|
+
int get_begin_offset() const;
|
|
70
|
+
|
|
71
|
+
int get_end_offset() const;
|
|
72
|
+
|
|
73
|
+
std::string get_uri() const;
|
|
74
|
+
|
|
75
|
+
std::vector<python_object_range> find_with_filter(filter_annotation_filter_type const &filter);
|
|
76
|
+
|
|
77
|
+
python_object_attributes attributes();
|
|
78
|
+
|
|
79
|
+
bool has(std::string const &key) const;
|
|
80
|
+
|
|
81
|
+
std::string get_attribute(std::string const &key) const;
|
|
82
|
+
|
|
83
|
+
bool add_attribute(std::string const &key, std::string const &value);
|
|
84
|
+
|
|
85
|
+
// filter a range of annotations.
|
|
86
|
+
|
|
87
|
+
std::vector<python_object_range> regex(std::string const &uri);
|
|
88
|
+
|
|
89
|
+
python_object_range add_concept(std::string const &uri);
|
|
90
|
+
|
|
91
|
+
// implements the python calls capture["person" ]
|
|
92
|
+
// argument is a string
|
|
93
|
+
std::vector<python_object_range> get_item(std::string const &uri);
|
|
94
|
+
|
|
95
|
+
py::object find_one(std::string const &uri);
|
|
96
|
+
// implements the python calls capture.person
|
|
97
|
+
// argument is a string
|
|
98
|
+
py::object get_attr(std::string const &uri);
|
|
99
|
+
// implements the python calls capture["person","boss", .... ]
|
|
100
|
+
// argument is a tuple (a,b,c,...)
|
|
101
|
+
std::vector<python_object_range> get_item(py::tuple const &elements);
|
|
102
|
+
std::vector<python_object_range> find(std::string const &uri);
|
|
103
|
+
|
|
104
|
+
std::vector<int> find_int(std::string const &uri);
|
|
105
|
+
|
|
106
|
+
std::string repr() const;
|
|
107
|
+
|
|
108
|
+
py::list tokens();
|
|
109
|
+
|
|
110
|
+
std::string str();
|
|
111
|
+
|
|
112
|
+
std::string text();
|
|
113
|
+
std::string literal(std::string const delemiter = " ");
|
|
114
|
+
std::string canonical(std::string const delemiter = " ");
|
|
115
|
+
std::string stem(std::string const delemiter = " ");
|
|
116
|
+
std::string lemma();
|
|
117
|
+
|
|
118
|
+
void set_uri(std::string const &uri);
|
|
119
|
+
|
|
120
|
+
bool pybool() const;
|
|
121
|
+
|
|
122
|
+
mutable plugin_Annotation const *begin = nullptr;
|
|
123
|
+
mutable plugin_Annotation const *end = nullptr;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
127
|
+
|
|
128
|
+
struct python_token
|
|
129
|
+
{
|
|
130
|
+
python_token();
|
|
131
|
+
python_token(plugin_Annotation const *token_);
|
|
132
|
+
bool has_property(std::string const &prop) const;
|
|
133
|
+
std::string head() const;
|
|
134
|
+
std::string pos(int idx = 0) const;
|
|
135
|
+
std::string stem(int idx = 0) const;
|
|
136
|
+
std::string lemma(int idx = 0) const;
|
|
137
|
+
std::string str() const;
|
|
138
|
+
std::string literal() const;
|
|
139
|
+
plugin_Annotation const *token;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// the match context api.
|
|
143
|
+
struct python_object_match_context
|
|
144
|
+
{
|
|
145
|
+
python_object_match_context();
|
|
146
|
+
python_object_range capture();
|
|
147
|
+
python_object_range rule();
|
|
148
|
+
python_object_range sentence();
|
|
149
|
+
python_object_range make_range(python_object_range begin_, python_object_range end_);
|
|
150
|
+
const std::string property(std::string const &key);
|
|
151
|
+
std::string to_string();
|
|
152
|
+
std::string msg;
|
|
153
|
+
c_context context;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
} // namespace wow::python
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wowool-sdk-cpp
|
|
3
|
+
Version: 3.6.1
|
|
4
|
+
Summary: Wowool NLP Toolkit C++ SDK Python Bindings
|
|
5
|
+
Author: Wowool
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Dynamic: author
|
|
9
|
+
Dynamic: description
|
|
10
|
+
Dynamic: description-content-type
|
|
11
|
+
Dynamic: requires-python
|
|
12
|
+
Dynamic: summary
|
|
13
|
+
|
|
14
|
+
# Wowool NLP Toolkit C++ SDK Python Bindings
|
|
15
|
+
|
|
16
|
+
## Introduction
|
|
17
|
+
|
|
18
|
+
This package contains the cpp bindings of the wowool-sdk and should not be install as a separated package, install the wowool-sdk instead which contains this package.
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
In both cases you will need to acquirer a license file at https://www.wowool.com
|
|
23
|
+
|
|
24
|
+
### Non-Commercial
|
|
25
|
+
|
|
26
|
+
This library is licensed under the GNU AGPLv3 for non-commercial use.
|
|
27
|
+
For commercial use, a separate license must be purchased.
|
|
28
|
+
|
|
29
|
+
### Commercial license Terms
|
|
30
|
+
|
|
31
|
+
1. Grants the right to use this library in proprietary software.
|
|
32
|
+
2. Requires a valid license key
|
|
33
|
+
3. Redistribution in SaaS requires a commercial license.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
wowool/native/core/wowool_sdk.cpp,sha256=PEsP7lDwAuKqpX7f-Cp7-JJMzQh6-5FPqiQNQJuK2CQ,24117
|
|
2
|
+
wowool/package/lib/_wowool_plugin.cp313-win_amd64.pyd,sha256=-AXLgG6lAH6_duAb8VJLcF4XPwHFF03gWBtZM5E_Jz8,385024
|
|
3
|
+
wowool/package/lib/_wowool_sdk.cp313-win_amd64.pyd,sha256=hQAj3B2d9Iqw-PDQkj2fd2lorVKRdD3YRxqADGxJhJA,336384
|
|
4
|
+
wowool/package/lib/afst++.exe,sha256=LYScOPF85iFUF2E77KDKdUwf7HwXHFJurHrXYRfq8Yk,1261568
|
|
5
|
+
wowool/package/lib/concrt140.dll,sha256=JAU1XwpYBnslj43zPDJ-Oj1xbqrFo6Wuu3V4Qthb03Y,324208
|
|
6
|
+
wowool/package/lib/icudt77.dll,sha256=NIArlRCLdjCPSyW5kBD9mb8OTjICQe-t5RIYpTpOnuA,31898624
|
|
7
|
+
wowool/package/lib/icuuc77.dll,sha256=wyaWygGzXBsmqRRvP9dUSru-yVhqbvMHZeYY7ZwPSG0,2552320
|
|
8
|
+
wowool/package/lib/msvcp140.dll,sha256=D4hbUJpoXSu_plL-0mtfsx2I-9qwqXjGQdHHuKpGCqk,557728
|
|
9
|
+
wowool/package/lib/msvcp140_1.dll,sha256=v61a70xjpmnjwUBlXN_fOVtsl5tACkR71dy2XtiCbD0,35952
|
|
10
|
+
wowool/package/lib/msvcp140_2.dll,sha256=PqBvDuCYtII8t5WZ3zeA5_I8zlLBmqwx0qDUfv4zpek,280200
|
|
11
|
+
wowool/package/lib/msvcp140_atomic_wait.dll,sha256=ZAsq787UhNA2jupb3Qat3QZYo6cKSSVuVg1pI7QEpHk,50304
|
|
12
|
+
wowool/package/lib/msvcp140_codecvt_ids.dll,sha256=8gaaUogOyIXufwURGGEA63-toEEaK0lI-v6nc1uHihg,31872
|
|
13
|
+
wowool/package/lib/vcruntime140.dll,sha256=1eTZo-g1-meUUBRdan2U42VzpQkxcRGQTZs3EsMNkGY,124544
|
|
14
|
+
wowool/package/lib/vcruntime140_1.dll,sha256=Hy1BxKpdsLwz6_e2bXKUOoF9fObL6IBQKpQDgjYzCT8,49792
|
|
15
|
+
wowool/package/lib/woc++.exe,sha256=k0H599BwCX7vlgcd1ZldDDJcCsJVmp2nPim8ul4hTvY,333824
|
|
16
|
+
wowool/package/lib/wow++.exe,sha256=Bo3ZVjT6ADFxa4K3v5HHX0lq59_VW-enS2NeVTKD_OE,1863680
|
|
17
|
+
wowool/package/lib/wowool.dll,sha256=xNs1tQQohkHdDtT-67HwRayzteV23XT76aNAnOUq5z8,6852096
|
|
18
|
+
wowool/package/lib/wowool_plugin.py,sha256=JuKPK3AODJYry0d8fTZwqyJzIis5G5rFMDDO6Ry0xKE,670
|
|
19
|
+
wowool/package/lib/wowool_sdk.py,sha256=jGKmZRCqAEoCqohvysjUiUgR16lOd2lLPdEhWUikRNM,866
|
|
20
|
+
wowool/plugin/wowool_plugin.cpp,sha256=P9_l7K0d_jHft7iZtlOpxduSiJOMF8bzlJf_UZOGukY,43488
|
|
21
|
+
wowool/plugin/wowool_plugin.hpp,sha256=U8rEsazjbhUGvAfVD6-wpYskuBP9JijAa2LIjQHHZqA,4388
|
|
22
|
+
wowool_sdk_cpp-3.6.1.dist-info/METADATA,sha256=CUEGTzYTPknW0-A3fejEQonqAp3lDMsrmN1F5aIYxfg,1024
|
|
23
|
+
wowool_sdk_cpp-3.6.1.dist-info/WHEEL,sha256=x5Wpw_tLx5PQKiWdxpqvs0e7Sg-SO0mTWdEADYDGPGA,101
|
|
24
|
+
wowool_sdk_cpp-3.6.1.dist-info/top_level.txt,sha256=zerqoDN-iHSHwsS1SN2h0q4H6RI1FOVeHW8fNQC9YdU,7
|
|
25
|
+
wowool_sdk_cpp-3.6.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wowool
|