alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Lucene example source code file (hyphenation.dtd)

This example Lucene source code file (hyphenation.dtd) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Lucene tags/keywords

a, attlist, attlist, cdata, cdata, element, element, empty, implied, license, license, pcdata, required, the

The Lucene hyphenation.dtd source code

<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 1999-2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id: hyphenation.dtd,v 1.3 2004/02/27 18:34:59 jeremias Exp $ -->

<!ELEMENT hyphenation-info (hyphen-char?, hyphen-min?,
                           classes, exceptions?, patterns)>

<!-- Hyphen character to be used in the exception list as shortcut for
     <hyphen pre-break="-"/>. Defaults to '-'
-->
<!ELEMENT hyphen-char EMPTY>
<!ATTLIST hyphen-char value CDATA #REQUIRED>

<!-- Default minimun length in characters of hyphenated word fragments
     before and after the line break. For some languages this is not
     only for aesthetic purposes, wrong hyphens may be generated if this
     is not accounted for.
-->
<!ELEMENT hyphen-min EMPTY>
<!ATTLIST hyphen-min before CDATA #REQUIRED>
<!ATTLIST hyphen-min after CDATA #REQUIRED>

<!-- Character equivalent classes: space separated list of character groups, all
     characters in a group are to be treated equivalent as far as
     the hyphenation algorithm is concerned. The first character in a group
     is the group's equivalent character. Patterns should only contain
     first characters. It also defines word characters, i.e. a word that
     contains characters not present in any of the classes is not hyphenated.
-->
<!ELEMENT classes (#PCDATA)>

<!-- Hyphenation exceptions: space separated list of hyphenated words.
     A hyphen is indicated by the hyphen tag, but you can use the
     hyphen-char defined previously as shortcut. This is in cases
     when the algorithm procedure finds wrong hyphens or you want
     to provide your own hyphenation for some words.
-->
<!ELEMENT exceptions (#PCDATA|hyphen)* >

<!-- The hyphenation patterns, space separated. A pattern is made of 'equivalent'
     characters as described before, between any two word characters a digit
     in the range 0 to 9 may be specified. The absence of a digit is equivalent
     to zero. The '.' character is reserved to indicate begining or ending
     of words. -->
<!ELEMENT patterns (#PCDATA)>

<!-- A "full hyphen" equivalent to TeX's \discretionary
     with pre-break, post-break and no-break attributes.
     To be used in the exceptions list, the hyphen character is not
     automatically added -->
<!ELEMENT hyphen EMPTY>
<!ATTLIST hyphen pre CDATA #IMPLIED>
<!ATTLIST hyphen no CDATA #IMPLIED>
<!ATTLIST hyphen post CDATA #IMPLIED>

Other Lucene examples (source code examples)

Here is a short list of links related to this Lucene hyphenation.dtd source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.