ClaassPercent.cs
资源名称:2.rar [点击查看]
上传用户:hshongkong
上传日期:2021-11-20
资源大小:10241k
文件大小:1k
源码类别:
多国语言处理
开发平台:
C#
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ChineseSplitter
- {
- public class ClaassPercent
- {
- public static int Getpercent(string[] roles, string[] str)
- {
- int Percent = 0;
- for (int i = 0; i < str.Length; i++)
- {
- for (int j = 0; j < roles.Length; j++)
- {
- if (str[i] == roles[j])
- {
- Percent += 1;
- }
- }
- }
- return Percent;
- }
- }
- }