MCPcopy
hub / github.com/explosion/spaCy / _format_freqs

Function _format_freqs

spacy/cli/debug_data.py:1009–1016  ·  view source on GitHub ↗
(freqs: Dict[int, float], sort: bool = True)

Source from the content-addressed store, hash-verified

1007
1008
1009def _format_freqs(freqs: Dict[int, float], sort: bool = True) -> str:
1010 if sort:
1011 freqs = dict(sorted(freqs.items()))
1012
1013 _freqs = [(str(k), v) for k, v in freqs.items()]
1014 return ", ".join(
1015 [f"{l} ({c}%)" for l, c in cast(Iterable[Tuple[str, float]], _freqs)]
1016 )
1017
1018
1019def _get_examples_without_label(

Callers 1

debug_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…