All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.luna.api.xfyun.ocr.dto.OcrTextDTO Maven / Gradle / Ivy

The newest version!
package com.luna.api.xfyun.ocr.dto;

import java.util.List;

import com.alibaba.fastjson2.annotation.JSONField;

import lombok.Data;

@Data
public class OcrTextDTO {

    @JSONField(name = "pages")
    private List pages;

    @JSONField(name = "category")
    private String          category;

    @JSONField(name = "version")
    private String          version;

    @Data
    public static class PagesItem {

        @JSONField(name = "exception")
        private int             exception;

        @JSONField(name = "width")
        private int             width;

        @JSONField(name = "angle")
        private int             angle;

        @JSONField(name = "lines")
        private List lines;

        @JSONField(name = "height")
        private int             height;
    }

    @Data
    public static class CenterPoint {

        @JSONField(name = "x")
        private int X;

        @JSONField(name = "y")
        private int Y;
    }

    @Data
    public static class LinesItem {

        @JSONField(name = "exception")
        private int                 exception;

        @JSONField(name = "coord")
        private List     coord;

        @JSONField(name = "words")
        private List     words;

        @JSONField(name = "angle")
        private int                 angle;

        @JSONField(name = "conf")
        private double              conf;

        @JSONField(name = "word_units")
        private List wordUnits;
    }

    @Data
    public static class CoordItem {

        @JSONField(name = "x")
        private int X;

        @JSONField(name = "y")
        private int Y;
    }

    @Data
    public static class WordsItem {

        @JSONField(name = "coord")
        private List coord;

        @JSONField(name = "conf")
        private double          conf;

        @JSONField(name = "content")
        private String          content;
    }

    @Data
    public static class WordUnitsItem {

        @JSONField(name = "center_point")
        private CenterPoint     centerPoint;

        @JSONField(name = "coord")
        private List coord;

        @JSONField(name = "conf")
        private double          conf;

        @JSONField(name = "content")
        private String          content;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy