ArrayList<Sentence> sens = ss.getSens();
for (Sentence sen : sens) {
long start=System.currentTimeMillis();
MidResult mr = new MidResult();
mr.setIndex(index++);
mr.setSource(sen.getContent());
if (sen.isSeg()) {
// ԭ�ӷִ�
AtomSeg as = new AtomSeg(sen.getContent());
ArrayList<Atom> atoms = as.getAtoms();
mr.setAtoms(atoms);
start=System.currentTimeMillis();
// ���ɷִ�ͼ��,�Ƚ��г����ִʣ�Ȼ������Ż��������д��Ա��
SegGraph segGraph = GraphGenerate.generate(atoms, coreDict);
mr.setSegGraph(segGraph.getSnList());
// ���ɶ���ִ�ͼ��
SegGraph biSegGraph = GraphGenerate.biGenerate(segGraph, coreDict, bigramDict);
mr.setBiSegGraph(biSegGraph.getSnList());
start=System.currentTimeMillis();
// ��N���·��
NShortPath nsp = new NShortPath(biSegGraph, segPathCount);
ArrayList<ArrayList<Integer>> bipath = nsp.getPaths();
mr.setBipath(bipath);
start=System.currentTimeMillis();
for (ArrayList<Integer> onePath : bipath) {
// �õ����ηִ�·��
ArrayList<SegNode> segPath = getSegPath(segGraph, onePath);
ArrayList<SegNode> firstPath = AdjustSeg.firstAdjust(segPath);
String firstResult = outputResult(firstPath);
mr.addFirstResult(firstResult);
start=System.currentTimeMillis();
// ����δ��½�ʣ����Գ��ηִʽ�������Ż�
SegGraph optSegGraph = new SegGraph(firstPath);
ArrayList<SegNode> sns = clone(firstPath);
personTagger.recognition(optSegGraph, sns);
transPersonTagger.recognition(optSegGraph, sns);
placeTagger.recognition(optSegGraph, sns);
mr.setOptSegGraph(optSegGraph.getSnList());
start=System.currentTimeMillis();
// �����Ż���Ľ�������½������ɶ���ִ�ͼ��
SegGraph optBiSegGraph = GraphGenerate.biGenerate(optSegGraph, coreDict, bigramDict);
mr.setOptBiSegGraph(optBiSegGraph.getSnList());
// ������ȡN�����·��
NShortPath optNsp = new NShortPath(optBiSegGraph, segPathCount);
ArrayList<ArrayList<Integer>> optBipath = optNsp.getPaths();
mr.setOptBipath(optBipath);
// �����Ż���ķִʽ�������Խ�����д��Ա�Ǻ������Ż���������
ArrayList<SegNode> adjResult = null;
for (ArrayList<Integer> optOnePath : optBipath) {
ArrayList<SegNode> optSegPath = getSegPath(optSegGraph, optOnePath);
lexTagger.recognition(optSegPath);
String optResult = outputResult(optSegPath);
mr.addOptResult(optResult);
adjResult = AdjustSeg.finaAdjust(optSegPath, personTagger, placeTagger);
String adjrs = outputResult(adjResult);
start=System.currentTimeMillis();
if (midResult == null)
midResult = adjrs;