我有一个 Matlab 代码库,它的注释是用瑞典语写的。是这样的:
% Syntax: result = ocr(DOC, METHOD, fname)
% DOC - bild som ska processas
% METHOD - ann eller knear
% fname - full filename of the net ('ann' method) or the database
% ('knear' method)
% default: ann20.mat resp db4000.mat
function result = ocr(DOC, METHOD, fname)
% Segmentera bilden
disp('Segmenting...');
[ROWB, CH] = segment(DOC, 0.99, 0.99);
% Analysera den
switch lower(METHOD)
case 'ann',
% ladda in neuronnät, inför NET, E, CP
if isempty(fname)
load ./db/ann50.mat;
else
load(fname);
end
好吧,谷歌翻译对我来说是个大救星。这是复制粘贴到翻译框中的结果,非常令人满意。
% Syntax: result = ocr (DOC, METHOD, fname)
% DOC - image to be processed
% METHOD - ann or knear
% Fname - full filename of the net ('ann' method) or the database
% ('Knear' method)
% Default: ann20.mat respectively db4000.mat
function result = ocr (DOC, METHOD, fname)
Segment image%
disp ('Segmenting ...');
[ROWB, CH] = segment (DOC, 0.99, 0.99);
% Analyze the
switch lower (METHOD)
case 'ann'
% Load the neural networks, for NET, E, CP
f isempty (fname)
./db/ann50.mat load;
else
load (fname);
end
- 对于多文件代码库,我可以自动化这个过程吗?
- 如何处理转换为
"% Segmentera bilden"
to等错误"Segment image%"
?