natural language toolkit parsers c 20012023 nltk project steven bird stevenbird1gmail com edward loper edlopergmail com url https www nltk org for license information see license txt nltk parsers classes and interfaces for producing tree structures that represent the internal organization of a text this task is known as parsing the text and the resulting tree structures are called the text s parses typically the text is a single sentence and the tree structure represents the syntactic structure of the sentence however parsers can also be used in other domains for example parsers can be used to derive the morphological structure of the morphemes that make up a word or to derive the discourse structure for a set of utterances sometimes a single piece of text can be represented by more than one tree structure texts represented by more than one tree structure are called ambiguous texts note that there are actually two ways in which a text can be ambiguous the text has multiple correct parses there is not enough information to decide which of several candidate parses is correct however the parser module does not distinguish these two types of ambiguity the parser module defines parseri a standard interface for parsing texts and two simple implementations of that interface shiftreduceparser and recursivedescentparser it also contains three submodules for specialized kinds of parsing nltk parser chart defines chart parsing which uses dynamic programming to efficiently parse texts nltk parser probabilistic defines probabilistic parsing which associates a probability with each parse natural language toolkit parsers c 2001 2023 nltk project steven bird stevenbird1 gmail com edward loper edloper gmail com url https www nltk org for license information see license txt nltk parsers classes and interfaces for producing tree structures that represent the internal organization of a text this task is known as parsing the text and the resulting tree structures are called the text s parses typically the text is a single sentence and the tree structure represents the syntactic structure of the sentence however parsers can also be used in other domains for example parsers can be used to derive the morphological structure of the morphemes that make up a word or to derive the discourse structure for a set of utterances sometimes a single piece of text can be represented by more than one tree structure texts represented by more than one tree structure are called ambiguous texts note that there are actually two ways in which a text can be ambiguous the text has multiple correct parses there is not enough information to decide which of several candidate parses is correct however the parser module does not distinguish these two types of ambiguity the parser module defines parseri a standard interface for parsing texts and two simple implementations of that interface shiftreduceparser and recursivedescentparser it also contains three sub modules for specialized kinds of parsing nltk parser chart defines chart parsing which uses dynamic programming to efficiently parse texts nltk parser probabilistic defines probabilistic parsing which associates a probability with each parse
from nltk.parse.api import ParserI
from nltk.parse.bllip import BllipParser
from nltk.parse.chart import (
    BottomUpChartParser,
    BottomUpLeftCornerChartParser,
    ChartParser,
    LeftCornerChartParser,
    SteppingChartParser,
    TopDownChartParser,
)
from nltk.parse.corenlp import CoreNLPDependencyParser, CoreNLPParser
from nltk.parse.dependencygraph import DependencyGraph
from nltk.parse.earleychart import (
    EarleyChartParser,
    FeatureEarleyChartParser,
    FeatureIncrementalBottomUpChartParser,
    FeatureIncrementalBottomUpLeftCornerChartParser,
    FeatureIncrementalChartParser,
    FeatureIncrementalTopDownChartParser,
    IncrementalBottomUpChartParser,
    IncrementalBottomUpLeftCornerChartParser,
    IncrementalChartParser,
    IncrementalLeftCornerChartParser,
    IncrementalTopDownChartParser,
)
from nltk.parse.evaluate import DependencyEvaluator
from nltk.parse.featurechart import (
    FeatureBottomUpChartParser,
    FeatureBottomUpLeftCornerChartParser,
    FeatureChartParser,
    FeatureTopDownChartParser,
)
from nltk.parse.malt import MaltParser
from nltk.parse.nonprojectivedependencyparser import (
    NaiveBayesDependencyScorer,
    NonprojectiveDependencyParser,
    ProbabilisticNonprojectiveParser,
)
from nltk.parse.pchart import (
    BottomUpProbabilisticChartParser,
    InsideChartParser,
    LongestChartParser,
    RandomChartParser,
    UnsortedChartParser,
)
from nltk.parse.projectivedependencyparser import (
    ProbabilisticProjectiveDependencyParser,
    ProjectiveDependencyParser,
)
from nltk.parse.recursivedescent import (
    RecursiveDescentParser,
    SteppingRecursiveDescentParser,
)
from nltk.parse.shiftreduce import ShiftReduceParser, SteppingShiftReduceParser
from nltk.parse.transitionparser import TransitionParser
from nltk.parse.util import TestGrammar, extract_test_sentences, load_parser
from nltk.parse.viterbi import ViterbiParser