# EntityTextSegment

One source segment with optional location and field context.

Struct 

`OfficeIMO.Entities`

**Namespace**

`OfficeIMO.Entities`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[EntityTextSegment.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L10)

**Base**

`ValueType`

**Modifiers**

sealed

One source segment with optional location and field context.

## Inheritance

- ValueType
- EntityTextSegment

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [EntityRecognitionContext.Segment](/api/core/officeimo-entities-entityrecognitioncontext/#property-segment)

### Accepted by parameters 2

- Method [EntityFinder.Find](/api/core/officeimo-entities-entityfinder/#method-find-collections-generic-ienumerable-officeimo-entities-entitytextsegment) parameter `segments`
- Method [EntityMasker.Mask](/api/core/officeimo-entities-entitymasker/#method-mask-collections-generic-ireadonlylist-officeimo-entities-entitytextsegment-collections-generic-ienumerable-officeimo-entities-entitymatch) parameter `segments`

Filter members 

Show inherited

## Constructors

`public EntityTextSegment(string text, EntitySegmentLocation? location = null, string? label = null, bool structuredSource = false, bool continuesPrevious = false)` [#](#constructor-ctor-string-officeimo-entities-entitysegmentlocation-string-boolean-boolean)

[EntityTextSegment.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L10)

Constructs an input segment. Set structured source for a known typed value.

Parameters

**text string required**

**location OfficeIMO.Entities.EntitySegmentLocation? = null optional**

**label string? = null optional**

**structuredSource bool = false optional**

**continuesPrevious bool = false optional**

## Inherited Methods

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from ValueType

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public override string? ToString()` [#](#method-tostring)

Inherited from ValueType

Returns

`string?`

## Properties

`public string Text { get; }` [#](#property-text)

[EntityTextSegment.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L18)

Text to search.

`public EntitySegmentLocation? Location { get; }` [#](#property-location)

[EntityTextSegment.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L20)

Coordinates supplied by the host.

`public string? Label { get; }` [#](#property-label)

[EntityTextSegment.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L22)

Optional field or column label.

`public bool StructuredSource { get; }` [#](#property-structuredsource)

[EntityTextSegment.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L24)

Whether the whole segment represents a typed field value.

`public bool ContinuesPrevious { get; }` [#](#property-continuesprevious)

[EntityTextSegment.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Core/Entities/EntityTextSegment.cs#L26)

Joins this segment to the previous segment without inserting characters.

<!-- PowerForge markdown artifact sha256:29FCC82217E161FFCD2DF9DD583FF86F69C55D5F0E8B6F9BE890CA31808BC97F -->
