paperless-ngx/src-ui/src/app/data/matching-model.ts
2022-03-11 11:58:19 -08:00

56 lines
1.3 KiB
TypeScript

import { ObjectWithId } from './object-with-id'
export const MATCH_ANY = 1
export const MATCH_ALL = 2
export const MATCH_LITERAL = 3
export const MATCH_REGEX = 4
export const MATCH_FUZZY = 5
export const MATCH_AUTO = 6
export const MATCHING_ALGORITHMS = [
{
id: MATCH_ANY,
shortName: $localize`Any word`,
name: $localize`Any: Document contains any of these words (space separated)`,
},
{
id: MATCH_ALL,
shortName: $localize`All words`,
name: $localize`All: Document contains all of these words (space separated)`,
},
{
id: MATCH_LITERAL,
shortName: $localize`Exact match`,
name: $localize`Exact: Document contains this string`,
},
{
id: MATCH_REGEX,
shortName: $localize`Regular expression`,
name: $localize`Regular expression: Document matches this regular expression`,
},
{
id: MATCH_FUZZY,
shortName: $localize`Fuzzy word`,
name: $localize`Fuzzy: Document contains a word similar to this word`,
},
{
id: MATCH_AUTO,
shortName: $localize`Automatic`,
name: $localize`Auto: Learn matching automatically`,
},
]
export interface MatchingModel extends ObjectWithId {
name?: string
slug?: string
match?: string
matching_algorithm?: number
is_insensitive?: boolean
document_count?: number
}