<commit_before>import { ParsingContext } from "../../../chrono";
import { ParsingComponents, ParsingResult } from "../../../results";
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
import * as references from "../../../common/casualReferences";

export default class NLCasualDateParser extends AbstractParserWithWordBoundaryChecking {
    innerPattern(context: ParsingContext): RegExp {
        return /(nu|vandaag|morgen|gisteren)(?=\W|$)/i;
    }

    innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult {
        const lowerText = match[0].toLowerCase();
        const component = context.createParsingComponents();

        switch (lowerText) {
            case "nu":
                return references.now(context.refDate);

            case "vandaag":
                return references.today(context.refDate);

            case "morgen":
                return references.tomorrow(context.refDate);

            case "gisteren":
                return references.yesterday(context.refDate);
        }

        return component;
    }
}<commit_msg>readd morgend so we dont break<commit_after>import { ParsingContext } from "../../../chrono";
import { ParsingComponents, ParsingResult } from "../../../results";
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
import * as references from "../../../common/casualReferences";

export default class NLCasualDateParser extends AbstractParserWithWordBoundaryChecking {
    innerPattern(context: ParsingContext): RegExp {
        return /(nu|vandaag|morgen|gisteren)(?=\W|$)/i;
    }

    innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult {
        const lowerText = match[0].toLowerCase();
        const component = context.createParsingComponents();

        switch (lowerText) {
            case "nu":
                return references.now(context.refDate);

            case "vandaag":
                return references.today(context.refDate);

            case "morgen":
            case "morgend":
                return references.tomorrow(context.refDate);

            case "gisteren":
                return references.yesterday(context.refDate);
        }

        return component;
    }
}
{'fraction_non_alphanumeric': 0.12178676780446691, 'fraction_numerical': 0.0008428150021070375, 'mean_word_length': 2.674922600619195, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3621628', 'n_tokens_mistral': 629, 'n_tokens_neox': 611, 'n_words': 129}