A simple NLP pipeline using spaCy
Project description
MyPackage
MyPackage is a Python package that provides a simple NLP pipeline using spaCy.
Installation
Clone the repository and navigate to the root directory. Then run the following command:
pip install NLPSimplified
pip install spacy
spacy download en_core_web_sm
Here's some example code:
from NLPSimplified import NlpPipeline, tokenize, pos_tagging, named_entity_recognition
def main():
# Create an instance of NlpPipeline
pipeline = NlpPipeline()
# Add the functions to the pipeline
pipeline.add_to_pipeline(tokenize)
pipeline.add_to_pipeline(pos_tagging)
pipeline.add_to_pipeline(named_entity_recognition)
# Sample text
text = "OpenAI is a research organization located in San Francisco."
# Process the text through the pipeline
doc = pipeline.process(text)
# Print the results
print("Tokens:", doc._.tokens)
print("POS tags:", doc._.pos_tags)
print("Named entities:", doc._.entities)
if __name__ == "__main__":
main()
Thanks to the spaCy team for developing the spaCy module, which forms the basis of this module!!
Contributions
Contributions can be made at the official GitHub page at : https://github.com/RedMythic1/NLPSimplified/
License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contact
Contact me at avnehb@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
NLPSimplified-1.0.3.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for NLPSimplified-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfbaade3cceec84e0962afe7c48820ed0a834a03449154b35b31537031be05df |
|
MD5 | e3d379219aa217843cbedfbab9825a0a |
|
BLAKE2b-256 | fd77e7afcf1a8252f685ce9a0027ebdcffecb1be8f961ced50d6355a5a8b6fb5 |