Skip to content

Commit

Permalink
feat: update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYunPlayer committed Dec 2, 2024
1 parent 95bbfd7 commit bfbce50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions TuneLab/TuneLab.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,20 @@
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.2" />
<PackageReference Include="BunLabs.NAudio.Flac" Version="2.0.1" />
<PackageReference Include="csharp-kana" Version="1.0.1" />
<PackageReference Include="csharp-pinyin" Version="1.0.0" />
<PackageReference Include="csharp-pinyin" Version="1.0.1" />
<PackageReference Include="Flurl.Http" Version="4.0.2" />
<PackageReference Include="Markdown.Avalonia" Version="11.0.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="8.0.6" />
<PackageReference Include="Markdown.Avalonia" Version="11.0.3-a1" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="9.0.0" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLayer.NAudioSupport" Version="1.4.0" />
<PackageReference Include="PinYinConverterCore" Version="1.0.2" />
<PackageReference Include="ppy.SDL2-CS" Version="1.0.741-alpha" />
<PackageReference Include="Svg.Skia" Version="2.0.0.4" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="Tomlyn" Version="0.17.0" />
<PackageReference Include="ZstdSharp.Port" Version="0.8.1" />
<PackageReference Include="ZstdSharp.Port" Version="0.8.3" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion TuneLab/Utils/LyricUtils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Pinyin;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace TuneLab.Utils;

Expand Down Expand Up @@ -49,7 +50,9 @@ public static List<string> SplitLyrics(string lyrics)

public static List<string> SplitToWords(string lyric)
{
return Pinyin.ChineseG2p.SplitString(lyric);
string pattern = "(?![ー\u309c])([a-zA-Z]+|[+-]|[0-9]|[\\u4e00-\\u9fa5]|[\\u3040-\\u309F\\u30A0-\\u30FF][ャュョゃゅょァィゥェォぁぃぅぇぉ]?)";
return (from Match m in Regex.Matches(lyric, pattern)
select m.Value).ToList();
}

public static IEnumerable<string> SplitByInvailidChars(string lyric)
Expand Down

0 comments on commit bfbce50

Please sign in to comment.