File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 2727 <PackageReference Condition =" '$(Configuration)' == 'Debug'" Include =" Avalonia.Diagnostics" Version =" 11.2.2" />
2828 <PackageReference Include =" BunLabs.NAudio.Flac" Version =" 2.0.1" />
2929 <PackageReference Include =" csharp-kana" Version =" 1.0.1" />
30- <PackageReference Include =" csharp-pinyin" Version =" 1.0.0 " />
30+ <PackageReference Include =" csharp-pinyin" Version =" 1.0.1 " />
3131 <PackageReference Include =" Flurl.Http" Version =" 4.0.2" />
32- <PackageReference Include =" Markdown.Avalonia" Version =" 11.0.2 " />
33- <PackageReference Include =" Microsoft.Extensions.ObjectPool" Version =" 8 .0.6 " />
32+ <PackageReference Include =" Markdown.Avalonia" Version =" 11.0.3-a1 " />
33+ <PackageReference Include =" Microsoft.Extensions.ObjectPool" Version =" 9 .0.0 " />
3434 <PackageReference Include =" NAudio" Version =" 2.2.1" />
3535 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
3636 <PackageReference Include =" NLayer.NAudioSupport" Version =" 1.4.0" />
3737 <PackageReference Include =" PinYinConverterCore" Version =" 1.0.2" />
3838 <PackageReference Include =" ppy.SDL2-CS" Version =" 1.0.741-alpha" />
3939 <PackageReference Include =" Svg.Skia" Version =" 2.0.0.4" />
40+ <PackageReference Include =" System.Net.Http" Version =" 4.3.4" />
41+ <PackageReference Include =" System.Text.RegularExpressions" Version =" 4.3.1" />
4042 <PackageReference Include =" Tomlyn" Version =" 0.17.0" />
41- <PackageReference Include =" ZstdSharp.Port" Version =" 0.8.1 " />
43+ <PackageReference Include =" ZstdSharp.Port" Version =" 0.8.3 " />
4244 </ItemGroup >
4345
4446 <ItemGroup >
Original file line number Diff line number Diff line change 11using Pinyin ;
22using System . Collections . Generic ;
33using System . Linq ;
4+ using System . Text . RegularExpressions ;
45
56namespace TuneLab . Utils ;
67
@@ -49,7 +50,9 @@ public static List<string> SplitLyrics(string lyrics)
4950
5051 public static List < string > SplitToWords ( string lyric )
5152 {
52- return Pinyin . ChineseG2p . SplitString ( lyric ) ;
53+ string pattern = "(?![ー\u309c ])([a-zA-Z]+|[+-]|[0-9]|[\\ u4e00-\\ u9fa5]|[\\ u3040-\\ u309F\\ u30A0-\\ u30FF][ャュョゃゅょァィゥェォぁぃぅぇぉ]?)" ;
54+ return ( from Match m in Regex . Matches ( lyric , pattern )
55+ select m . Value ) . ToList ( ) ;
5356 }
5457
5558 public static IEnumerable < string > SplitByInvailidChars ( string lyric )
You can’t perform that action at this time.
0 commit comments