Skip to content

Commit

Permalink
fix cpword token type graph (adding ignore key)
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed May 18, 2023
1 parent 4cf8cb8 commit 9970ec4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miditok/tokenizations/cp_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ def _create_token_types_graph(self) -> Dict[str, List[str]]:
dic["Rest"] = ["Rest", "Position", "Bar"]
dic["Pitch"] += ["Rest"]

for key in dic:
dic[key].append("Ignore")
dic["Ignore"] = list(dic.keys())

return dic

@_in_as_seq()
Expand Down

0 comments on commit 9970ec4

Please sign in to comment.