Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
parseTree.ts52 linesDownload Raw Back to src
1/**2 * Provides a single function for parsing an expression using a Parser3 * TODO(emily): Remove this4 */5 6import Parser from "./Parser";7import ParseError from "./ParseError";8import {Token} from "./Token";9 10import type Settings from "./Settings";11import type {AnyParseNode} from "./parseNode";12 13/**14 * Parses an expression using a Parser, then returns the parsed result.15 */16const parseTree = function(17    toParse: string | InstanceType<typeof String>,18    settings: Settings,19): AnyParseNode[] {20    if (!(typeof toParse === 'string' || toParse instanceof String)) {21        throw new TypeError('KaTeX can only parse string typed expression');22    }23    const parser = new Parser(toParse as string, settings);24 25    // Blank out any \df@tag to avoid spurious "Duplicate \tag" errors26    delete parser.gullet.macros.current["\\df@tag"];27 28    let tree = parser.parse();29 30    // Prevent a color definition from persisting between calls to katex.render().31    delete parser.gullet.macros.current["\\current@color"];32    delete parser.gullet.macros.current["\\color"];33 34    // If the input used \tag, it will set the \df@tag macro to the tag.35    // In this case, we separately parse the tag and wrap the tree.36    if (parser.gullet.macros.get("\\df@tag")) {37        if (!settings.displayMode) {38            throw new ParseError("\\tag works only in display equations");39        }40        tree = [{41            type: "tag",42            mode: "text",43            body: tree,44            tag: parser.subparse([new Token("\\df@tag")]),45        }];46    }47 48    return tree;49};50 51export default parseTree;52 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai