InferenceAI

Enter at least two characters to search.

Start free

Token Frequency

easyNLP12 min10 XP

Lowercase whitespace-separated tokens and return a frequency dictionary.

Examples

EXAMPLE WALKTHROUGHcase

A guided view of the published example, not a trace of your code.

INPUT["AI ai systems"]
TASKtoken_frequency()
EXPECTED OUTPUT{"ai":2,"systems":1}

Start with the input values shown in this example.

Example 1 of 2

Input: text = "AI ai systems"

Output: {"ai":2,"systems":1}

Explanation: case

Input: text = ""

Output: {}

Explanation: empty

Hint 1

Split after lowercasing.

Topics

PythonNLP