📄 formtrafficpos.cs
字号:
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using KTDictSeg;
namespace Demo
{
public partial class FormTrafficPos : Form
{
PosTraffic m_Traffic = new PosTraffic();
public FormTrafficPos()
{
InitializeComponent();
}
private void buttonTraffic_Click(object sender, EventArgs e)
{
List<String> words = FormDemo.m_SimpleDictSeg.Segment(textBoxSource.Text);
m_Traffic.POS = FormDemo.m_SimpleDictSeg.Pos;
m_Traffic.Traffic(words);
ArrayList binGroup = m_Traffic.GetPosBinGroup();
textBoxSegwords.Text = "";
foreach (T_POSBin bin in binGroup)
{
textBoxSegwords.Text += String.Format("{0}-{1} {2} , {3}-{4}\r\n",
bin.m_Pos1, bin.m_Pos2, bin.m_Count,
CPOS.GetChsPos(CPOS.InnertPosToPos(bin.m_Pos1)), CPOS.GetChsPos(CPOS.InnertPosToPos(bin.m_Pos2)));
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -