org.languagetool.dev.wikipedia
Class WikipediaIndexHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.languagetool.dev.wikipedia.WikipediaIndexHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class WikipediaIndexHandler
- extends DefaultHandler
Wikipedia handler for indexing. See Searcher for a
class that lets you use this index.
- Author:
- Tao Lin
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_DOC_COUNT_VALUE
public static final String MAX_DOC_COUNT_VALUE
- See Also:
- Constant Field Values
MAX_DOC_COUNT_FIELD
public static final String MAX_DOC_COUNT_FIELD
- See Also:
- Constant Field Values
MAX_DOC_COUNT_FIELD_VAL
public static final String MAX_DOC_COUNT_FIELD_VAL
- See Also:
- Constant Field Values
WikipediaIndexHandler
public WikipediaIndexHandler(org.apache.lucene.store.Directory dir,
Language language,
int start,
int end)
startElement
public void startElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String namespaceURI,
String sName,
String qName)
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class DefaultHandler
characters
public void characters(char[] buf,
int offset,
int len)
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class DefaultHandler
close
public void close()
throws Exception
- Throws:
Exception
main
public static void main(String... args)
throws Exception
- Throws:
Exception
Copyright © 2013. All Rights Reserved.