improve table detection

This commit is contained in:
Abimael Martell
2026-02-07 19:50:53 -08:00
parent 0acb3ecc8b
commit 25ec142413
4 changed files with 27 additions and 60 deletions
-12
View File
@@ -1,12 +0,0 @@
Introduction INTRO-2GLENAIR, INC. • 1211 AIR WAY • GLENDALE, CA 91201-2497 • 818-247-6000 • FAX 818-500-9912
© 2011 Glenair, Inc. Printed in U.S.A.CAGE Code 06324 [www.glenair.com](http://www.glenair.com/) E-Mail: [sales@glenair.com](mailto:sales@glenair.com)
Glenair brings a new perspective to the supply of high-performance Mil-Spec and commercial contacts: High Availability! Whether you need a standard duty socket for a MIL-DTL-28840 connector or an extended duty pin for MIL-DTL-38999 Series III, we have you covered with products that are always in stock—with no dollar or quantity minimums. In addition to the broadest selection and availability, Glenair also delivers outstanding interconnection compatibility. Glenair QPL SAE-AS39029 as well as our proprietary contact series are guaranteed to mate properly and perform at the upper limits of application requirements. About SAE AS39029 Crimp Contacts In a marketplace saturated with specialty interconnection media, the SAE-AS39029 crimp contact is still the “bread and butter” of the circular connector world. Serving platforms like the D38999, M28840 and countless others, AS39029 crimp contacts continue to offer reliable power and signal transmission in ruggedized applications. A myriad of sizes, termination options and materials mean that end users dont have to compromise performance or reliability. Crimping results in a gas tight connection between the wire and its terminal. Although there are certainly alternatives to crimping, such as ultrasonic welding, resistance welding, insulation displacement technologies and so on, no other available technology delivers the short cycle times, flexibility and low overall cost of crimping—making it the termination technology of choice for most high-performance connector systems. Crimp connectors are most commonly used to terminate stranded wire. Crimp-on terminals are attached by inserting the stripped end of the wire into the barrel end of the terminal, which is then mechanically deformed (crimped). Special crimp tools are a must, and are supplied with appropriate accessory attachments to ensure reliable terminations for every wire and contact combination. Military Specification MIL-DTL-22520 provides the aerospace/defense industry with a common set of rugged, reliable hand crimp tools. This specification controls the voltage drop and tensile strength of crimp terminations. Daniels Manufacturing Corporation is the leading manufacturer of these tools. The AS39029 product series supplied by Glenair includes all the most popular standard and extended duty pin and socket contacts for use in high-performance circular and rectangular multi-pin connectors. We are also well positioned to supply special-purpose contacts to meet unique application requirements. Insulators
Environmental Grommet
Interfacial Seal
Connector Shell
Insert Retention ClipEMI Spring
Insert Retention Clip
Crimp Socket Contact with Hood
RTV Sealing
Environmental Grommet
Crimp Pin ContactHigh-Performance Connector with Crimp Contacts (Cutaway View) ContactRetention ClipIntroduction to Crimp Contacts SAE-AS39029
-30
View File
@@ -1,30 +0,0 @@
PDF to Markdown Conversion
==========================
File: samples/doc.pdf
Type: TEXT-BASED (direct extraction)
Pages: 1
Processing time: 2258ms
--- Markdown Output ---
Introduction
### Introduction to Crimp Contacts SAE-AS39029
Glenair brings a new perspective to the supply of high-performance Mil-Spec and commercial contacts: High Availability! Whether you need a standard duty socket for a MIL-DTL-28840 connector or an extended duty pin for MIL-DTL-38999 Series III, we have you covered with products that are always in stock—with no dollar or quantity minimums. In addition to the broadest selection and availability, Glenair also delivers outstanding interconnection compatibility. Glenair QPL SAE-AS39029 as well as our proprietary contact series are guaranteed to mate properly and perform at the upper limits of application requirements.
### About SAE AS39029 Crimp Contacts
In a marketplace saturated with specialty interconnection media, the SAE-AS39029 crimp contact is still the “bread and butter” of the circular connector world. Serving platforms like the D38999, M28840 and countless others, AS39029 crimp contacts continue to offer reliable power and signal transmission in ruggedized applications. A myriad of sizes, termination options and materials mean that end users dont have to compromise performance or reliability.
Crimping results in a gas tight connection between the wire and its terminal. Although there are certainly alternatives to crimping, such as ultrasonic welding, resistance welding, insulation displacement technologies and so on, no other available technology delivers the short cycle times, flexibility and low overall cost of crimping—making it the termination technology of choice for most high-performance connector systems. Crimp connectors are most commonly used to terminate stranded wire. Crimp-on terminals are attached by inserting the stripped end of the wire into the barrel end of the terminal, which is then mechanically deformed (crimped). Special crimp tools are a must, and are supplied with appropriate accessory attachments to ensure reliable terminations for every wire and contact combination. Military Specification MIL-DTL-22520 provides the aerospace/defense industry with a common set of rugged, reliable hand crimp tools. This specification controls the voltage drop and tensile strength of crimp terminations. Daniels Manufacturing Corporation is the leading manufacturer of these tools. The AS39029 product series supplied by Glenair includes all the most popular standard and extended duty pin and socket contacts for use in high-performance circular and rectangular multi-pin connectors. We are also well positioned to supply special-purpose contacts to meet unique application requirements.
#### High-Performance Connector with Crimp Contacts (Cutaway View)
Insert Retention Clip EMI Spring Insert Retention Clip Crimp Pin Environmental Environmental Contact Grommet Grommet
Crimp Socket Contact with Hood RTV Sealing Interfacial Seal Connector Shell Contact Retention Clip Insulators
© 2011 Glenair, Inc. Printed in U.S.A. CAGE Code 06324 www.glenair.com E-Mail: sales@glenair.com GLENAIR, INC. • 1211 AIR WAY • GLENDALE, CA 91201-2497 • 818-247-6000 • FAX 818-500-9912 INTRO-2
-17
View File
@@ -1,17 +0,0 @@
# Introduction to Crimp Contacts SAE-AS39029
lenair brings a new perspective to the supply of high-performance Mil-Spec and commercial contacts: High Availability! Whether you need a standard duty socket for a MIL-DTL-28840 connector or an extended duty pin for MIL-DTL-38999 Series III, we have you covered with products that are always in stock—with no dollar or quantity minimums. In addition to the broadest selection and availability, Glenair also delivers outstanding interconnection compatibility. Glenair QPL SAE-AS39029 as well as our proprietary contact series are guaranteed to mate properly and perform at the upper limits of application requirements.
# About SAE AS39029 Crimp Contacts
In a marketplace saturated with specialty interconnection media, the SAE-AS39029 crimp contact is still the “bread and butter” of the circular connector world. Serving platforms like the D38999, M28840 and countless others, AS39029 crimp contacts continue to offer reliable power and signal transmission in ruggedized applications. A myriad of sizes, termination options and materials mean that end users dont have to compromise performance or reliability.
![](https://www.glenair.com/as39029-qpl-and-glenair-commercial-high-performance-connector-contacts/pdf/intro/images/41f12668e93f5fb676193d8062d6985619c6ddf56b5fca9e6733b620c0c5ac35.jpg)
High-Performance Connector with Crimp Contacts (Cutaway View)
Crimping results in a gas tight connection between the wire and its terminal. Although there are certainly alternatives to crimping, such as ultrasonic welding, resistance welding, insulation displacement technologies and so on, no other available technology delivers the short cycle times, flexibility and low overall cost of crimping—making it the termination technology of choice for most high-performance connector systems.
Crimp connectors are most commonly used to terminate stranded wire. Crimp-on terminals are attached by inserting the stripped end of the wire into the barrel end of the terminal, which is then mechanically deformed (crimped). Special crimp tools are a must, and are supplied with appropriate accessory attachments to ensure reliable terminations for every wire and contact combination. Military Specification MIL-DTL-22520 provides the aerospace/defense industry with a common set of rugged, reliable hand crimp tools. This specification controls the voltage drop and tensile strength of crimp terminations. Daniels Manufacturing Corporation is the leading manufacturer of these tools.
The AS39029 product series supplied by Glenair includes all the most popular standard and extended duty pin and socket contacts for use in high-performance circular and rectangular multi-pin connectors. We are also well positioned to supply special-purpose contacts to meet unique application requirements.
+27 -1
View File
@@ -140,12 +140,38 @@ fn detect_table_in_region(items: &[(usize, &TextItem)]) -> Option<Table> {
}
}
// Validate: most rows should have content in first column (not sparse)
// Validation 1: most rows should have content in first column
let rows_with_first_col = cells.iter().filter(|row| !row[0].is_empty()).count();
if rows_with_first_col < rows.len() / 2 {
return None;
}
// Validation 2: real tables have content in MULTIPLE columns, not just first
// At least 30% of rows should have content in 2+ columns
let rows_with_multi_cols = cells
.iter()
.filter(|row| row.iter().filter(|c| !c.is_empty()).count() >= 2)
.count();
if rows_with_multi_cols < rows.len() / 3 {
return None;
}
// Validation 3: tables shouldn't have too many rows (likely misdetected text)
if rows.len() > 30 {
return None;
}
// Validation 4: average cells per row should be reasonable
let total_filled: usize = cells
.iter()
.map(|row| row.iter().filter(|c| !c.is_empty()).count())
.sum();
let avg_cells_per_row = total_filled as f32 / rows.len() as f32;
if avg_cells_per_row < 1.5 {
// Less than 1.5 cells per row on average - probably not a table
return None;
}
Some(Table {
columns,
rows,