# core/classifiers/vocabulary.classifier.ts

> 11 lines of code and 1 definition.

Tree: GovLab Context
Language: typescript
Layer: application
Canonical: https://banes-lab.com/anatomy/context#file-context-core-classifiers-vocabulary-classifier-ts
Source text: https://banes-lab.com/source/context/core/classifiers/vocabulary.classifier.ts.txt

Listed in [core/classifiers](https://banes-lab.com/api/source/context/core/classifiers.md).

## Definitions

- `classifyForce` (lexical_declaration, line 4, exported)

## Contained in

- [core/classifiers](https://banes-lab.com/anatomy/context/folder-context-core-classifiers.md)

## Used by

- [core/validators/vocabulary.validator.ts](https://banes-lab.com/source/context/core/validators/vocabulary.validator.ts.md)

## Linked from

- [core/validators](https://banes-lab.com/anatomy/context/folder-context-core-validators.md)

## Source

```typescript
import { ANTI_FORCE_MARK, CANONICAL_FORCES } from "#configuration/constants/vocabulary.constants";
import type { ForceKind } from "#types/vocabulary.types";

export const classifyForce = function classifyForce(token: string): ForceKind {
    if (CANONICAL_FORCES.has(token)) {
        return "force";
    }
    if (token.includes(ANTI_FORCE_MARK)) {
        return "anti-force";
    }
    return "unknown";
};
```
