Debian Codegraph @

doc/source/example/reference/tokenizers/token-ngram-loose-symbol-and-loose-blank.log

raw
1 Execution example::
2
3 tokenize --tokenizer 'TokenNgram("loose_symbol", true, "loose_blank", true)' --string "0123(45)6789" --normalizer NormalizerAuto
4 # [
5 # [
6 # 0,
7 # 1337566253.89858,
8 # 0.000355720520019531
9 # ],
10 # [
11 # {
12 # "value": "0123",
13 # "position": 0,
14 # "force_prefix": false,
15 # "force_prefix_search": false
16 # },
17 # {
18 # "value": "(",
19 # "position": 1,
20 # "force_prefix": false,
21 # "force_prefix_search": false
22 # },
23 # {
24 # "value": "45",
25 # "position": 2,
26 # "force_prefix": false,
27 # "force_prefix_search": false
28 # },
29 # {
30 # "value": ")",
31 # "position": 3,
32 # "force_prefix": false,
33 # "force_prefix_search": false
34 # },
35 # {
36 # "value": "6789",
37 # "position": 4,
38 # "force_prefix": false,
39 # "force_prefix_search": false
40 # },
41 # {
42 # "value": "￰",
43 # "position": 5,
44 # "force_prefix": false,
45 # "force_prefix_search": false
46 # },
47 # {
48 # "value": "0123456789",
49 # "position": 6,
50 # "force_prefix": false,
51 # "force_prefix_search": false
52 # }
53 # ]
54 # ]
55 tokenize --tokenizer 'TokenNgram("loose_symbol", true, "loose_blank", true)' --string "0123-45-6789" --normalizer NormalizerAuto
56 # [
57 # [
58 # 0,
59 # 1337566253.89858,
60 # 0.000355720520019531
61 # ],
62 # [
63 # {
64 # "value": "0123",
65 # "position": 0,
66 # "force_prefix": false,
67 # "force_prefix_search": false
68 # },
69 # {
70 # "value": "-",
71 # "position": 1,
72 # "force_prefix": false,
73 # "force_prefix_search": false
74 # },
75 # {
76 # "value": "45",
77 # "position": 2,
78 # "force_prefix": false,
79 # "force_prefix_search": false
80 # },
81 # {
82 # "value": "-",
83 # "position": 3,
84 # "force_prefix": false,
85 # "force_prefix_search": false
86 # },
87 # {
88 # "value": "6789",
89 # "position": 4,
90 # "force_prefix": false,
91 # "force_prefix_search": false
92 # },
93 # {
94 # "value": "￰",
95 # "position": 5,
96 # "force_prefix": false,
97 # "force_prefix_search": false
98 # },
99 # {
100 # "value": "0123456789",
101 # "position": 6,
102 # "force_prefix": false,
103 # "force_prefix_search": false
104 # }
105 # ]
106 # ]
107 tokenize --tokenizer 'TokenNgram("loose_symbol", true, "loose_blank", true)' --string "0123 45 6789" --normalizer NormalizerAuto
108 # [
109 # [
110 # 0,
111 # 1337566253.89858,
112 # 0.000355720520019531
113 # ],
114 # [
115 # {
116 # "value": "0123",
117 # "position": 0,
118 # "force_prefix": false,
119 # "force_prefix_search": false
120 # },
121 # {
122 # "value": "45",
123 # "position": 1,
124 # "force_prefix": false,
125 # "force_prefix_search": false
126 # },
127 # {
128 # "value": "6789",
129 # "position": 2,
130 # "force_prefix": false,
131 # "force_prefix_search": false
132 # },
133 # {
134 # "value": "￰",
135 # "position": 3,
136 # "force_prefix": false,
137 # "force_prefix_search": false
138 # },
139 # {
140 # "value": "0123456789",
141 # "position": 4,
142 # "force_prefix": false,
143 # "force_prefix_search": false
144 # }
145 # ]
146 # ]