Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Notgnoshi/generative
/ normalize
Function
normalize
tools/random-production-rules.py:200–204 ·
view source on GitHub ↗
(distribution)
Source
from the content-addressed store, hash-verified
198
199
200
def
normalize(distribution):
201
denom = sum(distribution.values())
202
for
token in distribution:
203
distribution[token] = distribution[token] / denom
204
return
distribution
205
206
207
def
generate_rhs_token(
Callers
1
bias
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected