using System;
using System.Collections.Generic;
using System.IO;
using LDA.LdaModel;

namespace LDA
{
 //   class Program
	//{
	//	static void Main(string[] args)
	//	{
	//		List<String> englishtext = new List<string>();
	//		List<String> chinesetext = new List<string>();
	//		englishtext.Add("Semi-active control of piezoelectric coating's underwater sound absorption by combining design of the shunt impedances. Piezoelectric shunt damping technology has been applied in the field of underwater sound absorption in recent years. In order to achieve broadband echo reduction, semiactive control of sound absorption of multi-layered piezoelectric coating by shunt damping is significant. In this paper, a practical method is proposed to control the underwater sound absorption coefficients of piezoelectric coating layers by combining design of the shunt impedance that allows certain sound absorption coefficients at setting frequencies. A one-dimensional electro-acoustic model of the piezoelectric coating and the backing is established based on the Mason equivalent circuit theory. First, the shunt impedance of the coating is derived under the constraint of sound absorption coefficient at one frequency. Then, taking the 1–3 piezoelectric composite coating as an example, the sound absorption properties of the coating shunted to the designed shunt impedance are investigated. Next, on the basis of that, an iterative method for two constrained frequencies and an optimizing algorithm for multiple constrained frequencies are provided for combining design of the shunt impedances. At last, an experimental sample with four piezoelectric material layers is manufactured, of which the sound absorption coefficients are measured in an impedance tube. The experimental results show good agreement with the finite element simulation results. It is proved that a serial R–L circuit can control the peak frequency, maximum and bandwidth of the sound absorption coefficient and the combining R–L circuits shunted to multiple layers can control the sound absorption coefficients at multiple frequencies.");
	//		englishtext.Add("Fabrication and characterization of microcapsulated phase change materials with an additional function of thermochromic performance. In this study, a new type of microencapsulated phase change materials (microPCMs) with an additional function of thermochromic performance was designed and synthesized successfully. Thermochromatic pigments were firstly assembled on the interface of n-octadecane droplets in oil/water emulsion. And then a thermochromic pigment/PMMA shell was fabricated through suspension-like polymerization.The microstructures and chemical compositions of the resultant microcapsules were investigated by scanning electronic microscope (SEM) and Fourier transformation infrared spectroscope (FT-IR). SEM images display that these microcapsules presented a spherical shape and well-defined core-shell structure. According to DSC and TGA examinations, these dual functionalized microPCMs exhibited excellent thermal energy storage-release performance, high thermal storage capability (higher than 97%), and good thermal stability. In addition, these microPCMs successfully achieved thermochromic function as their temperature exceeded the target temperature. The dual functionalized microcapsules developed in this work showed great potential in applications for solar energy storage, thermo-sensors, food and medicine package and intelligent textiles or fabrics, etc.");
	//		englishtext.Add("Protease-activatable cell-penetrating peptide possessing ROS-triggered phase transition for enhanced cancer therapy. Reactive oxygen species (ROS)- or protease-responsive materials have been utilized as carriers in cancertherapies because ROS and specific proteases are overproduced in cancer cells. Methionine-based polypeptides containing a thioether group are promising candidates due to their ROS-responsiveness which provides a phase transition. Herein, we developed protease-activatable cell-penetrating peptide containing a ROS-responsive methionine, a cell permeable lysine chain, and a matrix metalloproteinase (MMP)-cleavable linker. We designed a poly(L-methionine-block-L-lysine)-PLGLAG-PEG (MLMP) and doxorubicin (DOX) was loaded into the micelle core. The MLMP exhibited MMP-sensitive cleavage and ROS-induced DOX release. Moreover, we confirmed efficient DOX delivery into cancer cells and induction of the apoptotic capability in vitro. In a bio-distribution study, IR-780 dye encapsulated MLMP showed superior tumor targetability with long retention. Furthermore,MLMP (DOX) exhibited outstanding tumor inhibition capability with non-toxicity compared to free DOX, indicating that dual stimuli-MLMP has great potential as an anticancer drug delivery platform.");
	//		chinesetext.Add("自适应循环发动机性能智能在线寻优算法研究。为解决自适应循环发动机性能在线自主优化问题，提出一种适用于三流道自适应循环发动机的智能自主优化控制方法，通过深度确定性策略梯度算法（DDPG）在线优化压比计划，实现控制规律自主寻优。在基准发动机特性图上给出了不同外涵面积下的等推力特性曲线，在此基础上给出了基准的最低油耗控制规律曲线。当发动机性能退化、或存在个体差异等偏离时，基准控制规律不再能使发动机性能最优，DDPG算法利用前期存储的数据对压比指令修正量进行训练学习，自主调整发动机控制规律。整机数值仿真结果表明，调整后亚声速巡航单位耗油率降低7.63%，与最低油耗点比较偏差0.03%。超声速巡航单位耗油率降低5.04%，与最低油耗点比较偏差0.01%。性能寻优算法可以在发动机性能偏离情况下实现发动机控制规律自主调节，达到最低油耗。");
	//		chinesetext.Add("航空发动机轴承故障结构化贝叶斯稀疏表示。航空发动机轴承振动信号中与故障关联的瞬时冲击成分在时频变换域上不仅具有稀疏性，还具有某些结构特征，而传统的以正交匹配追踪(OMP)算法为代表的贪婪类及其改进重构方法，通常仅利用了信号整体的稀疏性，未考虑结构性干扰可能造成的影响，导致算法求解效率较低。针对这一问题，提出了一种参数优化字典的结构化贝叶斯稀疏表示方法。首先，在OMP算法基础上，基于贝叶斯概率模型，研究了一种能够促进稀疏重构效果的结构化贝叶斯正交匹配追踪(SBOMP)稀疏表示模型，实现对信号的稀疏表示求解。其次，针对轴承故障振动信号的特性，构建能更好的匹配分析信号的时频冲击原子库，降低了字典的冗余程度，并将灰狼优化算法(GWO)引入到基于时频冲击字典的SBOMP模型中，为SBOMP模型提供高效的原子选取策略，降低了稀疏模型的复杂度。仿真与实验结果表明：所提方法能够更有效降低背景噪声和杂质频率的干扰，验证了所提方法对航空发动机轴承故障特征提取的有效性和适用性。");
	//		chinesetext.Add("基于微波相位差测距的叶尖间隙动态测量方法叶尖间隙参数的非接触、高精度、在线测量是保证航空发动机工作效率和运行安全的关键，传统的微波式叶尖间隙静态测量方法易受直流噪声干扰，存在测距模糊问题，信号采样点数时刻变化，直接影响了测量精度。因此，提出了一种基于微波相位差测距原理的叶尖间隙参数动态测量方法。建立了微波式叶尖间隙测量信号模型，仿真分析了不同厚度以及凹腔叶片的信号强度和相位特征，提出了一种相位区域自适应截取、尺度调整、相关匹配、多项式拟合相融合的技术手段，解决了微波相位信号的测距模糊问题，实现了相位信号峰值位置的预估，减小了信号处理过程中的随机误差，实现了叶尖间隙参数的高精度动态测量。研制了基于微波相位差测距的叶尖间隙测量系统原理样机，在实验室环境下搭建了叶尖间隙信号动态测量的实验平台，开展了测量和标定实验。实验结果验证了所提方法的有效性和准确性，测量系统适用于不同厚度以及H形凹腔叶片的叶尖间隙参数测量，在动叶片转速3000 r/min的模拟工作环境下，0.5～3 mm量程内，不同厚度及H形凹腔叶片的叶尖间隙动态测量精度均优于40μm；且针对2mm厚度的叶片，当模拟的叶片转速高达24000 r/min时，0.5～3 mm量程内的测量精度仍然优于60μm。");
			
	//		//英文切分、大小写归一、词形还原
	//		LemmatizeEn lem = new LemmatizeEn();
	//		var EnText=lem.lemmatizeEnglish(englishtext);

	//		//中文预处理
	//		ChinesePreprocessing pre = new ChinesePreprocessing();
	//		var CnText = pre.ChineseWordSegmentation(chinesetext);

	//		CommandLineOption ldaoption = new CommandLineOption();
	//		ldaoption.topics = (int)Math.Ceiling(System.Math.Sqrt(EnText.Length));
	//		double normolK = 200;
	//		ldaoption.alpha = ldaoption.topics/ normolK;
	//		ldaoption.beta = 0.5;
	//		ldaoption.savestep = 500;
	//		ldaoption.niters = 500;
	//		ldaoption.twords = 10;
	//		//读取国家中英对照表
	//		// 从文件中读取并显示每行
	//		string line = "";
	//		List<string> EnCountry= new List<string>();
	//		List<string> CnCountry = new List<string>();
	//		using (StreamReader sr = new StreamReader("..\\..\\LdaModel\\Resources\\国家中英对照表.txt"))
	//		{
	//			while ((line = sr.ReadLine()) != null)
	//			{
	//				string[] sArray = line.Split(':');
	//				EnCountry.Add(sArray[0]);
	//				CnCountry.Add(sArray[1]);
	//			}
	//		}
	//		//Console.WriteLine(EnCountry[CnCountry.IndexOf("中国")]);
	//		try
 //           {								
 //               LDAGibbsSampling model = new LDAGibbsSampling();
 //               Corpora cor = new Corpora();
 //               cor.LoadDataFile(EnText);
 //               model.TrainNewModel(cor, ldaoption);
	//			TopicSimilarityCos Simtopic = new TopicSimilarityCos();
	//			//相似度计算
	//			var s = Simtopic.SimilarityCos();
	//			Console.ReadKey();
	//		}
 //           catch (Exception ex)
 //           {

 //               Console.WriteLine(ex.StackTrace);
 //               Console.WriteLine(ex.Message);

 //           }
			

	//	}
 //   }
}
