music21.text.assembleLyrics: support custom word separator#1797
Merged
mscuthbert merged 8 commits intocuthbertLab:masterfrom Jun 23, 2025
Merged
music21.text.assembleLyrics: support custom word separator#1797mscuthbert merged 8 commits intocuthbertLab:masterfrom
music21.text.assembleLyrics: support custom word separator#1797mscuthbert merged 8 commits intocuthbertLab:masterfrom
Conversation
Contributor
Author
|
Also I would like to add few Chinese folk music, such as Mo Li Hua into our corpus, for developers who want to test functionalities on East Asian languages. What do you think? |
Member
|
Thanks! I'm trying to make less-used additions keyword only and thought that all your tests had this. Will merge as soon as things pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds custom word separator support for
music21.text.assembleLyrics.Unlike European languages, in East Asian languages, words are not separated with space.
For example, This is a song's lyric extracted by music21:
也 许 很 远 或 是 昨 天 在 这 里 或 在 对 岸 长 路 辗 转 离 合 悲 欢 人 聚 又 人 散 放 过 对 错 才 知 答 案 活 着 的 勇 敢 没 有 神 的 光 环 你 我 生 而 平 凡After this PR, I'll be able to extract the lyrics like this with
assembleLyrics(stream, wordSeparator='')也许很远或是昨天在这里或在对岸长路辗转离合悲欢人聚又人散放过对错才知答案活着的勇敢没有神的光环你我生而平凡#1787 will be fixed.