# ReaderHeuristicTokenCounter

Dependency-free token estimate using approximately four characters per token.

Class 

`OfficeIMO.Reader`

**Namespace**

`OfficeIMO.Reader`

**Assembly**

`OfficeIMO.Reader.Core`

**Source revision**

`90fbca630045` with working tree changes

**Source**

[ReaderTokenCounters.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/90fbca6300454f4c57161551de8649ac9ee04cbd/OfficeIMO.Reader.Core/ReaderTokenCounters.cs#L28)

**Implements**

`IReaderTokenCounter`

**Modifiers**

sealed

Dependency-free token estimate using approximately four characters per token.

## Inheritance

- object
- ReaderHeuristicTokenCounter

## Usage

Explore 1 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 [ReaderHeuristicTokenCounter.Instance](/api/reader/officeimo-reader-readerheuristictokencounter/#property-instance)

Filter members 

Show inherited

## Methods

`public int CountTokens(string text)` [#](#method-counttokens-string)

[ReaderTokenCounters.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/90fbca6300454f4c57161551de8649ac9ee04cbd/OfficeIMO.Reader.Core/ReaderTokenCounters.cs#L28)

Counts tokens in the supplied text.

Parameters

**text string required**

Returns

`int`

## Inherited Methods

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

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from object

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from object

Returns

`string?`

## Properties

`public static ReaderHeuristicTokenCounter Instance { get; }` [#](#property-instance)

[ReaderTokenCounters.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/90fbca6300454f4c57161551de8649ac9ee04cbd/OfficeIMO.Reader.Core/ReaderTokenCounters.cs#L21)

Shared stateless instance.

`public string Id { get; }` [#](#property-id)

[ReaderTokenCounters.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/90fbca6300454f4c57161551de8649ac9ee04cbd/OfficeIMO.Reader.Core/ReaderTokenCounters.cs#L24)

Stable counter identifier retained in chunking evidence.

<!-- PowerForge markdown artifact sha256:F7394C3EC39A60478CCCB85C5B158A64BF9359244C154CAB1F2580248D4E3F00 -->
