wordle.frequency
¶
Functions to determine word token frequency for wordclouds.
New in version 0.2.0.
Functions:
|
Returns a dictionary mapping the words in files in |
|
Returns a dictionary mapping the words in the file to their frequencies. |
|
Returns a dictionary mapping the words in files in |
|
Returns a |
-
frequency_from_directory
(directory, exclude_words=(), exclude_dirs=())[source]¶ Returns a dictionary mapping the words in files in
directory
to their frequencies.- Parameters
New in version 0.2.0.
- Return type
-
frequency_from_file
(filename, exclude_words=())[source]¶ Returns a dictionary mapping the words in the file to their frequencies.
- Parameters
New in version 0.2.0.
See also
func:~.get_tokens
- Return type
-
frequency_from_git
(git_url, sha=None, depth=None, exclude_words=(), exclude_dirs=())[source]¶ Returns a dictionary mapping the words in files in
directory
to their frequencies.- Parameters
git_url (
str
) – The url of the git repository to processsha (
Optional
[str
]) – An optional SHA hash of a commit to checkout. DefaultNone
.depth (
Optional
[int
]) – An optional depth to clone at. IfNone
andsha
isNone
the depth is1
. IfNone
andsha
is given the depth is unlimited. DefaultNone
.exclude_words (
Sequence
[str
]) – An optional list of words to exclude. Default()
.exclude_dirs (
Sequence
[Union
[str
,Path
,PathLike
]]) – An optional list of directories to exclude. Default()
.
New in version 0.2.0.
- Return type