Examples of terms()


Examples of ch.akuhn.hapax.corpus.Corpus.terms()

       
        System.out.println(c1);
        System.out.println(c2);
       
        SortedSet<LogLikelihood> list = new TreeSet<LogLikelihood>();
        for (String each: (union(c1.terms(), c2.terms())).elements()) {
            list.add(new LogLikelihood(c1.terms(), c2.terms(), each));
        }
       
        Out.puts(list);
       
View Full Code Here

Examples of ch.akuhn.hapax.corpus.Corpus.terms()

        System.out.println(c1);
        System.out.println(c2);
       
        SortedSet<LogLikelihood> list = new TreeSet<LogLikelihood>();
        for (String each: (union(c1.terms(), c2.terms())).elements()) {
            list.add(new LogLikelihood(c1.terms(), c2.terms(), each));
        }
       
        Out.puts(list);
       
    }
View Full Code Here

Examples of ch.akuhn.hapax.index.TermDocumentMatrix.terms()

        Out.puts(tdm);

        Out.puts(tdm.density());

        Out.puts(tdm.terms().sortedCounts());

        LatentSemanticIndex lsi = tdm.createIndex();

        Out.puts(first(10, lsi.rankDocumentsByTerm("bag")));
        Out.puts(first(10, lsi.rankTermsByTerm("bag")));
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

    public void emitLineEnd(Context context) {
        FlowElementPortDescription inputPort = context.getInputPort(Split.ID_INPUT);
        Joined joined = TypeUtil.erase(inputPort.getDataType()).getAnnotation(Joined.class);
        assert joined != null;
        Map<Class<?>, Term> terms = Maps.create();
        for (Term term : joined.terms()) {
            terms.put(term.source(), term);
        }
        for (FlowElementPortDescription output : context.getOperatorDescription().getOutputPorts()) {
            Term term = terms.get(output.getDataType());
            assert term != null;
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

        DataClass outputType = getEnvironment().getDataClasses().load(joinedPort.getDataType());
        List<Statement> process = Lists.create();
        process.add(resultCache.createReset());
        Joined annotation = TypeUtil.erase(joinedPort.getDataType()).getAnnotation(Joined.class);
        Set<String> saw = Sets.create();
        for (Joined.Term term : annotation.terms()) {
            DataClass inputType = getEnvironment().getDataClasses().load(term.source());
            Expression input;
            if (term.source().equals(context.getInputPort(SideDataJoin.ID_INPUT_TRANSACTION).getDataType())) {
                input = context.getInput();
            } else {
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

        List<Statement> process = Lists.create();
        process.add(resultCache.createReset());

        Joined annotation = TypeUtil.erase(joinedPort.getDataType()).getAnnotation(Joined.class);
        Set<String> saw = Sets.create();
        for (Joined.Term term : annotation.terms()) {
            DataClass inputType = getEnvironment().getDataClasses().load(term.source());
            Expression input;
            if (term.source().equals(context.getInputPort(MasterJoin.ID_INPUT_MASTER).getDataType())) {
                input = masterAnalyzer.getGetRawMasterExpression();
            } else {
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

    public void simple_join() {
        ModelLoader loader = generate();
        Joined annotation = loader.modelType("Simple").getAnnotation(Joined.class);
        assertThat(annotation, not(nullValue()));

        assertThat(annotation.terms().length, is(2));

        Joined.Term a = annotation.terms()[0];
        assertThat(a.source(), eq(loader.modelType("A")));
        assertThat(a.mappings().length, is(2));
        assertThat(a.mappings(), hasItemInArray(mapping("sid", "sid")));
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

        Joined annotation = loader.modelType("Simple").getAnnotation(Joined.class);
        assertThat(annotation, not(nullValue()));

        assertThat(annotation.terms().length, is(2));

        Joined.Term a = annotation.terms()[0];
        assertThat(a.source(), eq(loader.modelType("A")));
        assertThat(a.mappings().length, is(2));
        assertThat(a.mappings(), hasItemInArray(mapping("sid", "sid")));
        assertThat(a.mappings(), hasItemInArray(mapping("value", "aValue")));
        assertThat(a.shuffle(), is(grouping("sid")));
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

        assertThat(a.mappings().length, is(2));
        assertThat(a.mappings(), hasItemInArray(mapping("sid", "sid")));
        assertThat(a.mappings(), hasItemInArray(mapping("value", "aValue")));
        assertThat(a.shuffle(), is(grouping("sid")));

        Joined.Term b = annotation.terms()[1];
        assertThat(b.source(), eq(loader.modelType("B")));
        assertThat(b.mappings().length, is(2));
        assertThat(b.mappings(), hasItemInArray(mapping("sid", "sid")));
        assertThat(b.mappings(), hasItemInArray(mapping("value", "bValue")));
        assertThat(b.shuffle(), is(grouping("sid")));
View Full Code Here

Examples of com.asakusafw.vocabulary.model.Joined.terms()

    public void join_rename_key() {
        ModelLoader loader = generate();
        Joined annotation = loader.modelType("Simple").getAnnotation(Joined.class);
        assertThat(annotation, not(nullValue()));

        assertThat(annotation.terms().length, is(2));

        Joined.Term a = annotation.terms()[0];
        assertThat(a.source(), eq(loader.modelType("A")));
        assertThat(a.mappings().length, is(2));
        assertThat(a.mappings(), hasItemInArray(mapping("sid", "key")));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.