MCPcopy Index your code
hub / github.com/CogComp/cogcomp-nlp

github.com/CogComp/cogcomp-nlp @4.0.13

Chat with this repo
repository ↗ · DeepWiki ↗ · release 4.0.13 ↗ · + Follow
9,551 symbols 36,832 edges 1,230 files 3,040 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CogCompNLP

Build Status Build status

This project collects a number of core libraries for Natural Language Processing (NLP) developed by Cognitive Computation Group.

How to use it?

Depending on what you are after, follow one of the items: - If you want to annotate your raw text (i.e. no need to open the annotator boxes to retrain them) you should look into the pipeline. - If you want to train and test an NLP annotator (i.e. you want to open an annotator box), see the list of components below and choose the desired one. - If you want to read a corpus you should look into the corpus-readers module. - If you want to do feature-extraction you should look into edison module.

CogComp's main NLP libraries

Each library contains detailed readme and instructions on how to use it. In addition the javadoc of the whole project is available here.

Module Description
nlp-pipeline Provides an end-to-end NLP processing application that runs a variety of NLP tools on input text.
core-utilities Provides a set of NLP-friendly data structures and a number of NLP-related utilities that support writing NLP applications, running experiments, etc.
corpusreaders Provides classes to read documents from corpora into core-utilities data structures.
curator Supports use of CogComp NLP Curator, a tool to run NLP applications as services.
edison A library for feature extraction from core-utilities data structures.
lemmatizer An application that uses WordNet and simple rules to find the root forms of words in plain text.
tokenizer An application that identifies sentence and word boundaries in plain text.
transliteration An application that transliterates names between different scripts.
pos An application that identifies the part of speech (e.g. verb + tense, noun + number) of each word in plain text.
ner An application that identifies named entities in plain text according to two different sets of categories.
md An application that identifies entity mentions in plain text.
relation-extraction An application that identifies entity mentions, then identify relation pairs among the mentions detected.
quantifier This tool detects mentions of quantities in the text, as well as normalizes it to a standard form.
inference A suite of unified wrappers to a set optimization libraries, as well as some basic approximate solvers.
depparse An application that identifies the dependency parse tree of a sentence.
verbsense This system addresses the verb sense disambiguation (VSD) problem for English.
prepsrl An application that identifies semantic relations expressed by prepositions and develops statistical learning models for predicting the relations.
commasrl This software extracts relations that commas participate in.
similarity This software compare objects --especially Strings-- and return a score indicating how similar they are.
temporal-normalizer A temporal extractor and normalizer.
dataless-classifier Classifies text into a user-specified label hierarchy from just the textual label descriptions
external-annotators A collection useful external annotators.
  • Questions? Have a look at our FAQs.

Using each library programmatically

To include one of the modules in your Maven project, add the following snippet with the #modulename# and #version entries replaced with the relevant module name and the version listed in this project's pom.xml file. Note that you also add to need the <repository> element for the CogComp maven repository in the <repositories> element.

    <dependencies>
         ...
        <dependency>
            <groupId>edu.illinois.cs.cogcomp</groupId>
            <artifactId>#modulename#</artifactId>
            <version>#version#</version>
        </dependency>
        ...
    </dependencies>
    ...
    <repositories>
        <repository>
            <id>CogCompSoftware</id>
            <name>CogCompSoftware</name>
            <url>http://cogcomp.org/m2repo/</url>
        </repository>
    </repositories>

Citing

If you are using the framework, please cite our paper:

@inproceedings{2018_lrec_cogcompnlp,
    author = {Daniel Khashabi, Mark Sammons, Ben Zhou, Tom Redman, Christos Christodoulopoulos, Vivek Srikumar, Nicholas Rizzolo, Lev Ratinov, Guanheng Luo, Quang Do, Chen-Tse Tsai, Subhro Roy, Stephen Mayhew, Zhili Feng, John Wieting, Xiaodong Yu, Yangqiu Song, Shashank Gupta, Shyam Upadhyay, Naveen Arivazhagan, Qiang Ning, Shaoshi Ling, Dan Roth},
    title = {CogCompNLP: Your Swiss Army Knife for NLP},
    booktitle = {11th Language Resources and Evaluation Conference},
    year = {2018},
    url = "http://cogcomp.org/papers/2018_lrec_cogcompnlp.pdf",
}

Extension points exported contracts — how you extend this code

Gazetteers (Interface)
This interface defines the gazetteers public API. There is only one method, to annotate the provided word object or Text [13 …
ner/src/main/java/edu/illinois/cs/cogcomp/ner/ExpressiveFeatures/Gazetteers.java
Metric (Interface)
Generic Interface to be used by classes corresponding to various types of similarity measures. @author mssammon @author [39 …
similarity/src/main/java/edu/illinois/cs/cogcomp/sim/Metric.java
ILPSolver (Interface)
Classes that implement this interface contain implementations of algorithms that solve Integer Linear Programming proble [8 …
inference/src/main/java/edu/illinois/cs/cogcomp/infer/ilp/ILPSolver.java
TextAnnotationBuilder (Interface)
The interface that will be used by any TextAnnotation creation method that requires tokenization. An implementation usin [6 …
core-utilities/src/main/java/edu/illinois/cs/cogcomp/annotation/TextAnnotationBuilder.java
FeatureExtractor (Interface)
An interface that specifies what a feature extractor should do. In general, a feature extractor looks at a {@code Co [164 …
edison/src/main/java/edu/illinois/cs/cogcomp/edison/features/FeatureExtractor.java
StateProcessor (Interface)
@author redman [9 implementers]
tokenizer/src/main/java/edu/illinois/cs/cogcomp/nlp/tokenizer/StateProcessor.java
LemmatizerInterface (Interface)
(no doc) [8 implementers]
lemmatizer/src/main/java/edu/illinois/cs/cogcomp/nlp/lemmatizer/MASCevaluation/LemmatizerInterface.java
Trainer (Interface)
(no doc) [6 implementers]
verbsense/src/main/java/edu/illinois/cs/cogcomp/verbsense/learn/CrossValidationHelper.java

Core symbols most depended-on inside this repo

get
called by 1380
core-utilities/src/main/java/edu/illinois/cs/cogcomp/nlp/pmi/CountsCache.java
println
called by 1316
ner/src/main/java/edu/illinois/cs/cogcomp/ner/IO/OutFile.java
add
called by 1208
transliteration/src/main/java/edu/illinois/cs/cogcomp/utils/TopList.java
size
called by 1083
transliteration/src/main/java/edu/illinois/cs/cogcomp/utils/TopList.java
put
called by 975
core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/datastructures/LRUCache.java
append
called by 863
core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/io/LineIO.java
length
called by 769
core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/datastructures/textannotation/Constituent.java
get
called by 477
edison/src/main/java/edu/illinois/cs/cogcomp/edison/annotators/WordNetPlusLemmaViewGenerator.java

Shape

Method 8,087
Class 1,299
Function 83
Enum 43
Interface 39

Languages

Java99%
Python1%

Modules by API surface

core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/utilities/protobuf/TextAnnotationImpl.java819 symbols
quantifier/src/main/java/edu/illinois/cs/cogcomp/quant/lbj/QuantitiesClassifier.java73 symbols
commasrl/src/main/java/edu/illinois/cs/cogcomp/comma/lbj/LocalCommaClassifier.java73 symbols
md/src/main/java/org/cogcomp/md/LbjGen/extent_classifier.java67 symbols
md/src/main/java/org/cogcomp/md/LbjGen/bio_joint_classifier.java67 symbols
md/src/main/java/org/cogcomp/md/LbjGen/bio_classifier_pro.java67 symbols
md/src/main/java/org/cogcomp/md/LbjGen/bio_classifier_nom.java67 symbols
md/src/main/java/org/cogcomp/md/LbjGen/bio_classifier_nam.java67 symbols
dataless-classifier/src/main/java/edu/illinois/cs/cogcomp/datalessclassification/hierarchy/UnorderedTree.java52 symbols
core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/datastructures/textannotation/View.java47 symbols
core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/datastructures/textannotation/Constituent.java46 symbols
commasrl/src/main/java/edu/illinois/cs/cogcomp/comma/datastructures/Comma.java40 symbols

Datastores touched

(mysql)Database · 1 repos
ontonotesDatabase · 1 repos

For agents

$ claude mcp add cogcomp-nlp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact