private static IReadOnlyList <ExtractedField> ConvertFields(ICollection <KeyValuePair_internal> keyValuePairs, ReadResult_internal readResult)
        {
            List <ExtractedField> fields = new List <ExtractedField>();

            foreach (var kvp in keyValuePairs)
            {
                ExtractedField field = new ExtractedField(kvp, readResult);
                fields.Add(field);
            }
            return(fields);
        }
Beispiel #2
0
        internal FormTableCell(DataTableCell_internal dataTableCell, ReadResult_internal readResult, IReadOnlyList <string> references)
            : base(new BoundingBox(dataTableCell.BoundingBox), readResult.Page, dataTableCell.Text)
        {
            ColumnIndex = dataTableCell.ColumnIndex;
            ColumnSpan  = dataTableCell.ColumnSpan ?? 1;
            Confidence  = dataTableCell.Confidence;
            IsFooter    = dataTableCell.IsFooter ?? false;
            IsHeader    = dataTableCell.IsHeader ?? false;
            RowIndex    = dataTableCell.RowIndex;
            RowSpan     = dataTableCell.RowSpan ?? 1;

            if (references != null)
            {
                TextContent = ExtractedField.ConvertTextReferences(readResult, references);
            }
        }
Beispiel #3
0
        internal ExtractedTableCell(DataTableCell_internal dataTableCell, ReadResult_internal readResult, IReadOnlyList <string> references)
        {
            BoundingBox = new BoundingBox(dataTableCell.BoundingBox);
            ColumnIndex = dataTableCell.ColumnIndex;
            ColumnSpan  = dataTableCell.ColumnSpan ?? 1;
            Confidence  = dataTableCell.Confidence;
            IsFooter    = dataTableCell.IsFooter ?? false;
            IsHeader    = dataTableCell.IsHeader ?? false;
            RowIndex    = dataTableCell.RowIndex;
            RowSpan     = dataTableCell.RowSpan ?? 1;
            Text        = dataTableCell.Text;

            if (references != null)
            {
                RawExtractedItems = ExtractedField.ConvertTextReferences(readResult, references);
            }
        }