Did I find the right examples for you? yes no

All Samples(5)  |  Call(0)  |  Derive(0)  |  Import(5)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/m/b/MBSP-HEAD/__init__.py   MBSP(Download)
 
WORD     = config.WORD        # The word as it appears in the sentence.
POS      = config.POS         # The part-of-speech of the word (e.g. noun, adjective).
CHUNK    = config.CHUNK       # The chunk tag of a group of words (e.g. noun phrase, verb phrase).
PNP      = config.PREPOSITION # Indicates a prepositional noun phrase (e.g. with a fork)

src/m/b/MBSP-HEAD/mbsp.py   MBSP(Download)
import prepositions
 
from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
from config import SLASH
 
    # Trees are used to find preposition anchors, for example.
    format = [WORD]
    if tags      : format.append(POS)
    if chunks    : format.extend((CHUNK, PNP))
    if relations : format.append(REL)
    # Tag for part-of-speech tags and chunks.
    if tags or chunks or relations or anchors or lemmata:
        f = [WORD, POS, CHUNK]
        s = _chunk(s)
        s = _handle_event("on_parse_tags_and_chunks", s, format=f)
    # Find PNP chunks.
    if chunks or relations or anchors:
        f = [WORD, POS, CHUNK, PNP]
    # Find relations.
    if relations:
        f = [WORD, POS, CHUNK, PNP, REL]
        s = _find_relations(s)
        s = _handle_event("on_parse_relations", s, format=f)

src/m/b/MBSP-HEAD/tree.py   MBSP(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True
except:
            if tag == WORD:
                tags[i] = encode_entities(self.string)
            elif tag == POS and self.type:
                tags[i] = self.type
            elif tag == CHUNK and ch and ch.type:
        """
        p = { WORD: "", 
               POS: None, 
               IOB: None,
             CHUNK: None,
        # Return the tags in the same order as the parameters for Sentence.append().
        custom = dict([(tag, p[tag]) for tag in custom])
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == LEMMA:
            return self.words[index].lemma
        if tag == POS:
            return self.words[index].type
        if tag == CHUNK:

src/p/a/pattern-2.6/pattern/text/tree.py   Pattern(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True # Memory-Based Shallow Parser for Python.
except:
            if tag == WORD:
                tags[i] = encode_entities(self.string)
            elif tag == POS and self.type:
                tags[i] = self.type
            elif tag == CHUNK and ch and ch.type:
        """
        p = { WORD: "", 
               POS: None, 
               IOB: None,
             CHUNK: None,
        self._previous = p
        # Return the tags in the right order for Sentence.append().
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == LEMMA:
            return self.words[index].lemma
        if tag == POS:
            return self.words[index].type
        if tag == CHUNK:

src/p/a/pattern-HEAD/pattern/text/tree.py   pattern(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True # Memory-Based Shallow Parser for Python.
except:
            if tag == WORD:
                tags[i] = encode_entities(self.string)
            elif tag == POS and self.type:
                tags[i] = self.type
            elif tag == CHUNK and ch and ch.type:
        """
        p = { WORD: "", 
               POS: None, 
               IOB: None,
             CHUNK: None,
        self._previous = p
        # Return the tags in the right order for Sentence.append().
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == LEMMA:
            return self.words[index].lemma
        if tag == POS:
            return self.words[index].type
        if tag == CHUNK:

src/m/b/MBSP-HEAD/prepositions/classify.py   MBSP(Download)
    # We will end up here if mbsp.py is called directly from the command line
    import config
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    from client import batch, TimblPP
    from tree   import Sentence