diff --git a/DysonNetwork.Sphere/Rewind/SphereRewindServiceGrpc.cs b/DysonNetwork.Sphere/Rewind/SphereRewindServiceGrpc.cs index 259ac64..68ed016 100644 --- a/DysonNetwork.Sphere/Rewind/SphereRewindServiceGrpc.cs +++ b/DysonNetwork.Sphere/Rewind/SphereRewindServiceGrpc.cs @@ -86,7 +86,7 @@ public class SphereRewindServiceGrpc( .Take(1000) .ToListAsync(); var segmenter = new JiebaSegmenter(); - var words = segmenter.CutForSearchInParallel(postContents); + var words = segmenter.CutInParallel(postContents, cutAll: true, hmm: false); var allWords = words.SelectMany(w => w); var topWords = allWords .GroupBy(w => w) @@ -132,7 +132,8 @@ public class SphereRewindServiceGrpc( .Where(c => c.Room.Type == ChatRoomType.Group) .Select(c => new { c.RoomId, c.CreatedAt, c.EndedAt }) .ToListAsync(); - var callDurations = groupCallRecords.Select(c => new { c.RoomId, Duration = (c.EndedAt ?? now).Minus(c.CreatedAt).Seconds }).ToList(); + var callDurations = groupCallRecords + .Select(c => new { c.RoomId, Duration = (c.EndedAt ?? now).Minus(c.CreatedAt).Seconds }).ToList(); var mostCalledRoomInfo = callDurations .GroupBy(c => c.RoomId) .Select(g => new { RoomId = g.Key, TotalDuration = g.Sum(c => c.Duration) }) @@ -150,7 +151,8 @@ public class SphereRewindServiceGrpc( .Where(c => c.Room.Type == ChatRoomType.DirectMessage) .Select(c => new { c.RoomId, c.CreatedAt, c.EndedAt, c.Room }) .ToListAsync(); - var directCallDurations = directCallRecords.Select(c => new { c.RoomId, c.Room, Duration = (c.EndedAt ?? now).Minus(c.CreatedAt).Seconds }).ToList(); + var directCallDurations = directCallRecords + .Select(c => new { c.RoomId, c.Room, Duration = (c.EndedAt ?? now).Minus(c.CreatedAt).Seconds }).ToList(); var mostCalledDirectRooms = directCallDurations .GroupBy(c => c.RoomId) .Select(g => new { ChatRoom = g.First().Room, TotalDuration = g.Sum(c => c.Duration) }) @@ -233,4 +235,4 @@ public class SphereRewindServiceGrpc( Data = GrpcTypeHelper.ConvertObjectToByteString(data) }; } -} +} \ No newline at end of file