Java Doc for StandardTokenizer.java in  » Net » lucene-connector » org » apache » lucene » analysis » standard » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » lucene connector » org.apache.lucene.analysis.standard 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.lucene.analysis.Tokenizer
   org.apache.lucene.analysis.standard.StandardTokenizer

StandardTokenizer
public class StandardTokenizer extends Tokenizer (Code)
A grammar-based tokenizer constructed with JFlex

This should be a good tokenizer for most European-language documents:

  • Splits words at punctuation characters, removing punctuation. However, a dot that's not followed by whitespace is considered part of a token.
  • Splits words at hyphens, unless there's a number in the token, in which case the whole token is interpreted as a product number and is not split.
  • Recognizes email addresses and internet hostnames as one token.

Many applications have specific tokenizer needs. If this tokenizer does not suit your application, please consider copying this source code directory to your project and maintaining your own grammar-based tokenizer.




Constructor Summary
public  StandardTokenizer(Reader input)
     Creates a new instance of the StandardTokenizer .
public  StandardTokenizer(Reader input, boolean replaceInvalidAcronym)
     Creates a new instance of the org.apache.lucene.analysis.standard.StandardTokenizer .

Method Summary
public  intgetMaxTokenLength()
    
public  booleanisReplaceInvalidAcronym()
     Prior to https://issues.apache.org/jira/browse/LUCENE-1068, StandardTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead.
public  Tokennext(Token result)
    
public  voidreset()
    
public  voidreset(Reader reader)
    
 voidsetInput(Reader reader)
    
public  voidsetMaxTokenLength(int length)
     Set the max allowed token length.
public  voidsetReplaceInvalidAcronym(boolean replaceInvalidAcronym)
    


Constructor Detail
StandardTokenizer
public StandardTokenizer(Reader input)(Code)
Creates a new instance of the StandardTokenizer . Attaches the input to a newly created JFlex scanner.



StandardTokenizer
public StandardTokenizer(Reader input, boolean replaceInvalidAcronym)(Code)
Creates a new instance of the org.apache.lucene.analysis.standard.StandardTokenizer . Attaches the input to the newly created JFlex scanner.
Parameters:
  input - The input reader
Parameters:
  replaceInvalidAcronym - Set to true to replace mischaracterized acronyms with HOST.See http://issues.apache.org/jira/browse/LUCENE-1068




Method Detail
getMaxTokenLength
public int getMaxTokenLength()(Code)

See Also:   StandardTokenizer.setMaxTokenLength
See Also:   



isReplaceInvalidAcronym
public boolean isReplaceInvalidAcronym()(Code)
Prior to https://issues.apache.org/jira/browse/LUCENE-1068, StandardTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead. true if StandardTokenizer now returns these tokens as Hosts, otherwise false



next
public Token next(Token result) throws IOException(Code)



reset
public void reset() throws IOException(Code)



reset
public void reset(Reader reader) throws IOException(Code)



setInput
void setInput(Reader reader)(Code)



setMaxTokenLength
public void setMaxTokenLength(int length)(Code)
Set the max allowed token length. Any token longer than this is skipped.



setReplaceInvalidAcronym
public void setReplaceInvalidAcronym(boolean replaceInvalidAcronym)(Code)

Parameters:
  replaceInvalidAcronym - Set to true to replace mischaracterized acronyms as HOST.



Fields inherited from org.apache.lucene.analysis.Tokenizer
protected Reader input(Code)(Java Doc)

Methods inherited from org.apache.lucene.analysis.Tokenizer
public void close() throws IOException(Code)(Java Doc)
public void reset(Reader input) throws IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.