- 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
spaCy - Util.itershuffle
This utility function was introduced in version 2.0, which will shuffle an iterator. This function is good for batching and works by holding the bufsize items back and yielding them sometimes later.
Arguments
The table below explains its arguments −
NAME | TYPE | DESCRIPTION |
---|---|---|
iterable | iterable | It represents the iterator to shuffle. |
bufsize | int | This the buffer size for items to hold back. The default value is 1000. |
Example
An example of util.itershuffle() function is as follows −
import spacy value = range(1000) shuffled_value = spacy.util.itershuffle(values) shuffled_value
Output
The output is stated below −
<generator object itershuffle at 0x00000207BBBE4A20>
spacy_util_get_data_path.htm
Advertisements
To Continue Learning Please Login
Login with Google