Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(11)  |  Derive(0)  |  Import(4)

src/s/t/streamcorpus_pipeline-0.5.23.dev1/examples/john_smith_custom_reader.py   streamcorpus_pipeline(Download)
 
        ## put this one label in the array of labels
        streamcorpus.add_annotation(stream_item, rating)
 
        ## provide this stream_item to the pipeline

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/_john_smith.py   streamcorpus_pipeline(Download)
 
            ## put this one label in the array of labels
            streamcorpus.add_annotation(stream_item, rating)
 
            ## provide this stream_item to the pipeline

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/_taggers.py   streamcorpus_pipeline(Download)
 
import streamcorpus
from streamcorpus import Chunk, Tagging, Label, OffsetType, add_annotation
from streamcorpus_pipeline._clean_visible import make_clean_visible_file, \
    cleanse
                        ## apply the label
                        for tok in chain_tokens:
                            add_annotation(tok, label)
 
                ## stream_item passed by reference, so nothing to return
 
            for tok in toks:
                add_annotation(tok, label)
 
                ## only for debugging
 
            for tok in toks:
                add_annotation(tok, label)
 
                ## only for debugging
                    if aligner_data.get('update_labels'):
                        tok.labels.pop(annotator_id, None)
                    add_annotation(tok, label)
                    num_tokens_matched += 1
 

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/_tokenizer.py   streamcorpus_pipeline(Download)
                        logger.info('overlapping label: %r' % label.target.target_id)
                        ## overlaps
                        streamcorpus.add_annotation(tok, label)
                        assert label.annotator.annotator_id in tok.labels
 

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/_yaml_files_list.py   streamcorpus_pipeline(Download)
 
            ## put this one label in the array of labels
            streamcorpus.add_annotation(stream_item, rating)
 
        ## provide this stream_item to the pipeline

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/_hyperlink_labels.py   streamcorpus_pipeline(Download)
import logging
 
from streamcorpus import add_annotation, Offset, OffsetType, Annotator, Target, Label
from streamcorpus_pipeline._clean_visible import make_clean_visible
from streamcorpus_pipeline.stages import Configured
 
                ## also add the new labels
                add_annotation(stream_item.body, *labels)
        return stream_item
 

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/tests/test_taggers.py   streamcorpus_pipeline(Download)
from __future__ import absolute_import
import pytest
from streamcorpus import Chunk, make_stream_item, add_annotation, \
    Sentence, Token, Annotator, Target, Rating
 
           mentions=['Big dog! Jake... ', u'\u1F601 Teeth'.encode('utf8')],
           )
    add_annotation(si, rating)
    aligner_data = dict(
        tagger_id = tagger_id,

src/s/t/streamcorpus_pipeline-0.5.23.dev1/streamcorpus_pipeline/tests/_test_data.py   streamcorpus_pipeline(Download)
 
import os
from streamcorpus import Chunk, StreamItem_v0_2_0, add_annotation
from StringIO import StringIO
 
                        for offset in label.offsets.values():
                            offset.value = token.token
                        add_annotation(si.body, label)
                token.labels = dict()
        o_chunk.add(si)