Home Whiteboard Graphing Calculator Online Compilers Articles Tools

Explore Categories

Find the perfect tutorial for your learning journey

Python TechnologiesDatabasesComputer ProgrammingWeb DevelopmentJava TechnologiesComputer ScienceMobile DevelopmentBig Data & AnalyticsMicrosoft TechnologiesDevOpsLatest TechnologiesMachine LearningDigital MarketingSoftware QualityManagement Tutorials View All Categories
Tutorials Courses Jobs Login
spaCy Tutorial
  • spaCy - Home
  • spaCy - Introduction
  • spaCy - Getting Started
  • spaCy - Models and Languages
  • spaCy - Architecture
  • spaCy - Command Line Helpers
  • spaCy - Top-level Functions
  • spaCy - Visualization Function
  • spaCy - Utility Functions
  • spaCy - Compatibility Functions
  • spaCy - Containers
  • Doc Class ContextManager and Property
  • spaCy - Container Token Class
  • spaCy - Token Properties
  • spaCy - Container Span Class
  • spaCy - Span Class Properties
  • spaCy - Container Lexeme Class
  • Training Neural Network Model
  • Updating Neural Network Model
  • spaCy Useful Resources
  • spaCy - Quick Guide
  • spaCy - Useful Resources
  • spaCy - Discussion
Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Online Resume Builder
  • HR Interview Questions
  • Computer Glossary
  • Who is Who
Home Spacy spaCy - Doc._ _len_ _ Method

spaCy - Doc._ _len_ _ Method



Previous
Quiz
Next

As name implies, this method of Doc class will get the number of tokens in the document.

Example

An example of Doc._ _len_ _is given below −

import spacy
nlp_model = spacy.load("en_core_web_sm")
doc = nlp_model("This is Tutorialspoint.com.")
len(doc)

Output

3
spacy_containers.htm
Previous Quiz Next
Advertisements
  • ABOUT US
  • OUR TEAM
  • CAREERS
  • JOBS
  • CONTACT US
  • TERMS OF USE
  • PRIVACY POLICY
  • REFUND POLICY
  • COOKIES POLICY
  • FAQ'S
tutorials point logo
Download Android App Download IOS App

Tutorials Point is a leading Ed Tech company striving to provide the best learning material on technical and non-technical subjects.

Copyright 2026. All Rights Reserved.