From the course: Applied AI: Getting Started with Hugging Face Transformers

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Running the standard NER pipeline

Running the standard NER pipeline

- [Instructor] The code for this chapter is available in the notebook Code_06_XX Named Entity Recognition. Let's open the notebook now. The first code block is similar to the previous chapter to load the transformers module and set the log level. Let's run this code now. For running the NER pipeline, we start with the input text, Sam went to California on the 23rd of August. There he visited Google headquarters with John Smith and bought a cap for $23. We create a pipeline for NER with the standard model and passed this text to this pipeline. Let's run the pipeline and explore the results. Once again, the model artifacts are downloaded into the cache directory and reused later. The output of NER shows multiple entities identified. For each entity there are multiple pieces of information. The entity type is presented first. The first entity is a person. The score is the confidence score for that specific entity prediction.…

Contents