Issue #27 involved researching ways to integrate common nlp packages into pipelines. This issue is to track the implementation of the proposed solution (which is detailed as a comment on the original issue).
Context
This would allow users to easily initialise a healthchain pipeline from existing work in spacy, langchain or hugging-face.
Possible Implementation
The expected user interface should be:
# Import an external pipeline libraries pipeline = BasePipeline() pipeline.from_spacy('/path') pipeline.from_hf() pipeline.from_langchain()
The implementation should be reasonably opinionated in that it will require either raw text or a spaCy Document as an input and require either an augmented Document or a tabular object as an output.
All these libraries have significant flexibility which we will restrict to prioritise the use cases most relevant for HealthChain and to avoid re-inventing the wheel.
Description
Issue #27 involved researching ways to integrate common nlp packages into pipelines. This issue is to track the implementation of the proposed solution (which is detailed as a comment on the original issue).
Context
This would allow users to easily initialise a healthchain pipeline from existing work in spacy, langchain or hugging-face.
Possible Implementation
The expected user interface should be:
# Import an external pipeline libraries pipeline = BasePipeline() pipeline.from_spacy('/path') pipeline.from_hf() pipeline.from_langchain()
The implementation should be reasonably opinionated in that it will require either raw text or a spaCy
Document
as an input and require either an augmentedDocument
or a tabular object as an output.All these libraries have significant flexibility which we will restrict to prioritise the use cases most relevant for HealthChain and to avoid re-inventing the wheel.