Convert ANY sentence to text with windows speech

Currently I have a C# program that takes speech using the MS Windows Speech Recognition (SR) System, converts it to text, sends the question as text to Worlfram Alpha, and then reads the text-based answer back using text-to-speech (TTS). Unfortunately the computer can only recognize a list of predefined sentences and phrases that are defined in grammars that are input into the SR. I need the p

用Windows语音将任意句子转换为文本

目前我有一个C#程序,它使用MS Windows语音识别(SR)系统进行语音转换,将其转换为文本,将问题作为文本发送给Worlfram Alpha,然后使用文本转语音方式读取基于文本的答案TTS)。 不幸的是,计算机只能识别输入到SR中的语法中定义的预定义句子和短语的列表。 我需要程序来识别任何句子,而不必定义包含英语中每个单词的巨大语法文件。 如何让程序识别任何英语短语而不必定义包含完整英语语言规则的语法文件? 这可能吗?

Generating C# classes from XSD

I generate C# classes for this XSD schema using xsd.exe or Xsd2Code: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="student" type="personinfo"/> <xs:element name="employee" type="personinfo"/> <xs:complexType name="personinfo"> <xs:sequence> <xs:element name="firstname" type="xs:string"/>

从XSD生成C#类

我使用xsd.exe或Xsd2Code为此XSD模式生成C#类: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="student" type="personinfo"/> <xs:element name="employee" type="personinfo"/> <xs:complexType name="personinfo"> <xs:sequence> <xs:element name="firstname" type="xs:string"/> <xs:element n

Generate C# class from XSD (xhtml.blkstruct.class)

I have an xsd file, simplified as below with an element referencing the xhtml.BlkStruct.class. I have tried xsd.exe and xsd2code trying to generate a C# class from it, but I am always getting errors. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org

从XSD生成C#类(xhtml.blkstruct.class)

我有一个xsd文件,简化如下一个引用xhtml.BlkStruct.class的元素。 我试过xsd.exe和xsd2code试图从它生成一个C#类,但我总是得到错误。 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xs:complexType name="test"> <xs:

c# generating of xml feed according xsd

I need help with generating xml file for googleshop. I have some simple example xml feed for googleshop <?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>title</title> <item> <g:id>tddy123uk</g:id> </item> </channel> </rss&g

c#根据xsd生成xml提要

我需要帮助为googleshop生成xml文件。 我为googleshop提供了一些简单的xml feed示例 <?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>title</title> <item> <g:id>tddy123uk</g:id> </item> </channel> </rss> 从这里我创建了xsd模

Group by in LINQ with 2 attribtes

This is an already asked question, but that question is to work with 2 attributes only, I need to work with 3 attributes, So I am copy-pasting most of the text. Let's suppose if we have a class like class Person { internal int PersonID; internal string car ; internal string friend ; } Now I have a list of this class: List persons; Now this list can have instances multiple same Perso

在LINQ中用2个属性分组

这是一个已经被问到的问题,但是这个问题只能使用2个属性,我需要使用3个属性,所以我复制了大部分文本。 假设我们有类似的课程 class Person { internal int PersonID; internal string car ; internal string friend ; } 现在我有一个这个类的列表:列出人物; 现在这个列表可以有多个相同PersonID的实例,例如。 persons[0] = new Person { PersonID = 1, car = "Ferrari" , friend = "Josh" }; persons[1] = new P

Get the intersect of two list with specific criteria

Lets say I have two list of Cars List1: "Ferrari",2005,"$350,000" "BMW",2009,"$29,000" "Audi",2011,"$33,000" List2: "Infinity",2005,"$267,000" "BMW",2009,"$45,000" "Ferrari",2005,"$330,000" "Toyota",2009,"$35,000" I know that I can get a l

获取两个列表与特定条件的交集

可以说我有两个汽车列表 列表1: “法拉利”,2005年,以 “$ 350,000” “宝马”,2009年, “$ 29,000名” “奥迪”,2011年, “$ 33,000名” 列表2: “无限”,2005年, “$ 267,000个” “宝马”,2009年, “$ 45,000名” “法拉利”,2005年, “$ 330,000” “丰田”,2009年, “$ 35,000个” 我知道我可以使用Intersect方法获取重复汽车列表。 但我也想保留价格较低的那个。 例如,我想要一些将返回的方法: “法拉利”,20

LINQ order by a number sequence

I have a list of products with their category ID, like: ID CategoryID Product Name 1 1 Product 1 2 1 Product 2 3 7 Product 3 4 8 Product 4 5 9 Product 5 6 10 Product 6 I want to take this list and order by a list of categoryID, like: 1, 8, 9 and the rest, so I get: ID C

LINQ按数字顺序排序

我有一个产品列表与他们的类别ID,如: ID CategoryID Product Name 1 1 Product 1 2 1 Product 2 3 7 Product 3 4 8 Product 4 5 9 Product 5 6 10 Product 6 我想通过一个categoryID列表来获取这个列表并排序,如:1,8,9等等,所以我得到: ID CategoryID Product Name 1 1

LINQ Multiple Order By

I have 3 tables Pamphlets, Categories and Program. The Pamphlet table has a CategoryID and ProgramID column. The following code works: var pamphlets = db.Pamphlets.Include("Category").Include("Program").ToList(); What I need to do is sort by CategoryName (Category table) and then PamphletName (Pamphlet table). 您只需将一个调用链接到ThenBy(): var sortedPamphlets = db.Pamphlets.Include("Cat

LINQ Multiple Order By

我有3个表小册子,类别和程序。 小册子表有一个CategoryID和ProgramID列。 以下代码工作: var pamphlets = db.Pamphlets.Include("Category").Include("Program").ToList(); 我需要做的是按CategoryName(类别表),然后是PamphletName(小册子表)。 您只需将一个调用链接到ThenBy(): var sortedPamphlets = db.Pamphlets.Include("Category").Include("Program") .OrderBy(p => p.Category

Linq order by, group by and order by each group?

I have an object that looks something like this: public class Student { public string Name { get; set; } public int Grade { get; set; } } I would like to create the following query: group grades by student name, order each student group by grades, and order groups by max grade in each group. So it will look like this: A 100 A 80 B 80 B 50 B 40 C 70 C 30 I created the following quer

Linq排序,按组排列和排序?

我有一个像这样的对象: public class Student { public string Name { get; set; } public int Grade { get; set; } } 我想创建以下查询:按学生姓名分组学习成绩,按年级排列每个学生组,按每个组的最高成绩排序组。 所以它看起来像这样: A 100 A 80 B 80 B 50 B 40 C 70 C 30 我创建了以下查询: StudentsGrades.GroupBy(student => student.Name) .OrderBy(studentGradesGroup => studentGradesGr

How would you do a "not in" query with LINQ?

I have two collections which have property Email in both collections. I need to get a list of the items in the first list where Email does not exist in the second list. With SQL I would just use "not in", but I do not know the equivalent in LINQ. How is that done? So far I have a join, like... var matches = from item1 in list1 join item2 in list2 on item1.Email equals item2.Email

你如何做一个“不在”查询与LINQ?

我有两个集合在两个集合中都有属性Email 。 我需要获得第一个列表中Email不存在于第二个列表中的项目列表。 使用SQL我只是使用“不在”,但我不知道在LINQ中的等价物。 这是如何完成的? 到目前为止,我有一个加入,如... var matches = from item1 in list1 join item2 in list2 on item1.Email equals item2.Email select new { Email = list1.Email }; 但我不能加入,因为我需要差异,加入会失败。 我需要一些使用Conta