Bidirectional Text Segmentation Using LRM and RLM Markers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Unicode Bidirectional Algorithm (UBA) implementations fail to maintain the structure of structured bidirectional text with an unknown base direction, leading to incorrect display and functioning, as they treat all text as plain and do not account for internal structure.

Innovation Solution

The method involves inserting Unicode left-to-right (LRM) and right-to-left (RLM) characters on either side of a delimited segment of bidirectional text to create a directionality mismatch, which is then processed through a UBA implementation to select the base text direction, ensuring correct ordering and structure preservation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If UBA implementation treats text as plain text, then processing is simple, but structured text structure is not maintained

Engineering Contradiction:
Improveprocessing complexityVSAvoidtext structure
Core Design Contradiction:
Device complexityVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by inserting LRM and RLM characters into the structured text segment before processing through the UBA implementation. This preprocessing step prepares the text with directional markers that guide the algorithm to correctly maintain the structure of structured text (such as URIs, email addresses, and formulas) while still using the standard UBA processing mechanism.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If LRM and RLM characters are inserted to create directionality mismatch, then base text direction can be selected correctly, but text processing complexity increases

Engineering Contradiction:
Improvedirection detection accuracyVSAvoidtext processing
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent uses LRM and RLM characters as intermediary elements that mediate between the unknown base direction of structured text and the UBA algorithm's direction detection mechanism. These control characters act as signals that trigger the algorithm to resolve the directionality conflict and select the correct base text direction, thereby improving detection accuracy without requiring complex custom processing logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If Unicode control characters are inserted in delimited segments, then text direction is resolved, but risk of introducing errors increases

Engineering Contradiction:
Improvetext direction resolutionVSAvoiderror introduction risk
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent applies local quality by inserting LRM and RLM characters only within delimited structured text segments where directionality ambiguity exists, rather than throughout the entire text. This localized approach ensures that direction resolution is applied precisely where needed (in structured text like URIs and formulas) without unnecessarily modifying other text portions, thereby reducing the overall risk of introducing errors while maintaining reliability in critical segments.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10067932B2Isolating segments of bidirectional text
Publication Date: 2018.09.04 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10067932B2 patent drawing
  • US10067932B2 patent drawing
  • US10067932B2 patent drawing

AI summary

Embodiments of the present invention include a method, system, and computer program product for isolating a segment of bidirectional text. A segment of bidirectional text may be identified. A Unicode left-to-right character (LRM) may be inserted on at least a first side of the segment of bidirectional text. A Unicode right-to-left character (RLM) may be inserted on at least a second side of the segment of bidirectional text. The segment of bidirectional text may be processed through a Unicode Bidirectional Algorithm (UBA) implementation. A directionality mismatch between the LRM and the RLM may cause a conflict. In response to the conflict, the Unicode Bidirectional Algorithm may select a base text direction for the segment of bidirectional text.