pinyin 0.0.1 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ == 0.1.3 / 2008-07-18
2
+
3
+ * made compatible with the latest release of Facets
4
+
5
+ == 0.1.0 / 2007-12-14
6
+
7
+ * Converted to Hoe, bugfixes
8
+
9
+ == 0.0.1 / 2007-07-26
10
+
11
+ * Birthday!
12
+
@@ -0,0 +1,31 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ TODO
6
+ examples/cgiform/cgiform.rb
7
+ examples/cgiform/template.rhtml
8
+ examples/hello.rb
9
+ lib/pinyin.rb
10
+ lib/pinyin/conversion.rb
11
+ lib/pinyin/conversions.rb
12
+ lib/pinyin/conversions/hanyu.rb
13
+ lib/pinyin/data/comparison.csv
14
+ lib/pinyin/data/final.csv
15
+ lib/pinyin/data/initial.csv
16
+ lib/pinyin/data/paladiy.txt
17
+ lib/pinyin/data/rules.yaml
18
+ lib/pinyin/data/valid_pinyin.yaml
19
+ lib/pinyin/exception.rb
20
+ lib/pinyin/groundwork.rb
21
+ lib/pinyin/string.rb
22
+ lib/pinyin/support.rb
23
+ lib/pinyin/tones.rb
24
+ lib/pinyin/tones/accents.rb
25
+ lib/pinyin/tones/marks.rb
26
+ lib/pinyin/tones/no_tones.rb
27
+ lib/pinyin/tones/numbers.rb
28
+ rakefile
29
+ script/update
30
+ test/test_comparison.rb
31
+ test/test_hanyu_coverage.rb
@@ -0,0 +1,725 @@
1
+ pinyin
2
+ by Arne Brasseur
3
+
4
+ == DESCRIPTION:
5
+
6
+ Pinyin can convert between various systems for phonetically
7
+ writing Mandarin Chinese. It can also handle various representation
8
+ of tones, so it can be used to convert pinyin with numbers
9
+ to pinyin with tones.
10
+
11
+ Supported formats include Hanyu Pinyin, Bopomofo, Wade-Giles
12
+ and International Phonetic Alphabet (IPA).
13
+
14
+ == FEATURES/PROBLEMS:
15
+
16
+ == SYNOPSIS:
17
+
18
+ require 'pinyin'
19
+
20
+ reader = Pinyin::Reader.new(:hanyu, :tones)
21
+ reader << "wo3 ai4 ni3"
22
+ # => [<Pinyin::Syllable <initial=Empty, final=Uo, tone=3>>,
23
+ # <Pinyin::Syllable <initial=Empty, final=Ai, tone=4>>,
24
+ # <Pinyin::Syllable <initial=Ne, final=I, tone=3>>]
25
+
26
+ writer = Pinyin::Writer.new(:zhuyin, :marks)
27
+
28
+ writer << (reader << "wo3 ai4 ni3")
29
+ # => "ㄨㄛˇ ㄞˋ ㄋㄧˇ"
30
+
31
+ require 'pinyin/string'
32
+
33
+ "wo3 ai4 ni3".pretty_tones
34
+ # => "wǒ ài nǐ"
35
+
36
+ == REQUIREMENTS:
37
+
38
+ * $KCODE has to be set to "UTF8" for everything to work correctly
39
+ * Facets
40
+
41
+ == INSTALL:
42
+
43
+ * sudo gem install marky --source http://gems.arnebrasseur.net
44
+
45
+ == LICENSE:
46
+
47
+ The GPLv3 License
48
+
49
+ Copyright (c) 2004-2007, Arne Brasseur. (http://www.arnebrasseur.net)
50
+ All rights reserved.
51
+
52
+ GNU GENERAL PUBLIC LICENSE
53
+ Version 3, 29 June 2007
54
+
55
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
56
+ Everyone is permitted to copy and distribute verbatim copies
57
+ of this license document, but changing it is not allowed.
58
+
59
+ Preamble
60
+
61
+ The GNU General Public License is a free, copyleft license for
62
+ software and other kinds of works.
63
+
64
+ The licenses for most software and other practical works are designed
65
+ to take away your freedom to share and change the works. By contrast,
66
+ the GNU General Public License is intended to guarantee your freedom to
67
+ share and change all versions of a program--to make sure it remains free
68
+ software for all its users. We, the Free Software Foundation, use the
69
+ GNU General Public License for most of our software; it applies also to
70
+ any other work released this way by its authors. You can apply it to
71
+ your programs, too.
72
+
73
+ When we speak of free software, we are referring to freedom, not
74
+ price. Our General Public Licenses are designed to make sure that you
75
+ have the freedom to distribute copies of free software (and charge for
76
+ them if you wish), that you receive source code or can get it if you
77
+ want it, that you can change the software or use pieces of it in new
78
+ free programs, and that you know you can do these things.
79
+
80
+ To protect your rights, we need to prevent others from denying you
81
+ these rights or asking you to surrender the rights. Therefore, you have
82
+ certain responsibilities if you distribute copies of the software, or if
83
+ you modify it: responsibilities to respect the freedom of others.
84
+
85
+ For example, if you distribute copies of such a program, whether
86
+ gratis or for a fee, you must pass on to the recipients the same
87
+ freedoms that you received. You must make sure that they, too, receive
88
+ or can get the source code. And you must show them these terms so they
89
+ know their rights.
90
+
91
+ Developers that use the GNU GPL protect your rights with two steps:
92
+ (1) assert copyright on the software, and (2) offer you this License
93
+ giving you legal permission to copy, distribute and/or modify it.
94
+
95
+ For the developers' and authors' protection, the GPL clearly explains
96
+ that there is no warranty for this free software. For both users' and
97
+ authors' sake, the GPL requires that modified versions be marked as
98
+ changed, so that their problems will not be attributed erroneously to
99
+ authors of previous versions.
100
+
101
+ Some devices are designed to deny users access to install or run
102
+ modified versions of the software inside them, although the manufacturer
103
+ can do so. This is fundamentally incompatible with the aim of
104
+ protecting users' freedom to change the software. The systematic
105
+ pattern of such abuse occurs in the area of products for individuals to
106
+ use, which is precisely where it is most unacceptable. Therefore, we
107
+ have designed this version of the GPL to prohibit the practice for those
108
+ products. If such problems arise substantially in other domains, we
109
+ stand ready to extend this provision to those domains in future versions
110
+ of the GPL, as needed to protect the freedom of users.
111
+
112
+ Finally, every program is threatened constantly by software patents.
113
+ States should not allow patents to restrict development and use of
114
+ software on general-purpose computers, but in those that do, we wish to
115
+ avoid the special danger that patents applied to a free program could
116
+ make it effectively proprietary. To prevent this, the GPL assures that
117
+ patents cannot be used to render the program non-free.
118
+
119
+ The precise terms and conditions for copying, distribution and
120
+ modification follow.
121
+
122
+ TERMS AND CONDITIONS
123
+
124
+ 0. Definitions.
125
+
126
+ "This License" refers to version 3 of the GNU General Public License.
127
+
128
+ "Copyright" also means copyright-like laws that apply to other kinds of
129
+ works, such as semiconductor masks.
130
+
131
+ "The Program" refers to any copyrightable work licensed under this
132
+ License. Each licensee is addressed as "you". "Licensees" and
133
+ "recipients" may be individuals or organizations.
134
+
135
+ To "modify" a work means to copy from or adapt all or part of the work
136
+ in a fashion requiring copyright permission, other than the making of an
137
+ exact copy. The resulting work is called a "modified version" of the
138
+ earlier work or a work "based on" the earlier work.
139
+
140
+ A "covered work" means either the unmodified Program or a work based
141
+ on the Program.
142
+
143
+ To "propagate" a work means to do anything with it that, without
144
+ permission, would make you directly or secondarily liable for
145
+ infringement under applicable copyright law, except executing it on a
146
+ computer or modifying a private copy. Propagation includes copying,
147
+ distribution (with or without modification), making available to the
148
+ public, and in some countries other activities as well.
149
+
150
+ To "convey" a work means any kind of propagation that enables other
151
+ parties to make or receive copies. Mere interaction with a user through
152
+ a computer network, with no transfer of a copy, is not conveying.
153
+
154
+ An interactive user interface displays "Appropriate Legal Notices"
155
+ to the extent that it includes a convenient and prominently visible
156
+ feature that (1) displays an appropriate copyright notice, and (2)
157
+ tells the user that there is no warranty for the work (except to the
158
+ extent that warranties are provided), that licensees may convey the
159
+ work under this License, and how to view a copy of this License. If
160
+ the interface presents a list of user commands or options, such as a
161
+ menu, a prominent item in the list meets this criterion.
162
+
163
+ 1. Source Code.
164
+
165
+ The "source code" for a work means the preferred form of the work
166
+ for making modifications to it. "Object code" means any non-source
167
+ form of a work.
168
+
169
+ A "Standard Interface" means an interface that either is an official
170
+ standard defined by a recognized standards body, or, in the case of
171
+ interfaces specified for a particular programming language, one that
172
+ is widely used among developers working in that language.
173
+
174
+ The "System Libraries" of an executable work include anything, other
175
+ than the work as a whole, that (a) is included in the normal form of
176
+ packaging a Major Component, but which is not part of that Major
177
+ Component, and (b) serves only to enable use of the work with that
178
+ Major Component, or to implement a Standard Interface for which an
179
+ implementation is available to the public in source code form. A
180
+ "Major Component", in this context, means a major essential component
181
+ (kernel, window system, and so on) of the specific operating system
182
+ (if any) on which the executable work runs, or a compiler used to
183
+ produce the work, or an object code interpreter used to run it.
184
+
185
+ The "Corresponding Source" for a work in object code form means all
186
+ the source code needed to generate, install, and (for an executable
187
+ work) run the object code and to modify the work, including scripts to
188
+ control those activities. However, it does not include the work's
189
+ System Libraries, or general-purpose tools or generally available free
190
+ programs which are used unmodified in performing those activities but
191
+ which are not part of the work. For example, Corresponding Source
192
+ includes interface definition files associated with source files for
193
+ the work, and the source code for shared libraries and dynamically
194
+ linked subprograms that the work is specifically designed to require,
195
+ such as by intimate data communication or control flow between those
196
+ subprograms and other parts of the work.
197
+
198
+ The Corresponding Source need not include anything that users
199
+ can regenerate automatically from other parts of the Corresponding
200
+ Source.
201
+
202
+ The Corresponding Source for a work in source code form is that
203
+ same work.
204
+
205
+ 2. Basic Permissions.
206
+
207
+ All rights granted under this License are granted for the term of
208
+ copyright on the Program, and are irrevocable provided the stated
209
+ conditions are met. This License explicitly affirms your unlimited
210
+ permission to run the unmodified Program. The output from running a
211
+ covered work is covered by this License only if the output, given its
212
+ content, constitutes a covered work. This License acknowledges your
213
+ rights of fair use or other equivalent, as provided by copyright law.
214
+
215
+ You may make, run and propagate covered works that you do not
216
+ convey, without conditions so long as your license otherwise remains
217
+ in force. You may convey covered works to others for the sole purpose
218
+ of having them make modifications exclusively for you, or provide you
219
+ with facilities for running those works, provided that you comply with
220
+ the terms of this License in conveying all material for which you do
221
+ not control copyright. Those thus making or running the covered works
222
+ for you must do so exclusively on your behalf, under your direction
223
+ and control, on terms that prohibit them from making any copies of
224
+ your copyrighted material outside their relationship with you.
225
+
226
+ Conveying under any other circumstances is permitted solely under
227
+ the conditions stated below. Sublicensing is not allowed; section 10
228
+ makes it unnecessary.
229
+
230
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
231
+
232
+ No covered work shall be deemed part of an effective technological
233
+ measure under any applicable law fulfilling obligations under article
234
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
235
+ similar laws prohibiting or restricting circumvention of such
236
+ measures.
237
+
238
+ When you convey a covered work, you waive any legal power to forbid
239
+ circumvention of technological measures to the extent such circumvention
240
+ is effected by exercising rights under this License with respect to
241
+ the covered work, and you disclaim any intention to limit operation or
242
+ modification of the work as a means of enforcing, against the work's
243
+ users, your or third parties' legal rights to forbid circumvention of
244
+ technological measures.
245
+
246
+ 4. Conveying Verbatim Copies.
247
+
248
+ You may convey verbatim copies of the Program's source code as you
249
+ receive it, in any medium, provided that you conspicuously and
250
+ appropriately publish on each copy an appropriate copyright notice;
251
+ keep intact all notices stating that this License and any
252
+ non-permissive terms added in accord with section 7 apply to the code;
253
+ keep intact all notices of the absence of any warranty; and give all
254
+ recipients a copy of this License along with the Program.
255
+
256
+ You may charge any price or no price for each copy that you convey,
257
+ and you may offer support or warranty protection for a fee.
258
+
259
+ 5. Conveying Modified Source Versions.
260
+
261
+ You may convey a work based on the Program, or the modifications to
262
+ produce it from the Program, in the form of source code under the
263
+ terms of section 4, provided that you also meet all of these conditions:
264
+
265
+ a) The work must carry prominent notices stating that you modified
266
+ it, and giving a relevant date.
267
+
268
+ b) The work must carry prominent notices stating that it is
269
+ released under this License and any conditions added under section
270
+ 7. This requirement modifies the requirement in section 4 to
271
+ "keep intact all notices".
272
+
273
+ c) You must license the entire work, as a whole, under this
274
+ License to anyone who comes into possession of a copy. This
275
+ License will therefore apply, along with any applicable section 7
276
+ additional terms, to the whole of the work, and all its parts,
277
+ regardless of how they are packaged. This License gives no
278
+ permission to license the work in any other way, but it does not
279
+ invalidate such permission if you have separately received it.
280
+
281
+ d) If the work has interactive user interfaces, each must display
282
+ Appropriate Legal Notices; however, if the Program has interactive
283
+ interfaces that do not display Appropriate Legal Notices, your
284
+ work need not make them do so.
285
+
286
+ A compilation of a covered work with other separate and independent
287
+ works, which are not by their nature extensions of the covered work,
288
+ and which are not combined with it such as to form a larger program,
289
+ in or on a volume of a storage or distribution medium, is called an
290
+ "aggregate" if the compilation and its resulting copyright are not
291
+ used to limit the access or legal rights of the compilation's users
292
+ beyond what the individual works permit. Inclusion of a covered work
293
+ in an aggregate does not cause this License to apply to the other
294
+ parts of the aggregate.
295
+
296
+ 6. Conveying Non-Source Forms.
297
+
298
+ You may convey a covered work in object code form under the terms
299
+ of sections 4 and 5, provided that you also convey the
300
+ machine-readable Corresponding Source under the terms of this License,
301
+ in one of these ways:
302
+
303
+ a) Convey the object code in, or embodied in, a physical product
304
+ (including a physical distribution medium), accompanied by the
305
+ Corresponding Source fixed on a durable physical medium
306
+ customarily used for software interchange.
307
+
308
+ b) Convey the object code in, or embodied in, a physical product
309
+ (including a physical distribution medium), accompanied by a
310
+ written offer, valid for at least three years and valid for as
311
+ long as you offer spare parts or customer support for that product
312
+ model, to give anyone who possesses the object code either (1) a
313
+ copy of the Corresponding Source for all the software in the
314
+ product that is covered by this License, on a durable physical
315
+ medium customarily used for software interchange, for a price no
316
+ more than your reasonable cost of physically performing this
317
+ conveying of source, or (2) access to copy the
318
+ Corresponding Source from a network server at no charge.
319
+
320
+ c) Convey individual copies of the object code with a copy of the
321
+ written offer to provide the Corresponding Source. This
322
+ alternative is allowed only occasionally and noncommercially, and
323
+ only if you received the object code with such an offer, in accord
324
+ with subsection 6b.
325
+
326
+ d) Convey the object code by offering access from a designated
327
+ place (gratis or for a charge), and offer equivalent access to the
328
+ Corresponding Source in the same way through the same place at no
329
+ further charge. You need not require recipients to copy the
330
+ Corresponding Source along with the object code. If the place to
331
+ copy the object code is a network server, the Corresponding Source
332
+ may be on a different server (operated by you or a third party)
333
+ that supports equivalent copying facilities, provided you maintain
334
+ clear directions next to the object code saying where to find the
335
+ Corresponding Source. Regardless of what server hosts the
336
+ Corresponding Source, you remain obligated to ensure that it is
337
+ available for as long as needed to satisfy these requirements.
338
+
339
+ e) Convey the object code using peer-to-peer transmission, provided
340
+ you inform other peers where the object code and Corresponding
341
+ Source of the work are being offered to the general public at no
342
+ charge under subsection 6d.
343
+
344
+ A separable portion of the object code, whose source code is excluded
345
+ from the Corresponding Source as a System Library, need not be
346
+ included in conveying the object code work.
347
+
348
+ A "User Product" is either (1) a "consumer product", which means any
349
+ tangible personal property which is normally used for personal, family,
350
+ or household purposes, or (2) anything designed or sold for incorporation
351
+ into a dwelling. In determining whether a product is a consumer product,
352
+ doubtful cases shall be resolved in favor of coverage. For a particular
353
+ product received by a particular user, "normally used" refers to a
354
+ typical or common use of that class of product, regardless of the status
355
+ of the particular user or of the way in which the particular user
356
+ actually uses, or expects or is expected to use, the product. A product
357
+ is a consumer product regardless of whether the product has substantial
358
+ commercial, industrial or non-consumer uses, unless such uses represent
359
+ the only significant mode of use of the product.
360
+
361
+ "Installation Information" for a User Product means any methods,
362
+ procedures, authorization keys, or other information required to install
363
+ and execute modified versions of a covered work in that User Product from
364
+ a modified version of its Corresponding Source. The information must
365
+ suffice to ensure that the continued functioning of the modified object
366
+ code is in no case prevented or interfered with solely because
367
+ modification has been made.
368
+
369
+ If you convey an object code work under this section in, or with, or
370
+ specifically for use in, a User Product, and the conveying occurs as
371
+ part of a transaction in which the right of possession and use of the
372
+ User Product is transferred to the recipient in perpetuity or for a
373
+ fixed term (regardless of how the transaction is characterized), the
374
+ Corresponding Source conveyed under this section must be accompanied
375
+ by the Installation Information. But this requirement does not apply
376
+ if neither you nor any third party retains the ability to install
377
+ modified object code on the User Product (for example, the work has
378
+ been installed in ROM).
379
+
380
+ The requirement to provide Installation Information does not include a
381
+ requirement to continue to provide support service, warranty, or updates
382
+ for a work that has been modified or installed by the recipient, or for
383
+ the User Product in which it has been modified or installed. Access to a
384
+ network may be denied when the modification itself materially and
385
+ adversely affects the operation of the network or violates the rules and
386
+ protocols for communication across the network.
387
+
388
+ Corresponding Source conveyed, and Installation Information provided,
389
+ in accord with this section must be in a format that is publicly
390
+ documented (and with an implementation available to the public in
391
+ source code form), and must require no special password or key for
392
+ unpacking, reading or copying.
393
+
394
+ 7. Additional Terms.
395
+
396
+ "Additional permissions" are terms that supplement the terms of this
397
+ License by making exceptions from one or more of its conditions.
398
+ Additional permissions that are applicable to the entire Program shall
399
+ be treated as though they were included in this License, to the extent
400
+ that they are valid under applicable law. If additional permissions
401
+ apply only to part of the Program, that part may be used separately
402
+ under those permissions, but the entire Program remains governed by
403
+ this License without regard to the additional permissions.
404
+
405
+ When you convey a copy of a covered work, you may at your option
406
+ remove any additional permissions from that copy, or from any part of
407
+ it. (Additional permissions may be written to require their own
408
+ removal in certain cases when you modify the work.) You may place
409
+ additional permissions on material, added by you to a covered work,
410
+ for which you have or can give appropriate copyright permission.
411
+
412
+ Notwithstanding any other provision of this License, for material you
413
+ add to a covered work, you may (if authorized by the copyright holders of
414
+ that material) supplement the terms of this License with terms:
415
+
416
+ a) Disclaiming warranty or limiting liability differently from the
417
+ terms of sections 15 and 16 of this License; or
418
+
419
+ b) Requiring preservation of specified reasonable legal notices or
420
+ author attributions in that material or in the Appropriate Legal
421
+ Notices displayed by works containing it; or
422
+
423
+ c) Prohibiting misrepresentation of the origin of that material, or
424
+ requiring that modified versions of such material be marked in
425
+ reasonable ways as different from the original version; or
426
+
427
+ d) Limiting the use for publicity purposes of names of licensors or
428
+ authors of the material; or
429
+
430
+ e) Declining to grant rights under trademark law for use of some
431
+ trade names, trademarks, or service marks; or
432
+
433
+ f) Requiring indemnification of licensors and authors of that
434
+ material by anyone who conveys the material (or modified versions of
435
+ it) with contractual assumptions of liability to the recipient, for
436
+ any liability that these contractual assumptions directly impose on
437
+ those licensors and authors.
438
+
439
+ All other non-permissive additional terms are considered "further
440
+ restrictions" within the meaning of section 10. If the Program as you
441
+ received it, or any part of it, contains a notice stating that it is
442
+ governed by this License along with a term that is a further
443
+ restriction, you may remove that term. If a license document contains
444
+ a further restriction but permits relicensing or conveying under this
445
+ License, you may add to a covered work material governed by the terms
446
+ of that license document, provided that the further restriction does
447
+ not survive such relicensing or conveying.
448
+
449
+ If you add terms to a covered work in accord with this section, you
450
+ must place, in the relevant source files, a statement of the
451
+ additional terms that apply to those files, or a notice indicating
452
+ where to find the applicable terms.
453
+
454
+ Additional terms, permissive or non-permissive, may be stated in the
455
+ form of a separately written license, or stated as exceptions;
456
+ the above requirements apply either way.
457
+
458
+ 8. Termination.
459
+
460
+ You may not propagate or modify a covered work except as expressly
461
+ provided under this License. Any attempt otherwise to propagate or
462
+ modify it is void, and will automatically terminate your rights under
463
+ this License (including any patent licenses granted under the third
464
+ paragraph of section 11).
465
+
466
+ However, if you cease all violation of this License, then your
467
+ license from a particular copyright holder is reinstated (a)
468
+ provisionally, unless and until the copyright holder explicitly and
469
+ finally terminates your license, and (b) permanently, if the copyright
470
+ holder fails to notify you of the violation by some reasonable means
471
+ prior to 60 days after the cessation.
472
+
473
+ Moreover, your license from a particular copyright holder is
474
+ reinstated permanently if the copyright holder notifies you of the
475
+ violation by some reasonable means, this is the first time you have
476
+ received notice of violation of this License (for any work) from that
477
+ copyright holder, and you cure the violation prior to 30 days after
478
+ your receipt of the notice.
479
+
480
+ Termination of your rights under this section does not terminate the
481
+ licenses of parties who have received copies or rights from you under
482
+ this License. If your rights have been terminated and not permanently
483
+ reinstated, you do not qualify to receive new licenses for the same
484
+ material under section 10.
485
+
486
+ 9. Acceptance Not Required for Having Copies.
487
+
488
+ You are not required to accept this License in order to receive or
489
+ run a copy of the Program. Ancillary propagation of a covered work
490
+ occurring solely as a consequence of using peer-to-peer transmission
491
+ to receive a copy likewise does not require acceptance. However,
492
+ nothing other than this License grants you permission to propagate or
493
+ modify any covered work. These actions infringe copyright if you do
494
+ not accept this License. Therefore, by modifying or propagating a
495
+ covered work, you indicate your acceptance of this License to do so.
496
+
497
+ 10. Automatic Licensing of Downstream Recipients.
498
+
499
+ Each time you convey a covered work, the recipient automatically
500
+ receives a license from the original licensors, to run, modify and
501
+ propagate that work, subject to this License. You are not responsible
502
+ for enforcing compliance by third parties with this License.
503
+
504
+ An "entity transaction" is a transaction transferring control of an
505
+ organization, or substantially all assets of one, or subdividing an
506
+ organization, or merging organizations. If propagation of a covered
507
+ work results from an entity transaction, each party to that
508
+ transaction who receives a copy of the work also receives whatever
509
+ licenses to the work the party's predecessor in interest had or could
510
+ give under the previous paragraph, plus a right to possession of the
511
+ Corresponding Source of the work from the predecessor in interest, if
512
+ the predecessor has it or can get it with reasonable efforts.
513
+
514
+ You may not impose any further restrictions on the exercise of the
515
+ rights granted or affirmed under this License. For example, you may
516
+ not impose a license fee, royalty, or other charge for exercise of
517
+ rights granted under this License, and you may not initiate litigation
518
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
519
+ any patent claim is infringed by making, using, selling, offering for
520
+ sale, or importing the Program or any portion of it.
521
+
522
+ 11. Patents.
523
+
524
+ A "contributor" is a copyright holder who authorizes use under this
525
+ License of the Program or a work on which the Program is based. The
526
+ work thus licensed is called the contributor's "contributor version".
527
+
528
+ A contributor's "essential patent claims" are all patent claims
529
+ owned or controlled by the contributor, whether already acquired or
530
+ hereafter acquired, that would be infringed by some manner, permitted
531
+ by this License, of making, using, or selling its contributor version,
532
+ but do not include claims that would be infringed only as a
533
+ consequence of further modification of the contributor version. For
534
+ purposes of this definition, "control" includes the right to grant
535
+ patent sublicenses in a manner consistent with the requirements of
536
+ this License.
537
+
538
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
539
+ patent license under the contributor's essential patent claims, to
540
+ make, use, sell, offer for sale, import and otherwise run, modify and
541
+ propagate the contents of its contributor version.
542
+
543
+ In the following three paragraphs, a "patent license" is any express
544
+ agreement or commitment, however denominated, not to enforce a patent
545
+ (such as an express permission to practice a patent or covenant not to
546
+ sue for patent infringement). To "grant" such a patent license to a
547
+ party means to make such an agreement or commitment not to enforce a
548
+ patent against the party.
549
+
550
+ If you convey a covered work, knowingly relying on a patent license,
551
+ and the Corresponding Source of the work is not available for anyone
552
+ to copy, free of charge and under the terms of this License, through a
553
+ publicly available network server or other readily accessible means,
554
+ then you must either (1) cause the Corresponding Source to be so
555
+ available, or (2) arrange to deprive yourself of the benefit of the
556
+ patent license for this particular work, or (3) arrange, in a manner
557
+ consistent with the requirements of this License, to extend the patent
558
+ license to downstream recipients. "Knowingly relying" means you have
559
+ actual knowledge that, but for the patent license, your conveying the
560
+ covered work in a country, or your recipient's use of the covered work
561
+ in a country, would infringe one or more identifiable patents in that
562
+ country that you have reason to believe are valid.
563
+
564
+ If, pursuant to or in connection with a single transaction or
565
+ arrangement, you convey, or propagate by procuring conveyance of, a
566
+ covered work, and grant a patent license to some of the parties
567
+ receiving the covered work authorizing them to use, propagate, modify
568
+ or convey a specific copy of the covered work, then the patent license
569
+ you grant is automatically extended to all recipients of the covered
570
+ work and works based on it.
571
+
572
+ A patent license is "discriminatory" if it does not include within
573
+ the scope of its coverage, prohibits the exercise of, or is
574
+ conditioned on the non-exercise of one or more of the rights that are
575
+ specifically granted under this License. You may not convey a covered
576
+ work if you are a party to an arrangement with a third party that is
577
+ in the business of distributing software, under which you make payment
578
+ to the third party based on the extent of your activity of conveying
579
+ the work, and under which the third party grants, to any of the
580
+ parties who would receive the covered work from you, a discriminatory
581
+ patent license (a) in connection with copies of the covered work
582
+ conveyed by you (or copies made from those copies), or (b) primarily
583
+ for and in connection with specific products or compilations that
584
+ contain the covered work, unless you entered into that arrangement,
585
+ or that patent license was granted, prior to 28 March 2007.
586
+
587
+ Nothing in this License shall be construed as excluding or limiting
588
+ any implied license or other defenses to infringement that may
589
+ otherwise be available to you under applicable patent law.
590
+
591
+ 12. No Surrender of Others' Freedom.
592
+
593
+ If conditions are imposed on you (whether by court order, agreement or
594
+ otherwise) that contradict the conditions of this License, they do not
595
+ excuse you from the conditions of this License. If you cannot convey a
596
+ covered work so as to satisfy simultaneously your obligations under this
597
+ License and any other pertinent obligations, then as a consequence you may
598
+ not convey it at all. For example, if you agree to terms that obligate you
599
+ to collect a royalty for further conveying from those to whom you convey
600
+ the Program, the only way you could satisfy both those terms and this
601
+ License would be to refrain entirely from conveying the Program.
602
+
603
+ 13. Use with the GNU Affero General Public License.
604
+
605
+ Notwithstanding any other provision of this License, you have
606
+ permission to link or combine any covered work with a work licensed
607
+ under version 3 of the GNU Affero General Public License into a single
608
+ combined work, and to convey the resulting work. The terms of this
609
+ License will continue to apply to the part which is the covered work,
610
+ but the special requirements of the GNU Affero General Public License,
611
+ section 13, concerning interaction through a network will apply to the
612
+ combination as such.
613
+
614
+ 14. Revised Versions of this License.
615
+
616
+ The Free Software Foundation may publish revised and/or new versions of
617
+ the GNU General Public License from time to time. Such new versions will
618
+ be similar in spirit to the present version, but may differ in detail to
619
+ address new problems or concerns.
620
+
621
+ Each version is given a distinguishing version number. If the
622
+ Program specifies that a certain numbered version of the GNU General
623
+ Public License "or any later version" applies to it, you have the
624
+ option of following the terms and conditions either of that numbered
625
+ version or of any later version published by the Free Software
626
+ Foundation. If the Program does not specify a version number of the
627
+ GNU General Public License, you may choose any version ever published
628
+ by the Free Software Foundation.
629
+
630
+ If the Program specifies that a proxy can decide which future
631
+ versions of the GNU General Public License can be used, that proxy's
632
+ public statement of acceptance of a version permanently authorizes you
633
+ to choose that version for the Program.
634
+
635
+ Later license versions may give you additional or different
636
+ permissions. However, no additional obligations are imposed on any
637
+ author or copyright holder as a result of your choosing to follow a
638
+ later version.
639
+
640
+ 15. Disclaimer of Warranty.
641
+
642
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
643
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
644
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
645
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
646
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
647
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
648
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
649
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
650
+
651
+ 16. Limitation of Liability.
652
+
653
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
654
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
655
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
656
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
657
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
658
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
659
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
660
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
661
+ SUCH DAMAGES.
662
+
663
+ 17. Interpretation of Sections 15 and 16.
664
+
665
+ If the disclaimer of warranty and limitation of liability provided
666
+ above cannot be given local legal effect according to their terms,
667
+ reviewing courts shall apply local law that most closely approximates
668
+ an absolute waiver of all civil liability in connection with the
669
+ Program, unless a warranty or assumption of liability accompanies a
670
+ copy of the Program in return for a fee.
671
+
672
+ END OF TERMS AND CONDITIONS
673
+
674
+ How to Apply These Terms to Your New Programs
675
+
676
+ If you develop a new program, and you want it to be of the greatest
677
+ possible use to the public, the best way to achieve this is to make it
678
+ free software which everyone can redistribute and change under these terms.
679
+
680
+ To do so, attach the following notices to the program. It is safest
681
+ to attach them to the start of each source file to most effectively
682
+ state the exclusion of warranty; and each file should have at least
683
+ the "copyright" line and a pointer to where the full notice is found.
684
+
685
+ <one line to give the program's name and a brief idea of what it does.>
686
+ Copyright (C) <year> <name of author>
687
+
688
+ This program is free software: you can redistribute it and/or modify
689
+ it under the terms of the GNU General Public License as published by
690
+ the Free Software Foundation, either version 3 of the License, or
691
+ (at your option) any later version.
692
+
693
+ This program is distributed in the hope that it will be useful,
694
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
695
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
696
+ GNU General Public License for more details.
697
+
698
+ You should have received a copy of the GNU General Public License
699
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
700
+
701
+ Also add information on how to contact you by electronic and paper mail.
702
+
703
+ If the program does terminal interaction, make it output a short
704
+ notice like this when it starts in an interactive mode:
705
+
706
+ <program> Copyright (C) <year> <name of author>
707
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
708
+ This is free software, and you are welcome to redistribute it
709
+ under certain conditions; type `show c' for details.
710
+
711
+ The hypothetical commands `show w' and `show c' should show the appropriate
712
+ parts of the General Public License. Of course, your program's commands
713
+ might be different; for a GUI interface, you would use an "about box".
714
+
715
+ You should also get your employer (if you work as a programmer) or school,
716
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
717
+ For more information on this, and how to apply and follow the GNU GPL, see
718
+ <http://www.gnu.org/licenses/>.
719
+
720
+ The GNU General Public License does not permit incorporating your program
721
+ into proprietary programs. If your program is a subroutine library, you
722
+ may consider it more useful to permit linking proprietary applications with
723
+ the library. If this is what you want to do, use the GNU Lesser General
724
+ Public License instead of this License. But first, please read
725
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.