@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(PFPGrowth.SPLIT_PATTERN, PFPGrowth.SPLITTER.toString())); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get("pfp.parameters", "")); maxHeapSize = Integer.valueOf(params.get("maxHeapSize", "50")); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); int i = 0; for (Pair<String,Long> e : PFPGrowth.readFList(context.getConfiguration())) { fMap.put(e.getFirst(), i++); } Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); splitter = Pattern.compile(params.get(PFPGrowth.SPLIT_PATTERN, PFPGrowth.SPLITTER.toString())); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Parameters params = new Parameters(context.getConfiguration().get(PFPGrowth.PFP_PARAMETERS, "")); for (Pair<String,Long> e : PFPGrowth.readFList(context.getConfiguration())) { featureReverseMap.add(e.getFirst()); freqList.add(e.getSecond()); } maxHeapSize = Integer.valueOf(params.get(PFPGrowth.MAX_HEAP_SIZE, "50")); minSupport = Integer.valueOf(params.get(PFPGrowth.MIN_SUPPORT, "3")); maxPerGroup = params.getInt(PFPGrowth.MAX_PER_GROUP, 0); numFeatures = featureReverseMap.size(); useFP2 = "true".equals(params.get(PFPGrowth.USE_FPG2)); } }
public static void main(String args[]) throws Exception { Parameters params = new Parameters(); params.set("splitPattern", "\t"); String inputDir = "tweets.txt"; String outputDir = "twitter_seqfiles"; params.set("input", inputDir); params.set("output", outputDir); params.set("selectedField", "1"); // tweet params.set("groupByField", "0"); // username ByKeyGroupingJob.startJob(params); DoubleMetaphone filter = new DoubleMetaphone(); // TODO: change these terms?! System.out.println(filter.encode("Loke")); System.out.println(filter.encode("companymancomic")); System.out.println(filter.encode("webcomics")); System.out.println(filter.encode("@comic")); } }
Parameters params = new Parameters(); if(hasOption("tempDir")){ String tempDirPath = getOption("tempDir");
Parameters params = new Parameters();