JumboTCMS_src/JumboTCMS.Utils/ShootSeg/SegList.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;

namespace JumboTCMS.Utils.ShootSeg
{
    /// <summary>
    /// 改写自ShootSearch 中文分词组件
    /// </summary>
	public class SegList
	{
		private ArrayList m_seg;
		public int MaxLength;
		public int Count
		{
			get
			{
				return m_seg.Count;
			}
		}

		public SegList()
		{
			m_seg = new ArrayList();
			MaxLength = 0 ;
            //Count = 0 ;
		}
		
		public void Add(object obj)
		{
			m_seg.Add(obj);
			if(MaxLength < obj.ToString().Length)
			{
				MaxLength = obj.ToString().Length;
			}
		}

		public object GetElem(int i)
		{
			if (i < this.Count)
				return m_seg[i];
			else
				return null;
		}

		public void SetElem(int i , object obj)
		{
			m_seg[i] = obj ;
		}

		public bool Contains(object obj)
		{
			return m_seg.Contains(obj);
		}

		/// <summary>
		/// 按长度排序
		/// </summary>
		/// <param name="list"></param>
		public void Sort(SegList list)
		{ 
后面还有 39 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。