Skip to content

Commit b4b74c2

Browse files
Removed the slnx and added sln for smart data extractor
1 parent cf5f992 commit b4b74c2

File tree

37 files changed

+237
-109
lines changed

37 files changed

+237
-109
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.4.11626.88 stable
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apply-Confidence-Threshold-to-Extract-data", "Apply-Confidence-Threshold-to-Extract-data\Apply-Confidence-Threshold-to-Extract-data.csproj", "{FCC97ADF-66EF-ADE8-DDD5-7D240743444D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{FCC97ADF-66EF-ADE8-DDD5-7D240743444D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{FCC97ADF-66EF-ADE8-DDD5-7D240743444D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{FCC97ADF-66EF-ADE8-DDD5-7D240743444D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{FCC97ADF-66EF-ADE8-DDD5-7D240743444D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

Data-Extraction/Smart-Data-Extractor/Apply-Confidence-threshold/.NET/Apply-Confidence-Threshold-to-Extract-data.slnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

Data-Extraction/Smart-Data-Extractor/Apply-Confidence-threshold/.NET/Apply-Confidence-Threshold-to-Extract-data/Apply-Confidence-Threshold-to-Extract-data.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net10.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<RootNamespace>Apply_Confidence_Threshold_to_Extract_data</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>

Data-Extraction/Smart-Data-Extractor/Apply-Confidence-threshold/.NET/Apply-Confidence-Threshold-to-Extract-data/Program.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,20 @@ class Program
99
static void Main(string[] args)
1010
{
1111
// Load the input PDF file.
12-
using (FileStream stream = new FileStream(@"Data\Input.pdf", FileMode.Open, FileAccess.Read))
12+
using (FileStream stream = new FileStream(Path.GetFullPath(@"Data\Input.pdf"), FileMode.Open, FileAccess.ReadWrite))
1313
{
1414
// Initialize the Smart Data Extractor.
1515
DataExtractor extractor = new DataExtractor();
16-
1716
// Apply confidence threshold to extract the data.
18-
// Only elements with confidence >= 0.75 will be included in the results.
1917
// Default confidence threshold value is 0.6.
2018
extractor.ConfidenceThreshold = 0.75;
2119

2220
// Extract data and return as a loaded PDF document.
23-
PdfLoadedDocument pdf = extractor.ExtractDataAsPdfDocument(stream);
24-
21+
PdfLoadedDocument document = extractor.ExtractDataAsPdfDocument(stream);
2522
// Save the extracted output as a new PDF file.
26-
pdf.Save(@"Output\Output.pdf");
27-
23+
document.Save(Path.GetFullPath(@"Output\Output.pdf"));
2824
// Close the document to release resources.
29-
pdf.Close(true);
25+
document.Close(true);
3026
}
3127
}
3228
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.4.11626.88 stable
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Different-form-recognizer-options", "Different-form-recognizer-options\Different-form-recognizer-options.csproj", "{25CCCA07-E78E-3D50-F90C-0D39039A0572}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{25CCCA07-E78E-3D50-F90C-0D39039A0572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{25CCCA07-E78E-3D50-F90C-0D39039A0572}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{25CCCA07-E78E-3D50-F90C-0D39039A0572}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{25CCCA07-E78E-3D50-F90C-0D39039A0572}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

Data-Extraction/Smart-Data-Extractor/Different-form-recognizer-options/.NET/Different-form-recognizer-options.slnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

Data-Extraction/Smart-Data-Extractor/Different-form-recognizer-options/.NET/Different-form-recognizer-options/Different-form-recognizer-options.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net10.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<RootNamespace>Different_form_recognizer_options</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>

Data-Extraction/Smart-Data-Extractor/Different-form-recognizer-options/.NET/Different-form-recognizer-options/Program.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,36 @@ class Program
1010
static void Main(string[] args)
1111
{
1212
// Open the input PDF file as a stream.
13-
using (FileStream stream = new FileStream(@"Data\Input.pdf", FileMode.Open, FileAccess.Read))
13+
using (FileStream stream = new FileStream(Path.GetFullPath(@"Data\Input.pdf"), FileMode.Open, FileAccess.ReadWrite))
1414
{
1515
// Initialize the Smart Data Extractor.
1616
DataExtractor extractor = new DataExtractor();
17-
1817
// Enable form detection in the document to identify form fields.
1918
extractor.EnableFormDetection = true;
2019

2120
// Configure form recognition options for advanced detection.
2221
FormRecognizeOptions formOptions = new FormRecognizeOptions();
23-
2422
// Recognize forms across pages 1 to 5 in the document.
2523
formOptions.PageRange = new int[,] { { 1, 5 } };
26-
2724
// Set confidence threshold for form recognition to filter results.
2825
formOptions.ConfidenceThreshold = 0.6;
29-
3026
// Enable detection of signatures within the document.
3127
formOptions.DetectSignatures = true;
32-
3328
// Enable detection of textboxes within the document.
3429
formOptions.DetectTextboxes = true;
35-
3630
// Enable detection of checkboxes within the document.
3731
formOptions.DetectCheckboxes = true;
38-
3932
// Enable detection of radio buttons within the document.
4033
formOptions.DetectRadioButtons = true;
41-
4234
// Assign the configured form recognition options to the extractor.
4335
extractor.FormRecognizeOptions = formOptions;
4436

4537
// Extract form data and return as a loaded PDF document.
46-
PdfLoadedDocument pdf = extractor.ExtractDataAsPdfDocument(stream);
47-
38+
PdfLoadedDocument document = extractor.ExtractDataAsPdfDocument(stream);
4839
// Save the extracted output as a new PDF file.
49-
pdf.Save(@"Output\Output.pdf");
50-
40+
document.Save(Path.GetFullPath(@"Output\Output.pdf"));
5141
// Close the document to release resources.
52-
pdf.Close(true);
42+
document.Close(true);
5343
}
5444
}
5545
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.4.11626.88 stable
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Different-table-extraction-options", "Different-table-extraction-options\Different-table-extraction-options.csproj", "{ACF20B57-3A7A-ABDF-F6F6-EDC2516118EB}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{ACF20B57-3A7A-ABDF-F6F6-EDC2516118EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{ACF20B57-3A7A-ABDF-F6F6-EDC2516118EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{ACF20B57-3A7A-ABDF-F6F6-EDC2516118EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{ACF20B57-3A7A-ABDF-F6F6-EDC2516118EB}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

Data-Extraction/Smart-Data-Extractor/Different-table-extraction-options/.NET/Different-table-extraction-options.slnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)