Skip to content

Commit

Permalink
chore:
Browse files Browse the repository at this point in the history
  • Loading branch information
pk5ls20 committed Oct 28, 2024
1 parent e1ed7d9 commit c3631e5
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions Lagrange.Core/Common/Entity/ImageOcrResultEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ namespace Lagrange.Core.Common.Entity
[Serializable]
public class ImageOcrResult
{
[JsonPropertyName("texts")]
public List<TextDetection> Texts { get; set; }
[JsonPropertyName("texts")] public List<TextDetection> Texts { get; set; }

[JsonPropertyName("language")]
public string Language { get; set; }
[JsonPropertyName("language")] public string Language { get; set; }

public ImageOcrResult(List<TextDetection> texts, string language)
{
Expand All @@ -21,14 +19,11 @@ public ImageOcrResult(List<TextDetection> texts, string language)
[Serializable]
public class TextDetection
{
[JsonPropertyName("text")]
public string Text { get; set; }
[JsonPropertyName("text")] public string Text { get; set; }

[JsonPropertyName("confidence")]
public int Confidence { get; set; }
[JsonPropertyName("confidence")] public int Confidence { get; set; }

[JsonPropertyName("coordinates")]
public List<Coordinate> Coordinates { get; set; }
[JsonPropertyName("coordinates")] public List<Coordinate> Coordinates { get; set; }

public TextDetection(string text, int confidence, List<Coordinate> coordinates)
{
Expand All @@ -41,11 +36,9 @@ public TextDetection(string text, int confidence, List<Coordinate> coordinates)
[Serializable]
public class Coordinate
{
[JsonPropertyName("x")]
public int X { get; set; }
[JsonPropertyName("x")] public int X { get; set; }

[JsonPropertyName("y")]
public int Y { get; set; }
[JsonPropertyName("y")] public int Y { get; set; }

public Coordinate(int x, int y)
{
Expand Down

0 comments on commit c3631e5

Please sign in to comment.