File: yaz-icu.1

package info (click to toggle)
yaz 3.0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,404 kB
  • ctags: 12,108
  • sloc: xml: 116,075; ansic: 52,205; sh: 9,746; tcl: 2,043; makefile: 1,141; yacc: 347
file content (188 lines) | stat: -rw-r--r-- 3,607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
.\"     Title: yaz-icu
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\"      Date: 06/18/2008
.\"    Manual: 
.\"    Source: YAZ 3.0.34
.\"
.TH "YAZ\-ICU" "1" "06/18/2008" "YAZ 3.0.34" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
yaz-icu \- YAZ ICU utility
.SH "SYNOPSIS"
.HP 8
\fByaz\-icu\fR [commands...] [\-c\ \fIconfig\fR] [\-p\ \fIopt\fR] [\-x]
.SH "DESCRIPTION"
.PP

\fByaz\-icu\fR
is utility which demonstrates the ICU chain module of yaz\&. (\fIyaz/icu\&.h\fR)\&.
.SH "OPTIONS"
.PP
\-c \fIconfig\fR
.RS 4
Specifies the file containing ICU chain configuration which is XML based\&.
.RE
.PP
\-p \fItype\fR
.RS 4
Specifies extra information to be printed about the ICU system\&. If
\fItype\fR
is
c
then ICU converters are printed\&. If
\fItype\fR
is
l
available locales are printed\&. If
\fItype\fR
is
t
available transliterators are printed\&.
.RE
.PP
\-x \fIconfig\fR
.RS 4
Specifies that output should be XML based rather than "text" based\&.
.RE
.SH "ICU CHAIN CONFIGURATION"
.PP
The ICU chain configuration speicifies one or more rules to convert text data into tokens\&. The configuration format is XML based\&.
.PP
The toplevel element must be named
icu_chain\&. The
icu_chain
element has one required attribute
locale
which specifies the ICU locale to be used in the conversion steps\&.
.PP
The
icu_chain
element must include elements where each element specifies a conversion step\&. The conversion is performed in the order in which the conversion steps are specified\&. Each conversion element takes one attribute:
rule
which serves as argument to the conversion step\&.
.PP
The following conversion elements are available:
.PP
casemap
.RS 4
Converts case and rule specifies how:
.PP
l
.RS 4
Lowercase using ICU function u_strToLower\&.
.RE
.PP
u
.RS 4
Upper case using ICU function u_strToUpper\&.
.RE
.PP
t
.RS 4
To title using UCU function u_strToTitle\&.
.RE
.PP
f
.RS 4
Fold case using ICU function u_strFoldCase\&.
.RE
.sp
.RE
.PP
display
.RS 4
This is a meta step which specifies that a term/token is to be displayed\&. This term is retrieved in an application using function icu_chain_token_display (\fIyaz/icu\&.h\fR)\&.
.RE
.PP
transform
.RS 4
Specifies an ICU transform rule\&. The rule attribute is the custom transformation rule to be used\&. This is a text based format which is offered by the ICU transform system\&. See
\fIICU Transforms\fR\&[1]
for more information\&.
.RE
.PP
tokenize
.RS 4
Breaks / tokenizes a string into components using ICU functions ubrk_open, ubrk_setText, \&.\&. \&. The rule is one of:
.PP
l
.RS 4
Line\&. ICU: UBRK_LINE\&.
.RE
.PP
s
.RS 4
Sentence\&. ICU: UBRK_SENTENCE\&.
.RE
.PP
w
.RS 4
Word\&. ICU: UBRK_WORD\&.
.RE
.PP
c
.RS 4
Character\&. ICU: UBRK_CHARACTER\&.
.RE
.PP
t
.RS 4
Title\&. ICU: UBRK_TITLE\&.
.RE
.sp
.RE
.SH "EXAMPLES"
.PP
The following command analyzes text in file
\fItext\fR
using ICU chain configuration
\fIchain\&.xml\fR:
.sp
.RS 4
.nf
    cat text | yaz\-icu \-c chain\&.xml
   
.fi
.RE
.sp
The chain\&.xml might look as follows:
.sp
.RS 4
.nf
<icu_chain locale="en">
  <transform rule="[:Control:] Any\-Remove"/>
  <tokenize rule="w"/>
  <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
  <display/>
  <casemap rule="l"/>
</icu_chain>

   
.fi
.RE
.sp
.SH "SEE ALSO"
.PP

\fByaz\fR(7)
.PP

\fIICU Home\fR\&[2]
.PP

\fIICU Transforms\fR\&[1]
.SH "NOTES"
.IP " 1." 4
ICU Transforms
.RS 4
\%http://www.icu-project.org/userguide/Transform.html
.RE
.IP " 2." 4
ICU Home
.RS 4
\%http://www.icu-project.org/
.RE