Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java plugin code for nutch using filter indexer
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


hhh ahha ahh
java plugin code for nutch using filter indexer
0 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


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?


Advertisement
View Answers

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
Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked
Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked  Can anybody say the Java code for enabling filter to a checkbox and disabling filter to that checkbox after uncheked
Advertisements
filter implementation in java
filter implementation in java   How to implement filters in java?   Java - filter implementation Tutorials Filter Files in Java Response Filter Servlet Example
CAP - Code Analysis Plugin
CAP - Code Analysis Plugin         CAP is a plugin for the eclipse platform and analysis the dependencies of your Java project. It opens a own perspective and displays
jQuery plugin examples code
jQuery plugin examples code       jQuery plugin examples code Following... plugin Auto complete text box using jQuery plug in Pop
Reduce Java Code commenting effort using JAutodoc (eclipse plugin)
Reduce Java Code commenting effort using JAutodoc (eclipse plugin...; INTRODUCTION Summary JAutodoc is a very useful eclipse plugin which... the following files get copied as shown : Plugin folder : Features folder
Hibernate Data Filter using XML
In this section, you will learn to filter data using XML mapping file
filter
filter  What is filter? Can filter be used as request or response
Could not able to run Java Applet in JSP using <jsp:plugin>
Could not able to run Java Applet in JSP using   I could not able to run the above example applet in the JSP. Getting class not found exception. Copied the error stack trace below. Exception: java.lang.ClassNotFoundException
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
Filter Files in Java
Filter Files in Java       Introduction The Filter File Java example code provides... parameter. Here is the code of the program : import 
Form validation Using Jquery Plugin
Form validation Using Jquery Plugin  Hello sir I want to implement form validation using JQuery Plug-in. My code is : <html> <style type... plugin. Here is the code according to your description : <script type="text
Groovy Editor using Eclipse RCP Plugin Development
Groovy Editor using Eclipse RCP Plugin Development  Hi I am about to design a plugin for the groovy editor in eclipse that can highlight the syntax and compiles and runs the groovy code. Does anyone have any idea how to do
java code using while loop
java code using while loop  
java code for PartialSearch using Map????
java code for PartialSearch using Map????  java code for Partial Search using Map
Using Filter in transition in Flex4
Using Filter in transitions in Flex4: We can use filter with transition. You will use some value of  filter for perform effect during change state... The syntax are following: <s:Sequence id="firstSequence" filter
Java file filter
Java file filter In this section, you will learn how to filter files. Some...]); } } } Through the above code, you can filter your files and retrieve a specific... that implements java.io.FilenameFilter and code the method accept(). Then we have called
filter and display html table data using ajax - Ajax
filter and display html table data using ajax  Hi i am stuck up at a situation where i have a jsp page from where the control goes to the .js file... on DisplayCategory.jsp in the form of the html table using responseText. how to do
Setting a Filter on a Logger Handler in Java
Setting a Filter on a Logger Handler in Java   ... on a logger handler in Java. Generally, Filter is a program that provides... of logMessn() method. Descriptions of code: Filter: This is the interface
Developing Struts Hibernate Plugin
Developing Struts Hibernate Plugin       In this section we will develop java code... of the application. Source Code Of Hibernate Struts Plugin
code for multiplication of matrix in java using methods
code for multiplication of matrix in java using methods  code for multiplication of matrix in java using methods
parsing xml file using java code
parsing xml file using java code  parsing a xml file using java code
Response Filter Servlet Example
in  Java Servlet. Filter reads own initial parameters and adds its value... container creates an instance of the filter. The code then gets the value...;/JSP/response.jsp</url-pattern> </filter-mapping> The source code
Masters of Java Assignment Plugin
Masters of Java Assignment Plugin       This plugin makes... of the Eclipse Java IDE.  The plugin has the following features
Reading RDF file using Java code in Eclipse
Reading RDF file using Java code in Eclipse  Could you please tel me what this statement means - Model model = ModelFactory.createDefaultModel
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
Error in MySQL Procedure Using JAVA Code
Error in MySQL Procedure Using JAVA Code  The following Java code (using Connector/J to create a stored procedure on MySQL 5.0) does not execute successfully. Identify the cause and available solutions. statement.execute
Export to Shell Script Plugin
. This allows for the execution of java code OUTSIDE the Eclipse environment without... Export to Shell Script Plugin       This eclipse plugin allows for the export
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
how to make use of jerry's java image processing filter in java application?is there anyway to do this?
how to make use of jerry's java image processing filter in java application?is there anyway to do this?   how to make use of jerry's java image processing filter in java application?is there anyway to do
Advertisements
 

 

 

DMCA.com