Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/Utilities/NormStr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal sealed class NormStr
private NormStr(ReadOnlyMemory<char> str, int id, uint hash)
{
Contracts.Assert(id >= 0 || id == -1 && str.IsEmpty);
Value = str;
Value = new ReadOnlyMemory<char>(str.ToString().ToCharArray());
Comment thread
antoniovs1029 marked this conversation as resolved.
Outdated
Id = id;
_hash = hash;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.ML.Transforms/Text/TextNormalizing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ private void NormalizeSrc(in ReadOnlyMemory<char> src, ref ReadOnlyMemory<char>
if (min == 0)
{
Host.Assert(src.Length == len);
dst = src;
buffer.AppendSpan(span);
dst = buffer.ToString().AsMemory();
}
Comment thread
antoniovs1029 marked this conversation as resolved.
else
{
Expand Down