java plugin code for nutch using filter indexer
hello:
i want to write an indexer filter (aplugin for nutch) that take the arabic words from the indexer and remove the movements from this words then return them to the indexer what i should use instead of the parse.getdata() and what i should put in the doc.add(name,value) . I don't know what is the error in it.
Tthis is the code:-->
package com.mycompany.nutch.indexing;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
import org.apache.nutch.crawl.CrawlDatum;
import org.apache.nutch.crawl.Inlinks;
import org.apache.nutch.indexer.IndexingException;
import org.apache.nutch.indexer.IndexingFilter;
import org.apache.nutch.indexer.NutchDocument;
//import org.apache.nutch.parsedData.parsedData;
public class InvalidUrlIndexFilter implements IndexingFilter {
private static final Logger LOGGER =
Logger.getLogger(InvalidUrlIndexFilter.class);
private Configuration conf;
public void addIndexBackendOptions(Configuration conf) {
// NOOP
return;
}
public NutchDocument filter(NutchDocument doc, Parse parse, Text url,
CrawlDatum datum, Inlinks inlinks) throws IndexingException {
if (url == null) {
return null;
}
string parsedData =parse;
char[] parsedData = input.trim().toCharArray();
for(int p=0;p<parsedData.length;p++)
if(!(parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?'||parsedData[p]=='?' ||parsedData[p]=='?'||parsedData[p]=='?' ||parsedData[p]=='"' ))
new String.append(parsedData[p]);
return doc.add("value",parsedData);
}
public Configuration getConf() {
return conf;
}
public void setConf(Configuration conf) {
this.conf = conf;
}
}
I think that the error is in using parsedData but I don't know what I should use instead of it?
View Answers
Ads
Related Tutorials/Questions & Answers:
java plugin code for nutch using filter indexer
java plugin code for
nutch using filter indexer hello:
i want to write an
indexer filter (aplugin for
nutch) that take the arabic words from the
indexer and remove the movements from this words then return them to the
indexer
Advertisements
java code using swings
java code using swings
code that should be able to enter data of student details
using all swings into the access database
using jdbc connectivity
java code using combobox,radiobutton,checkbox
java code using combobox,radiobutton,checkbox hi, send me
java code for entering student details into ms access database, the
code should includes combo box,radiobutton and checkboxes pl send as early as possible
View source code of a html page using java ..
View source
code of a html page
using java .. I could find the html source
code of a web page
using the following program,
http://download.oracle.com/javase/1.4.2/docs/api/
java/net/URLConnection.html
i could get the html
code
determinant of n*n matrix using java code
determinant of n*n matrix
using java code Here is my
code:
import java.util.Scanner.*;
import java.util.*;
public class determinantcode
{
double A[][];
double m[][];
int N;
public input()
{
Scanner s=new
ModuleNotFoundError: No module named 'nutch'
ModuleNotFoundError: No module named '
nutch' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
nutch'
How to remove the ModuleNotFoundError: No module named '
nutch'
tree using jsp code
tree
using jsp code i want to draw a tree structure of a family hierarchy
using jsp
code
Filter collection in Java 8
Java in it.
How to
filter this
using the
Java 8?
Thanks
Hi,
Example of
Filter collection in
Java 8
You can use the following
code in
Java 8...
Filter collection in
Java 8 Hi,
I have following collection
how to take backup of phone to pc using java code
how to take backup of phone to pc
using java code i want to take the backup of phone data in my pc and also provide the restore functionality,and i want to do it
using java program,so can anyone help me
how to convert war file into .exe file using java code
how to convert war file into .exe file
using java code hi,I am beginner in the
java,I want to convert my
java maven project to .exe file,plz tell me which is required jar files and how i convert this..?Thanks in advance