< Summary

Class:Azure.AI.FormRecognizer.Training.CustomFormSubmodel
Assembly:Azure.AI.FormRecognizer
File(s):C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\CustomFormSubmodel.cs
Covered lines:7
Uncovered lines:1
Coverable lines:8
Total lines:40
Line coverage:87.5% (7 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_FormType()-100%100%
get_Accuracy()-0%100%
get_Fields()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\formrecognizer\Azure.AI.FormRecognizer\src\CustomFormSubmodel.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5
 6namespace Azure.AI.FormRecognizer.Training
 7{
 8    /// <summary>
 9    /// Represents a submodel that extracts fields from a specific type of form.
 10    /// </summary>
 11    public class CustomFormSubmodel
 12    {
 14813        internal CustomFormSubmodel(string formType, float? accuracy, IReadOnlyDictionary<string, CustomFormModelField> 
 14        {
 14815            FormType = formType;
 14816            Accuracy = accuracy;
 14817            Fields = fields;
 14818        }
 19
 20        /// <summary>
 21        /// The type of form this submodel recognizes.
 22        /// </summary>
 3623        public string FormType { get; }
 24
 25        /// <summary>
 26        /// The mean of the accuracies of this model's <see cref="CustomFormModelField"/>
 27        /// instances.
 28        /// </summary>
 029        public float? Accuracy { get; }
 30
 31        /// <summary>
 32        /// A dictionary of the fields that this submodel will recognize from the
 33        /// input document. The key is the <see cref="CustomFormModelField.Name"/>
 34        /// of the field. For models trained with labels, this is the training-time
 35        /// label of the field. For models trained with forms only, a unique name is
 36        /// generated for each field.
 37        /// </summary>
 33238        public IReadOnlyDictionary<string, CustomFormModelField> Fields { get; }
 39    }
 40}