brk-code

nltk の API リファレンス

nltk (nltk/nltk) の公開 API 400 件 —— クラス 223、関数 45、メソッド 132。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: nltk/nltk

種別件数
クラス223
関数45
メソッド132

API 一覧

classnltk.app.chartparser_app.ChartView
A component for viewing charts.
methodnltk.app.chartparser_app.ChartView.draw()
Draw everything (from scratch).
methodnltk.app.chartparser_app.ChartView.mark_edge(edge, mark='#0df')
Mark an edge
methodnltk.app.chartparser_app.ChartView.unmark_edge(edge=None)
Unmark an edge (or all edges)
classnltk.app.rdparser_app.RecursiveDescentApp
A graphical tool for exploring the recursive descent parser.
methodnltk.app.rdparser_app.RecursiveDescentApp.mainloop(*args, **kwargs)
Enter the Tkinter mainloop.
classnltk.app.srparser_app.ShiftReduceApp
A graphical tool for exploring the shift-reduce parser.
methodnltk.app.srparser_app.ShiftReduceApp.mainloop(*args, **kwargs)
Enter the Tkinter mainloop.
classnltk.app.wordnet_app.Reference
A reference to a page that may be generated by page_word
funcnltk.app.wordnet_app.get_static_index_page(with_shutdown)
Get the static index page.
funcnltk.app.wordnet_app.get_static_web_help_page()
Return the static web help page.
funcnltk.app.wordnet_app.get_static_welcome_message()
Get the static welcome page.
funcnltk.app.wordnet_app.page_from_word(word)
Return a HTML page for the given word.
funcnltk.app.wordnet_app.usage()
Display the command line help message.
funcnltk.app.wordnet_app.wnb(port=8000, runBrowser=True, logfilename=None)
Run NLTK Wordnet Browser Server.
classnltk.ccg.api.AbstractCCGCategory
Interface for categories in combinatory grammars.
methodnltk.ccg.api.AbstractCCGCategory.is_primitive()
Returns true if the category is primitive.
methodnltk.ccg.api.AbstractCCGCategory.is_var()
Returns true if the category is a variable.
classnltk.ccg.api.CCGVar
Class representing a variable CCG category.
classnltk.ccg.api.Direction
Class representing the direction of a function application.
methodnltk.ccg.api.Direction.restrs()
A list of restrictions on the combinators.
classnltk.ccg.api.FunctionalCategory
Class that represents a function application category.
classnltk.ccg.api.PrimitiveCategory
Class representing primitive categories.
classnltk.ccg.chart.BackwardTypeRaiseRule
Class for applying backward type raising.
classnltk.ccg.chart.CCGChartParser
Chart parser for CCGs.
classnltk.ccg.chart.CCGLeafEdge
Class representing leaf edges in a CCG derivation.
classnltk.ccg.chart.ForwardTypeRaiseRule
Class for applying forward type raising
classnltk.ccg.combinator.BackwardCombinator
The backward equivalent of the ForwardCombinator class.
classnltk.ccg.combinator.DirectedBinaryCombinator
Wrapper for the undirected binary combinator.
classnltk.ccg.combinator.UndirectedBinaryCombinator
Abstract class for representing a binary combinator.
classnltk.ccg.combinator.UndirectedComposition
Functional composition (harmonic) combinator.
classnltk.ccg.combinator.UndirectedFunctionApplication
Class representing function application.
classnltk.ccg.combinator.UndirectedSubstitution
Substitution (permutation) combinator.
classnltk.ccg.combinator.UndirectedTypeRaise
Undirected combinator for type raising.
classnltk.ccg.lexicon.CCGLexicon
Class representing a lexicon for CCG grammars.
methodnltk.ccg.lexicon.CCGLexicon.start()
Return the target category for the parser
classnltk.ccg.lexicon.Token
Class representing a token.
funcnltk.ccg.lexicon.parseApplication(app)
Parse an application operator
methodnltk.chat.util.Chat.respond(str)
Generate a response to the user input.
classnltk.chunk.named_entity.Maxent_NE_Chunker
Expected input: list of pos-tagged words
classnltk.chunk.named_entity.NEChunkParser
Expected input: list of pos-tagged words
methodnltk.chunk.named_entity.NEChunkParser.parse(tokens)
Each token should be a pos-tagged word
classnltk.chunk.named_entity.NEChunkParserTagger
The IOB tagger used by the chunk parser.
classnltk.chunk.regexp.ChunkString
A string-based encoding of a particular chunking of a text.
classnltk.chunk.regexp.RegexpChunkParser
A regular expression based chunk parser.
classnltk.chunk.regexp.RegexpParser
A grammar based chunk parser.
classnltk.chunk.util.ChunkScore
A utility class for scoring chunk parsers.
classnltk.classify.naivebayes.NaiveBayesClassifier
A Naive Bayes classifier.
classnltk.classify.scikitlearn.SklearnClassifier
Wrapper for scikit-learn classifiers.
methodnltk.classify.scikitlearn.SklearnClassifier.classify_many(featuresets)
Classify a batch of samples.
classnltk.cluster.api.ClusterI
Interface covering basic clustering functionality.
methodnltk.cluster.api.ClusterI.cluster_names()
Returns the names of the clusters.
methodnltk.cluster.api.ClusterI.num_clusters()
Returns the number of clusters.
classnltk.cluster.util.Dendrogram
Represents a dendrogram, a tree with a specified branching order.
classnltk.collections.LazyConcatenation
A lazy sequence formed by concatenating a list of lists.
classnltk.collections.LazySubsequence
A subsequence produced by slicing a lazy sequence.
classnltk.collections.Trie
A Trie implementation for strings
classnltk.corpus.reader.aligned.AlignedCorpusReader
Reader for corpora of word-aligned sentences.
classnltk.corpus.reader.aligned.AlignedSentCorpusView
A specialized corpus view for aligned sentences.
classnltk.corpus.reader.bracket_parse.AlpinoCorpusReader
Reader for the Alpino Dutch Treebank.
classnltk.corpus.reader.chasen.ChasenCorpusView
A specialized corpus view for ChasenReader.
methodnltk.corpus.reader.chasen.ChasenCorpusView.read_block(stream)
Reads one paragraph at a time.
classnltk.corpus.reader.childes.CHILDESCorpusReader
Corpus reader for the XML version of the CHILDES corpus.
classnltk.corpus.reader.chunked.ChunkedCorpusReader
Reader for chunked (and optionally tagged) corpora.
classnltk.corpus.reader.conll.ConllCorpusReader
A corpus reader for CoNLL-style files.
classnltk.corpus.reader.conll.ConllSRLInstanceList
Set of instances for a single sentence
classnltk.corpus.reader.framenet.FramenetCorpusReader
A corpus reader for the Framenet Corpus.
methodnltk.corpus.reader.framenet.FramenetCorpusReader.fes(name=None, frame=None)
Lists frame element objects.
methodnltk.corpus.reader.framenet.FramenetCorpusReader.frames(name=None)
Obtain details for a specific frame.
methodnltk.corpus.reader.framenet.FramenetCorpusReader.semtypes()
Obtain a list of semantic types.
classnltk.corpus.reader.framenet.FramenetError
An exception class for framenet-related errors.
classnltk.corpus.reader.framenet.PrettyDict
Displays an abbreviated repr of values where possible.
classnltk.corpus.reader.ieer.IEERDocument
A class to represent a single document from the IEER corpus.
classnltk.corpus.reader.indian.IndianCorpusReader
List of words, one per line.
classnltk.corpus.reader.mte.MTECorpusView
Class for lazy viewing the MTE Corpus.
classnltk.corpus.reader.mte.MTEFileReader
Class for loading the content of the multext-east corpus.
classnltk.corpus.reader.nombank.NombankTreePointer
wordnum:height*wordnum:height*...
classnltk.corpus.reader.opinion_lexicon.OpinionLexiconCorpusReader
Reader for Liu and Hu opinion lexicon.
classnltk.corpus.reader.panlex_lite.Meaning
Represents a single PanLex meaning.
methodnltk.corpus.reader.panlex_lite.Meaning.id()
:return: the meaning's id.
methodnltk.corpus.reader.panlex_lite.Meaning.source()
:return: the meaning's source id.
classnltk.corpus.reader.plaintext.PlaintextCorpusReader
Reader for corpora that consist of plaintext documents.
classnltk.corpus.reader.ppattach.PPAttachmentCorpusReader
sentence_id verb noun1 preposition noun2 attachment
classnltk.corpus.reader.propbank.PropbankTreePointer
wordnum:height*wordnum:height*...
classnltk.corpus.reader.pros_cons.ProsConsCorpusReader
Reader for the Pros and Cons sentence dataset.
classnltk.corpus.reader.reviews.Review
A Review is the main block of a ReviewsCorpusReader.
methodnltk.corpus.reader.reviews.Review.features()
Return a list of features in the review.
classnltk.corpus.reader.rte.RTECorpusReader
Corpus reader for corpora in RTE challenges.
classnltk.corpus.reader.rte.RTEPair
Container for RTE text-hypothesis pairs.
classnltk.corpus.reader.semcor.SemcorCorpusReader
Corpus reader for the SemCor Corpus.
classnltk.corpus.reader.sinica_treebank.SinicaTreebankCorpusReader
Reader for the sinica treebank.
classnltk.corpus.reader.tagged.MacMorphoCorpusReader
A corpus reader for the MAC_MORPHO corpus.
classnltk.corpus.reader.tagged.TaggedCorpusReader
Reader for simple part-of-speech tagged corpora.
classnltk.corpus.reader.tagged.TaggedCorpusView
A specialized corpus view for tagged documents.
methodnltk.corpus.reader.tagged.TaggedCorpusView.read_block(stream)
Reads one paragraph at a time.
classnltk.corpus.reader.verbnet.VerbnetCorpusReader
An NLTK interface to the VerbNet verb lexicon.
classnltk.corpus.reader.wordlist.WordListCorpusReader
List of words, one per line.
classnltk.corpus.reader.wordnet.WordNetCorpusReader
A corpus reader used to access wordnet or its variants.
methodnltk.corpus.reader.wordnet.WordNetCorpusReader.of2ss(of)
take an id and return the synsets
methodnltk.corpus.reader.wordnet.WordNetCorpusReader.ss2of(ss)
return the ID of the synset
classnltk.corpus.reader.wordnet.WordNetError
An exception class for wordnet-related errors.
classnltk.corpus.reader.xmldocs.XMLCorpusReader
Corpus reader for corpora whose documents are xml files.
funcnltk.data.clear_cache()
Remove all objects from the resource cache.
funcnltk.decorators.getattr_(obj, name, default_thunk)
Similar to .setdefault in dictionaries.
funcnltk.decorators.update_wrapper(wrapper, model, infodict=None)
akin to functools.update_wrapper
classnltk.downloader.Collection
A directory entry for a collection of downloadable packages.
classnltk.downloader.DownloaderMessage
A status message object, used by ``incr_download`` to communicate its progress.
classnltk.downloader.ErrorMessage
Data server encountered an error
classnltk.downloader.FinishCollectionMessage
Data server has finished working on a collection of packages.
classnltk.downloader.FinishDownloadMessage
Data server has finished downloading a package.
classnltk.downloader.FinishPackageMessage
Data server has finished working on a package.
classnltk.downloader.FinishUnzipMessage
Data server has finished unzipping a package.
classnltk.downloader.Package
A directory entry for a downloadable package.
classnltk.downloader.ProgressMessage
Indicates how much progress the data server has made
classnltk.downloader.SelectDownloadDirMessage
Indicates what download directory the data server is using
classnltk.downloader.StaleMessage
The package download file is out-of-date or corrupt
classnltk.downloader.StartCollectionMessage
Data server has started working on a collection of packages.
classnltk.downloader.StartDownloadMessage
Data server has started downloading a package.
classnltk.downloader.StartPackageMessage
Data server has started working on a package.
classnltk.downloader.StartUnzipMessage
Data server has started unzipping a package.
classnltk.downloader.UpToDateMessage
The package download file is already up-to-date
classnltk.draw.cfg.CFGEditor
A dialog window for creating and editing context free grammars.
methodnltk.draw.table.Table.append(rowvalue)
Add a new row to the end of the table.
methodnltk.draw.table.Table.clear()
Delete all rows in this table.
methodnltk.draw.table.Table.extend(rowvalues)
Add new rows at the end of the table.
methodnltk.draw.table.Table.focus()
Direct (keyboard) input foxus to this widget.
methodnltk.draw.table.Table.hide_column(column_index)
:see: ``MultiListbox.hide_column()``
methodnltk.draw.table.Table.rowconfigure(row_index, cnf={}, **kw)
:see: ``MultiListbox.rowconfigure()``
methodnltk.draw.table.Table.select(index=None, delta=None, see=True)
:see: ``MultiListbox.select()``
methodnltk.draw.table.Table.show_column(column_index)
:see: ``MultiListbox.show_column()``
classnltk.draw.tree.TreeWidget
A canvas widget that displays a single Tree.
methodnltk.draw.tree.TreeWidget.bind_click_leaves(callback, button=1)
Add a binding to all leaves.
methodnltk.draw.tree.TreeWidget.bind_click_nodes(callback, button=1)
Add a binding to all nodes.
methodnltk.draw.tree.TreeWidget.bind_click_trees(callback, button=1)
Add a binding to all tree segments.
methodnltk.draw.tree.TreeWidget.bind_drag_leaves(callback, button=1)
Add a binding to all leaves.
methodnltk.draw.tree.TreeWidget.bind_drag_nodes(callback, button=1)
Add a binding to all nodes.
methodnltk.draw.tree.TreeWidget.bind_drag_trees(callback, button=1)
Add a binding to all tree segments.
methodnltk.draw.tree.TreeWidget.toggle_collapsed(treeseg)
Collapse/expand a tree.
classnltk.draw.util.BoxWidget
A canvas widget that places a box around a child widget.
classnltk.draw.util.CanvasFrame
A ``Tkinter`` frame containing a canvas and scrollbars.
methodnltk.draw.util.CanvasFrame.destroy(*e)
Destroy this ``CanvasFrame``.
methodnltk.draw.util.CanvasFrame.mainloop(*args, **kwargs)
Enter the Tkinter mainloop.
methodnltk.draw.util.CanvasFrame.pack(cnf={}, **kw)
Pack this ``CanvasFrame``.
classnltk.draw.util.ColorizedList
An abstract base class for displaying a colorized list of items.
methodnltk.draw.util.ColorizedList.mark(item)
Highlight the given item.
methodnltk.draw.util.ColorizedList.remove_callback(event, func=None)
Deregister a callback function.
methodnltk.draw.util.ColorizedList.set(items)
Modify the list of items contained by this list.
classnltk.draw.util.EntryDialog
A dialog box for entering
classnltk.draw.util.OvalWidget
A canvas widget that places a oval around a child widget.
classnltk.draw.util.ShowText
A ``Tkinter`` window used to display a text.
methodnltk.draw.util.ShowText.mainloop(*args, **kwargs)
Enter the Tkinter mainloop.
classnltk.draw.util.SpaceWidget
A canvas widget that takes up space but does not display anything.
methodnltk.draw.util.SpaceWidget.set_height(height)
Change the height of this space widget.
methodnltk.draw.util.SpaceWidget.set_width(width)
Change the width of this space widget.
classnltk.draw.util.TextWidget
A canvas widget that displays a single string of text.
classnltk.featstruct.FeatDict
A feature structure that acts like a Python dictionary.
methodnltk.featstruct.Feature.default()
Default value for this feature.
methodnltk.featstruct.Feature.name()
The name of this feature.
classnltk.featstruct.FeatureValueSet
A base feature value that is a set of other base feature values.
funcnltk.featstruct.demo(trace=False)
Just for testing
classnltk.grammar.CFG
A context-free grammar.
classnltk.grammar.DependencyGrammar
A dependency grammar.
methodnltk.grammar.DependencyGrammar.contains(head, mod)
:param head: A head word.
classnltk.grammar.DependencyProduction
A dependency grammar production.
classnltk.grammar.FeatStructNonterminal
A feature structure that's also a nonterminal.
classnltk.grammar.FeatureGrammar
A feature-based grammar.
classnltk.grammar.Nonterminal
A non-terminal symbol for a context free grammar.
classnltk.grammar.PCFG
A probabilistic context-free grammar.
classnltk.grammar.ProbabilisticProduction
A probabilistic context free grammar production.
classnltk.grammar.Production
A grammar production.
funcnltk.grammar.is_nonterminal(item)
:return: True if the item is a ``Nonterminal``.
classnltk.inference.api.BaseProverCommand
This class holds a ``Prover``, a goal, and a list of assumptions.
methodnltk.inference.api.BaseProverCommand.prove(verbose=False)
Perform the actual proof.
classnltk.inference.api.ModelBuilder
Interface for trying to build a model of set of formulas.
classnltk.inference.api.Prover
Interface for trying to prove a goal from assumptions.
classnltk.inference.api.ProverCommand
This class holds a ``Prover``, a goal, and a list of assumptions.
methodnltk.inference.api.ProverCommand.prove(verbose=False)
Perform the actual proof.
classnltk.inference.discourse.DiscourseTester
Check properties of an ongoing discourse.
classnltk.inference.mace.MaceCommand
A ``MaceCommand`` specific to the ``Mace`` model builder.
classnltk.inference.nonmonotonic.SetHolder
A list of sets of Variables.
classnltk.inference.prover9.Prover9Command
A ``ProverCommand`` specific to the ``Prover9`` prover.
classnltk.internals.Counter
A counter that auto-increments each time its value is read.
classnltk.internals.Deprecated
A base class used to mark deprecated classes.
classnltk.internals.ReadError
Exception raised by read_* functions when they fail.
funcnltk.internals.deprecated(message)
A decorator used to mark functions as deprecated.
funcnltk.jsontags.register_tag(cls)
Decorates a class to register it's json tag.
funcnltk.langnames.q2tag(qcode, strict=False)
Convert Wikidata Q-code to BCP-47 tag.
funcnltk.langnames.tag2q(tag, strict=False)
Convert BCP-47 tag to Wikidata Q-code.
classnltk.lazyimport.LazyModule
Lazy module class.
classnltk.lm.api.LanguageModel
ABC for Language Models.
methodnltk.lm.api.LanguageModel.fit(text, vocabulary_text=None)
Trains the model on a text.
methodnltk.lm.api.LanguageModel.generate(num_words=1, text_seed=None, random_seed=None)
Generate words from the model.
methodnltk.lm.api.LanguageModel.unmasked_score(word, context=None)
Score a word given some optional context.
classnltk.lm.counter.NgramCounter
Class for counting ngrams.
methodnltk.lm.counter.NgramCounter.N()
Returns grand total number of ngrams stored.
methodnltk.lm.counter.NgramCounter.update(ngram_text)
Updates ngram counts from `ngram_text`.
classnltk.lm.models.AbsoluteDiscountingInterpolated
Interpolated version of smoothing with absolute discount.
classnltk.lm.models.InterpolatedLanguageModel
Logic common to all interpolated language models.
classnltk.lm.models.KneserNeyInterpolated
Interpolated version of Kneser-Ney smoothing.
classnltk.lm.models.Laplace
Implements Laplace (add one) smoothing.
classnltk.lm.models.Lidstone
Provides Lidstone-smoothed scores.
classnltk.lm.models.MLE
Class for providing MLE ngram model scores.
classnltk.lm.models.StupidBackoff
Provides StupidBackoff scores.
classnltk.lm.models.WittenBellInterpolated
Interpolated version of Witten-Bell smoothing.
funcnltk.lm.preprocessing.padded_everygrams(order, sentence)
Helper with some useful defaults.
classnltk.lm.smoothing.AbsoluteDiscounting
Smoothing with absolute discount.
classnltk.lm.smoothing.KneserNey
Kneser-Ney Smoothing.
classnltk.lm.smoothing.WittenBell
Witten-Bell smoothing.
classnltk.lm.vocabulary.Vocabulary
Stores language model vocabulary.
methodnltk.lm.vocabulary.Vocabulary.cutoff()
Cutoff value.
methodnltk.lm.vocabulary.Vocabulary.lookup(words)
Look up one or more words in the vocabulary.
methodnltk.lm.vocabulary.Vocabulary.update(*counter_args, **counter_kwargs)
Update vocabulary counts.
classnltk.metrics.agreement.AnnotationTask
Represents an annotation task, i.e.
methodnltk.metrics.agreement.AnnotationTask.Do_Kw(max_distance=1.0)
Averaged over all labelers
methodnltk.metrics.agreement.AnnotationTask.S()
Bennett, Albert and Goldstein 1954
methodnltk.metrics.agreement.AnnotationTask.alpha()
Krippendorff 1980
methodnltk.metrics.agreement.AnnotationTask.pi()
Scott 1955; here, multi-pi.
methodnltk.metrics.agreement.AnnotationTask.weighted_kappa(max_distance=1.0)
Cohen 1968
methodnltk.metrics.agreement.AnnotationTask.weighted_kappa_pairwise(cA, cB, max_distance=1.0)
Cohen 1968
funcnltk.metrics.aline.R(p, q)
Return relevant features for segment comparison.
funcnltk.metrics.aline.V(p)
Return vowel weight if P is vowel.
funcnltk.metrics.aline.sigma_exp(p, q)
Returns score of an expansion/compression.
funcnltk.metrics.aline.sigma_skip(p)
Returns score of an indel of P.
funcnltk.metrics.aline.sigma_sub(p, q)
Returns score of a substitution of P with Q.
classnltk.metrics.association.BigramAssocMeasures
A collection of bigram association measures.
classnltk.metrics.association.QuadgramAssocMeasures
A collection of quadgram association measures.
classnltk.metrics.association.TrigramAssocMeasures
A collection of trigram association measures.
funcnltk.metrics.distance.binary_distance(label1, label2)
Simple equality test.
classnltk.metrics.paice.Paice
Class for storing lemmas, stems and evaluation metrics.
funcnltk.metrics.paice.demo()
Demonstration of the module.
classnltk.parse.bllip.BllipParser
Interface for parsing with BLLIP Parser.
methodnltk.parse.bllip.BllipParser.parse(sentence)
Use BLLIP Parser to parse a sentence.
methodnltk.parse.bllip.BllipParser.tagged_parse(word_and_tag_pairs)
Use BLLIP to parse a sentence.
classnltk.parse.chart.AbstractChartRule
An abstract base class for chart rules.
classnltk.parse.chart.BottomUpChartParser
A ``ChartParser`` using a bottom-up parsing strategy.
classnltk.parse.chart.CachedTopDownPredictRule
A cached version of ``TopDownPredictRule``.
methodnltk.parse.chart.Chart.edges()
Return a list of all edges in this chart.
methodnltk.parse.chart.Chart.initialize()
Clear the chart.
classnltk.parse.chart.ChartParser
A generic chart parser.
classnltk.parse.chart.EdgeI
A hypothesis about the structure of part of a sentence.
methodnltk.parse.chart.EdgeI.end()
Return the end index of this edge's span.
methodnltk.parse.chart.EdgeI.length()
Return the length of this edge's span.
methodnltk.parse.chart.EdgeI.start()
Return the start index of this edge's span.
classnltk.parse.chart.TopDownChartParser
A ``ChartParser`` using a top-down parsing strategy.
classnltk.parse.corenlp.CoreNLPDependencyParser
Dependency parser.
classnltk.parse.corenlp.CoreNLPParser
Skip these tests if CoreNLP is likely not ready.
classnltk.parse.corenlp.CoreNLPServerError
Exceptions associated with the Core NLP server.
classnltk.parse.corenlp.GenericCoreNLPParser
Interface to the CoreNLP Parser.
methodnltk.parse.corenlp.GenericCoreNLPParser.parse_sents(sentences, *args, **kwargs)
Parse multiple sentences.
methodnltk.parse.corenlp.GenericCoreNLPParser.parse_text(text, *args, **kwargs)
Parse a piece of text.
methodnltk.parse.corenlp.GenericCoreNLPParser.raw_parse(sentence, properties=None, *args, **kwargs)
Parse a sentence.
methodnltk.parse.corenlp.GenericCoreNLPParser.raw_parse_sents(sentences, verbose=False, properties=None, *args, **kwargs)
Parse multiple sentences.
methodnltk.parse.corenlp.GenericCoreNLPParser.raw_tag_sents(sentences, properties=None)
Tag multiple sentences.
methodnltk.parse.corenlp.GenericCoreNLPParser.tag(sentence:str, properties=None) -> list[tuple[str, str]]
Tag a list of tokens.
methodnltk.parse.corenlp.GenericCoreNLPParser.tag_sents(sentences, properties=None)
Tag multiple sentences.
methodnltk.parse.corenlp.GenericCoreNLPParser.tokenize(text, properties=None)
Tokenize a string of text.
methodnltk.parse.dependencygraph.DependencyGraph.connect_graph()
Fully connects all non-root nodes.
methodnltk.parse.dependencygraph.DependencyGraph.contains_cycle()
Check whether there are cycles.
methodnltk.parse.dependencygraph.DependencyGraph.to_conll(style)
The dependency graph in CoNLL format.
classnltk.parse.dependencygraph.DependencyGraphError
Dependency graph exception.
classnltk.parse.featurechart.FeatureChart
A Chart for feature grammars.
classnltk.parse.malt.MaltParser
A class for dependency parsing with MaltParser.
classnltk.parse.nonprojectivedependencyparser.NonprojectiveDependencyParser
A non-projective, rule-based, dependency parser.
classnltk.parse.nonprojectivedependencyparser.ProbabilisticNonprojectiveParser
A probabilistic non-projective dependency parser.
classnltk.parse.projectivedependencyparser.ProbabilisticProjectiveDependencyParser
A probabilistic, projective dependency parser.
classnltk.parse.projectivedependencyparser.ProjectiveDependencyParser
A projective, rule-based, dependency parser.
funcnltk.parse.shiftreduce.demo()
A demonstration of the shift-reduce parser.
classnltk.parse.stanford.GenericStanfordParser
Interface to the Stanford Parser
classnltk.parse.stanford.StanfordDependencyParser
>>> dep_parser=StanfordDependencyParser( ...
classnltk.parse.stanford.StanfordParser
>>> parser=StanfordParser( ...
classnltk.parse.transitionparser.TransitionParser
Class for transition based parser.
classnltk.parse.util.TestGrammar
Unit tests for CFG.
funcnltk.parse.viterbi.demo()
A demonstration of the probabilistic parsers.
classnltk.pathsec.ZipFile
Secure wrapper for zipfile.ZipFile.
funcnltk.pathsec.open(file, mode='r', *context='pathsec.open', *required_root=None, **kwargs)
Secure wrapper for builtins.open.
classnltk.picklesec.WarningUnpickler
Unpickler that emits PICKLE_WARNING once per instance.
funcnltk.picklesec.pickle_load(file:BinaryIO, *context:str | None=None, *restricted:bool=False) -> Any
Convenience wrapper similar to pickle.load(file).
classnltk.probability.FreqDist
A frequency distribution for the outcomes of an experiment.
methodnltk.probability.FreqDist.freq(sample)
Return the frequency of a given sample.
classnltk.probability.KneserNeyProbDist
Kneser-Ney estimate of a probability distribution.
classnltk.probability.ProbDistI
A probability distribution for the outcomes of an experiment.
methodnltk.probability.ProbDistI.prob(sample)
Return the probability for a given sample.
classnltk.probability.WittenBellProbDist
The Witten-Bell estimate of a probability distribution.
classnltk.sem.boxer.BoxerDrsParser
Reparse the str form of subclasses of ``AbstractBoxerDrs``
funcnltk.sem.chat80.sql_query(dbname, query)
Execute an SQL query over a database.
classnltk.sem.drt.DRS
A Discourse Representation Structure.
methodnltk.sem.drt.DRS.free()
:see: Expression.free()
methodnltk.sem.drt.DRS.get_refs(recursive=False)
:see: AbstractExpression.get_refs()
methodnltk.sem.drt.DRS.visit(function, combinator)
:see: Expression.visit()
methodnltk.sem.drt.DRS.visit_structured(function, combinator)
:see: Expression.visit_structured()
classnltk.sem.drt.DrtConcatenation
DRS of the form '(DRS + DRS)'
methodnltk.sem.drt.DrtConcatenation.get_refs(recursive=False)
:see: AbstractExpression.get_refs()
methodnltk.sem.drt.DrtConcatenation.visit(function, combinator)
:see: Expression.visit()
classnltk.sem.drt.DrtParser
A lambda calculus expression parser.
methodnltk.sem.drt.DrtParser.get_all_symbols()
This method exists to be overridden
classnltk.sem.evaluate.Assignment
A dictionary which represents an assignment of values to variables.
methodnltk.sem.evaluate.Assignment.purge(var=None)
Remove one or all keys (i.e.
classnltk.sem.evaluate.Model
A first order model is a domain *D* of discourse and a valuation *V*.
methodnltk.sem.evaluate.Model.i(parsed, g, trace=False)
An interpretation function.
funcnltk.sem.evaluate.arity(rel)
Check the arity of a relation.
funcnltk.sem.evaluate.demo(num=0, trace=None)
Run exists demos.
funcnltk.sem.evaluate.folmodel(quiet=False, trace=None)
Example of a first-order model.
funcnltk.sem.evaluate.propdemo(trace=None)
Example of a propositional model.
classnltk.sem.linearlogic.LinearLogicParser
A linear logic expression parser.
classnltk.sem.logic.AndExpression
This class represents conjunctions
methodnltk.sem.logic.BinaryExpression.findtype(variable)
:see Expression.findtype()
methodnltk.sem.logic.BinaryExpression.visit(function, combinator)
:see: Expression.visit()
classnltk.sem.logic.EqualityExpression
This class represents equality expressions like "(x = y)".
classnltk.sem.logic.Expression
This is the base abstract object for all logical expressions
methodnltk.sem.logic.Expression.equiv(other, prover=None)
Check for logical equivalence.
methodnltk.sem.logic.Expression.normalize(newvars=None)
Rename auto-generated unique variables
methodnltk.sem.logic.Expression.typecheck(signature=None)
Infer and check types.
methodnltk.sem.logic.Expression.visit(function, combinator)
Recursively visit subexpressions.
methodnltk.sem.logic.Expression.visit_structured(function, combinator)
Recursively visit subexpressions.
classnltk.sem.logic.IffExpression
This class represents biconditionals
classnltk.sem.logic.ImpExpression
This class represents implications
classnltk.sem.logic.LogicParser
A lambda calculus expression parser.
methodnltk.sem.logic.LogicParser.get_all_symbols()
This method exists to be overridden
methodnltk.sem.logic.LogicParser.parse(data, signature=None)
Parse the expression.
methodnltk.sem.logic.LogicParser.process(data)
Split the data into tokens
methodnltk.sem.logic.LogicParser.token(location=None)
Get the next waiting token.
methodnltk.sem.logic.NegatedExpression.negate()
:see: Expression.negate()
methodnltk.sem.logic.NegatedExpression.visit(function, combinator)
:see: Expression.visit()
classnltk.sem.logic.OrExpression
This class represents disjunctions
funcnltk.sem.logic.binding_ops()
Binding operators
funcnltk.sem.logic.boolean_ops()
Boolean operators
funcnltk.sem.logic.equality_preds()
Equality predicates
funcnltk.sem.logic.unique_variable(pattern=None, ignore=None)
Return a new, unique variable.
funcnltk.sem.relextract.class_abbrev(type)
Abbreviate an NE class name.
funcnltk.sem.relextract.clause(reldict, relsym)
Print the relation in clausal form.
funcnltk.sem.relextract.rtuple(reldict, lcon=False, rcon=False)
Pretty print the reldict as an rtuple.
classnltk.sentiment.vader.SentimentIntensityAnalyzer
Give a sentiment intensity score to sentences.
classnltk.sentiment.vader.VaderConstants
A class to keep the Vader lists and constants.
classnltk.stem.api.StemmerI
A processing interface for removing morphological affixes from words.
classnltk.stem.arlstem2.ARLSTem2
Return a stemmed Arabic word after removing affixes.
methodnltk.stem.arlstem2.ARLSTem2.adjective(token)
remove the infixes from adjectives
methodnltk.stem.arlstem2.ARLSTem2.pref(token)
remove prefixes from the words' beginning.
methodnltk.stem.arlstem2.ARLSTem2.stem1(token)
call this function to get the first stem
methodnltk.stem.arlstem2.ARLSTem2.suff(token)
remove the suffixes from the word's ending.
methodnltk.stem.arlstem2.ARLSTem2.verb(token)
stem the verb prefixes and suffixes or both
methodnltk.stem.arlstem2.ARLSTem2.verb_t3(token)
stem the present tense suffixes
methodnltk.stem.arlstem2.ARLSTem2.verb_t4(token)
stem the present tense prefixes
methodnltk.stem.arlstem2.ARLSTem2.verb_t5(token)
stem the future tense prefixes
methodnltk.stem.arlstem2.ARLSTem2.verb_t6(token)
stem the imperative tense prefixes
classnltk.stem.porter.PorterStemmer
A word stemmer based on the Porter stemming algorithm.
classnltk.stem.rslp.RSLPStemmer
A stemmer for Portuguese.
classnltk.stem.snowball.DanishStemmer
The Danish Snowball stemmer.
classnltk.stem.snowball.DutchStemmer
The Dutch Snowball stemmer.
classnltk.stem.snowball.EnglishStemmer
The English Snowball stemmer.
classnltk.stem.snowball.FinnishStemmer
The Finnish Snowball stemmer.
classnltk.stem.snowball.FrenchStemmer
The French Snowball stemmer.
classnltk.stem.snowball.GermanStemmer
The German Snowball stemmer.
classnltk.stem.snowball.HungarianStemmer
The Hungarian Snowball stemmer.
classnltk.stem.snowball.ItalianStemmer
The Italian Snowball stemmer.
classnltk.stem.snowball.NorwegianStemmer
The Norwegian Snowball stemmer.
classnltk.stem.snowball.PorterStemmer
A word stemmer based on the original Porter stemming algorithm.
classnltk.stem.snowball.PortugueseStemmer
The Portuguese Snowball stemmer.
classnltk.stem.snowball.RomanianStemmer
The Romanian Snowball stemmer.
classnltk.stem.snowball.RussianStemmer
The Russian Snowball stemmer.
classnltk.stem.snowball.SpanishStemmer
The Spanish Snowball stemmer.
classnltk.stem.snowball.SwedishStemmer
The Swedish Snowball stemmer.
classnltk.tag.api.FeaturesetTaggerI
A tagger that requires tokens to be ``featuresets``.
classnltk.tag.api.TaggerI
A processing interface for assigning a tag to each token in a list.
classnltk.tag.brill.BrillTagger
Brill's transformational rule-based tagger.
classnltk.tag.brill.Pos
Feature which examines the tags of nearby tokens.
methodnltk.tag.brill.Pos.extract_property(tokens, index)
@return: The given token's tag.
classnltk.tag.brill.Word
Feature which examines the text (word) of nearby tokens.
methodnltk.tag.brill.Word.extract_property(tokens, index)
@return: The given token's text.
classnltk.tag.brill_trainer.BrillTaggerTrainer
A trainer for tbl taggers.
classnltk.tag.hmm.HiddenMarkovModelTrainer
Algorithms for learning HMM parameters from training data.
classnltk.tag.hunpos.HunposTagger
A class for pos tagging with HunPos.
methodnltk.tag.hunpos.HunposTagger.close()
Closes the pipe to the hunpos executable.
methodnltk.tag.hunpos.HunposTagger.tag(tokens)
Tags a single sentence: a list of words.
classnltk.tag.perceptron.AveragedPerceptron
An averaged perceptron, as implemented by Matthew Honnibal.
methodnltk.tag.perceptron.AveragedPerceptron.load(path)
Load the json model weights.
methodnltk.tag.perceptron.AveragedPerceptron.save(path)
Save the model weights as json
methodnltk.tag.perceptron.AveragedPerceptron.update(truth, guess, features)
Update the feature weights.
classnltk.tag.sequential.ClassifierBasedPOSTagger
A classifier based part of speech tagger.
classnltk.tag.sequential.DefaultTagger
A tagger that assigns the same tag to every token.
classnltk.tag.stanford.StanfordNERTagger
A class for Named-Entity Tagging with Stanford Tagger.
classnltk.tag.stanford.StanfordPOSTagger
A class for pos tagging with Stanford Tagger.
classnltk.tag.stanford.StanfordTagger
An interface to Stanford taggers.
classnltk.tag.tnt.TnT
TnT statistical part of speech tagger.
methodnltk.tag.tnt.TnT.tag(tokens, segment=False)
Tag a single sentence.
methodnltk.tag.tnt.TnT.tagdata(data, segment=False)
Tags a list of sentences.
funcnltk.tag.tnt.demo(test_size=1000)
Evaluate TnT on a held-out Treebank slice.
funcnltk.tbl.demo.demo()
Run a demo with defaults.
funcnltk.tbl.demo.demo_high_accuracy_rules()
Discard rules with low accuracy.
funcnltk.tbl.demo.demo_template_statistics()
Show aggregate statistics per template.
funcnltk.tbl.demo.demo_verbose_rule_format()
Exemplify Rule.format("verbose")
classnltk.tbl.feature.Feature
An abstract base class for Features.
methodnltk.tbl.rule.Rule.format(fmt)
Return a string representation of this rule.
classnltk.text.ContextIndex
A bidirectional index between words and their 'contexts' in a text.
methodnltk.text.Text.vocab()
:seealso: nltk.prob.FreqDist
classnltk.tgrep.TgrepException
Tgrep exception type.
classnltk.tokenize.api.TokenizerI
A processing interface for tokenizing a string.
methodnltk.tokenize.api.TokenizerI.tokenize(s:str) -> list[str]
Return a tokenized copy of *s*.
methodnltk.tokenize.api.TokenizerI.tokenize_sents(strings:list[str]) -> list[list[str]]
Apply ``self.tokenize()`` to each element of ``strings``.
classnltk.tokenize.casual.TweetTokenizer
Tokenizer for tweets.
methodnltk.tokenize.casual.TweetTokenizer.PHONE_WORD_RE() -> 'regex.Pattern'
Secondary core TweetTokenizer regex

この情報について

掲載しているシグネチャは nltk/nltk の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る