at.knowcenter.wag.egov.egiz.tools
Class NormalizeV01

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.tools.NormalizeV01
All Implemented Interfaces:
Normalize, Serializable

public class NormalizeV01
extends Object
implements Normalize, Serializable

This ist the first version implementing a normalizer method. The normalize statements are performed by using regular expressions.

Author:
wlackner
See Also:
Serialized Form

Field Summary
protected static String VERSION
          The current version string
 
Constructor Summary
NormalizeV01()
          The empty constructor.
 
Method Summary
 String getNormCR()
          Returns the normalizer line separator string.
 String getVersion()
          Return the version string.
 String normalize(String rawText)
          The normalizer implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

protected static final String VERSION
The current version string

See Also:
Constant Field Values
Constructor Detail

NormalizeV01

public NormalizeV01()
The empty constructor.

Method Detail

normalize

public String normalize(String rawText)
The normalizer implementation.
Normalizer algorithums:
  1. code all multiple line breaks as \n\n
  2. replace all Tabs and form feeds with spaces
  3. code line breaks as \n
  4. reduce all multiple line breaks into one line break, code line break as \r
  5. replace all single line breaks with space
  6. normalize spaces
  7. remove spaces before and after a line break
  8. remove leading and trailing space or line break in the string
  9. normalize line breaks
  10. normalize apostrophes
  11. normalize quotations
  12. normalize hypens

Specified by:
normalize in interface Normalize
Parameters:
rawText - the raw text to normalize
Returns:
the normalized string
See Also:
Normalize.normalize(java.lang.String)

getVersion

public String getVersion()
Return the version string.

Specified by:
getVersion in interface Normalize
Returns:
the version string
See Also:
Normalize.getVersion()

getNormCR

public String getNormCR()
Returns the normalizer line separator string.

Specified by:
getNormCR in interface Normalize
Returns:
the line separator string


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.