DEV Community

David Condrey
David Condrey

Posted on

🚀 Introducing BridgeNLP: A Minimal, Universal Adapter for Seamless AI and NLP Integration

Hi everyone!

I’m thrilled to announce the release of bridgenlp, a Python package I’ve developed to help you connect advanced AI models and NLP pipelines with minimal friction.

🌟 What Is BridgeNLP?

BridgeNLP is a universal adapter framework that lets you plug cutting-edge models (like AllenNLP, Hugging Face, and multimodal tools) directly into structured pipelines like spaCy. It’s designed for:

  • ✅ NLP tasks like coreference resolution, semantic role labeling, named entity recognition
  • ✅ Multimodal tasks like image captioning, object detection, and text-image alignment
  • ✅ Developers who care about memory safety, modularity, and clean integration

⚙️ Key Features

  • 🛠 Minimal dependencies (just spaCy + NumPy by default)
  • 🧩 Modular design — add only the adapters you need
  • 🌍 Multilingual + multimodal support
  • ⚡ Memory-efficient, production-ready code
  • 📚 Well-documented, thoroughly tested

🔥 Quick Install

pip install bridgenlp
Enter fullscreen mode Exit fullscreen mode

Need extras?

pip install bridgenlp[allennlp]
pip install bridgenlp[huggingface]
pip install bridgenlp[multimodal]
Enter fullscreen mode Exit fullscreen mode

💻 Example Use

Hook up AllenNLP coreference to your spaCy pipeline:

import spacy
from bridgenlp.adapters.allen_coref import AllenNLPCorefBridge
from bridgenlp.pipes.spacy_pipe import SpacyBridgePipe

nlp = spacy.load("en_core_web_sm")
coref_bridge = AllenNLPCorefBridge()
nlp.add_pipe("bridgenlp", config={"bridge": coref_bridge})

doc = nlp("Julie hugged David because she missed him.")
for cluster in doc._.nlp_bridge_clusters:
    print("Coreference cluster:", [doc[start:end].text for start, end in cluster])
Enter fullscreen mode Exit fullscreen mode

*📦 Why Should You Care?
*

If you’ve ever:

  • Tried gluing together different AI/NLP libraries and cursed at the incompatibilities
  • Wanted to add powerful models to a project without heavyweight frameworks
  • Needed seamless token alignment across languages or modalities

…BridgeNLP is for you.

🌐 Learn More

📦 PyPI: https://pypi.org/project/bridgenlp/0.5.0/
💻 GitHub: https://github.com/dcondrey/BridgeNLP

🙏 How You Can Help

I’d love:

Bug reports and feature requests
Collaborators interested in pushing this to the next level

If this resonates, give it a spin, star the repo, or share with someone who needs it!

Top comments (0)