feat: remove colon exclusion from bold heading detection
The colon exclusion was preventing legitimate headings like "Steps for Using the Microscope:" and "Changing objectives:" from being detected. The single edge case it was protecting (chart sub-headers) is less impactful than the many headings it was blocking. Benchmark improvement: MHS 0.51→0.52, MHS-S 0.61→0.62. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
28823bd849
commit
103995c200
@@ -446,16 +446,10 @@ pub(super) fn to_markdown_from_lines_with_tables_and_images(
|
|||||||
detect_header_level(line_font_size, base_size, &heading_tiers).or_else(|| {
|
detect_header_level(line_font_size, base_size, &heading_tiers).or_else(|| {
|
||||||
// Bold-only lines at body font size that are standalone (paragraph break
|
// Bold-only lines at body font size that are standalone (paragraph break
|
||||||
// before them) are likely section headings. Require ≥3 words to avoid
|
// before them) are likely section headings. Require ≥3 words to avoid
|
||||||
// promoting short labels/field names. Exclude lines ending with colon
|
// promoting short labels/field names.
|
||||||
// (labels like "Table I:") or that are too short.
|
|
||||||
let all_bold = !line.items.is_empty() && line.items.iter().all(|i| i.is_bold);
|
let all_bold = !line.items.is_empty() && line.items.iter().all(|i| i.is_bold);
|
||||||
let word_count = plain_trimmed.split_whitespace().count();
|
let word_count = plain_trimmed.split_whitespace().count();
|
||||||
// Reject lines ending with colon (labels like "Table:") —
|
if all_bold && !in_paragraph && word_count >= 3 {
|
||||||
// strip trailing non-colon punctuation first (e.g. ":*" → ":")
|
|
||||||
let stripped =
|
|
||||||
plain_trimmed.trim_end_matches(|c: char| c != ':' && !c.is_alphanumeric());
|
|
||||||
let ends_with_colon = stripped.ends_with(':');
|
|
||||||
if all_bold && !in_paragraph && word_count >= 3 && !ends_with_colon {
|
|
||||||
Some(bold_heading_level(&heading_tiers))
|
Some(bold_heading_level(&heading_tiers))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|||||||
@@ -8,7 +8,11 @@ Department of the Treasury **Internal Revenue Service**
|
|||||||
|
|
||||||
# and Report to Employer
|
# and Report to Employer
|
||||||
|
|
||||||
**This publication contains:** **Form 4070A, Employee’s Daily Record of** Tips **Form 4070, Employee’s Report of Tips to** Employer
|
### This publication contains:
|
||||||
|
|
||||||
|
### Form 4070A, Employee’s Daily Record of
|
||||||
|
|
||||||
|
Tips **Form 4070, Employee’s Report of Tips to** Employer
|
||||||
|
|
||||||
For the period
|
For the period
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
**Table I: Cap rate correlations**
|
**Table I: Cap rate correlations**
|
||||||
|
|
||||||
**Cap Rate Correlation With:*** **BBB Corp** **10-Year Bond Yield S&P Dividend** **Treasury (10-15 yr) Yield** Multifamily 0.187 0.771 0.068 Industrial-0.221 0.748-0.307 CBD Office-0.449 0.694-0.458 Retail-0.181 0.649-02.58
|
## Cap Rate Correlation With:*
|
||||||
|
|
||||||
|
**BBB Corp** **10-Year Bond Yield S&P Dividend** **Treasury (10-15 yr) Yield** Multifamily 0.187 0.771 0.068 Industrial-0.221 0.748-0.307 CBD Office-0.449 0.694-0.458 Retail-0.181 0.649-02.58
|
||||||
|
|
||||||
* Based on 25 years of data for the 10-yrT & S&P DivYld; and 14 years for BBB.
|
* Based on 25 years of data for the 10-yrT & S&P DivYld; and 14 years for BBB.
|
||||||
**Figure 1:** NCREIF cap rates vs. 10-yearTreasury
|
**Figure 1:** NCREIF cap rates vs. 10-yearTreasury
|
||||||
|
|||||||
Reference in New Issue
Block a user