全部產品
Search
文件中心

Platform For AI:LLM-刪除LaTeX注釋行(MaxCompute)

更新時間:May 21, 2026

LLM-刪除LaTeX注釋行組件主要用於大語言模型(LLM)的文本資料預先處理工作,適用於TEX文檔格式資料。主要功能是刪除LaTeX格式文本中的注釋行以及行內注釋。

支援的計算資源

MaxCompute

演算法說明

定義LaTeX格式文本注釋行的Regex如下:

注釋類型

Regex

多行注釋

r'(?m)^%.*\n?'

單行注釋

r'[^\\]%.+$'

提取所有滿足上述Regex的字串,替換為空白字串。樣本如下:

處理前

%%
%% This is file `sample-sigconf.tex',
%% The first command in your LaTeX source must be the \documentclass command.
\documentclass[sigconf,review,anonymous]{acmart}

%% NOTE that a single column version is required for
%% submission and peer review. This can be done by changing
\input{math_commands.tex}
%% end of the preamble, start of the body of the document source.
\begin{document}

%% The "title" command has an optional parameter,
%% allowing the author to define a "short title" to be used in page headers.
\title{Hierarchical Cross Contrastive Learning of Visual Representations}
\author{Hesen Chen}

處理後

\documentclass[sigconf,review,anonymous]{acmart}
\input{math_commands.tex}
\begin{document}
\title{Hierarchical Cross Contrastive Learning of Visual Representations}
\author{Hesen Chen}

配置組件

在Designer工作流程頁面添加LLM-刪除LaTeX注釋行組件,並在介面右側配置相關參數:

參數類型

參數

描述

欄位設定

選擇目標處理列

選擇要處理的列,支援多選。

是否刪除所有行注釋

是否刪除所有的注釋行。

是否刪除一行內的所有注釋

是否刪除一行內的所有注釋。

設定輸出表生命週期

正整數,單位為天。預設28天,28天后該組件產生的暫存資料表被回收。

執行調優

每個執行個體的cpu數目

設定map task每個instance的CPU數目,取值範圍:50~800,預設值:100。

每個執行個體的memory大小,單位M

設定map task每個instance的memory大小,取值範圍:256~12288,預設值:1024,單位:MB。

每個執行個體處理的資料大小,單位M

設定map task每個instance的最大處理資料量,取值範圍:1~Integer.MAX_VALUE,預設值:256,單位:MB。

您可以通過控制這個變數,從而達到對map端輸入的控制。