首页 \ 问答 \ 按另一个表的字段对列表进行排序(Sort the list by the field of another table)

按另一个表的字段对列表进行排序(Sort the list by the field of another table)

有两个表:

表1 Id名称

表2 Id表1ID(外键表1 ID)日期

使用EntityFramework我使用:

var list = db.Table1.Where(some selection).ToList();

如何按表2中的“日期”字段对“列表”进行排序?


There are two tables:

Table1 Id Name

Table2 Id Table1ID(foreign key Table1 ID) Date

With EntityFramework I use:

var list = db.Table1.Where(some selection).ToList();

How can I sort "list" by "Date" field in Table2?


原文:https://stackoverflow.com/questions/31502993
更新时间:2022-03-08 09:03

最满意答案

如果您正在进行手动标记以训练您自己的NER模型(从您的问题中不是100%清楚),您应该包含您希望稍后标记的相同类型的数据,很可能是完整的句子。 默认模型功能(请参阅OpenNLP文档 )包括当前正在考虑的令牌左侧和右侧的令牌窗口,因此您希望标记的实体出现在其正常上下文中。 您还希望模型了解哪些单词不应标记为实体,因此它们还需要显示在训练数据的上下文中。

请参阅相关问题: 打开NLP名称查找器培训


If you are doing manual tagging to train your own NER model (it's not 100% clear from your question), you should include the same kind of data you expect to tag later, most likely full sentences. The default model features (see OpenNLP docs) include a window of tokens to the left and right of the token that's currently being considered, so you want your labeled entities to appear in their normal context. You also want your model to learn which words shouldn't be tagged as entities, so they also need to appear in context in your training data.

See the related question: Open NLP Name Finder Training

相关问答

更多
  • 您可以尝试将您的语料库文本转换为数据框,并从数据框本身访问所需的文本。 我已经使用内置的示例数据“粗略”(来自tm包)。 data("crude") dataframe<-data.frame(text=unlist(sapply(crude, `[`, "content")), stringsAsFactors=F) dataframe[1,] [1] "Diamond Shamrock Corp said that\neffective today it had cut its contract pr ...
  • @ maxymoo的答案对于您发布的示例是正确的,但如果您的语料库中的某些单词包含斜杠(例如,“和/或”)或连字符,则无效。 要捕获带连字符的单词,请用(\w+-\w+|\w+)替换答案中的(\w+-\w+|\w+) 。 斜线更难。 您需要收集完整的标签列表并编写预测。 @maxymoo's answer is correct for the example you posted, but will not work if some words in your corpus contain slashes ...
  • 这取决于标签集的详细程度。 10-12基本POS(名词,形容词,...,外语,标点符号)或更详细(区别动词形式,代词类型,性别,数字,时态,......)。 前者几乎是通用的(参见Multext-East标记集或Google的通用标记集的类别 )。 后者要复杂得多,我们有一篇关于它的论文 。 简而言之,我们有一个标签集模板,然后我们修改它(删除/添加类别和值)以适应特定语言。 关于注释:它取决于 - 如果你有一个小的标签集,你可以手动为每个单词分配一个标签,比如在记事本或一些简单的GUI(我们使用这个 ,但 ...
  • 是的,这是可能的,但有点棘手,没有开箱即用的功能可以做到这一点,所以你必须编写一些代码。 基本思想是用你的代码替换tokenize , ssplit和pos ssplit (以及你也有树的parse注释器),你的代码从你带注释的文件中加载这些注释。 在很高的层次上,您必须执行以下操作: 使用MemoryTreebank加载树 循环遍历所有树,并为每个树创建一个您添加的CoreMap语句 一个TokensAnnotation TreeAnnotation和SemanticGraphCoreAnnotation ...
  • 斯坦福CoreNLP当然可以直接做标记。 以下代码行标记您的示例,并为您提供所需的输出。 Properties props = new Properties(); props.setProperty("annotators","tokenize, ssplit, pos"); StanfordCoreNLP pipeline = new StanfordCoreNLP(props); Annotation annotation = new Annotation("I'm so happy about m ...
  • 如果您正在进行手动标记以训练您自己的NER模型(从您的问题中不是100%清楚),您应该包含您希望稍后标记的相同类型的数据,很可能是完整的句子。 默认模型功能(请参阅OpenNLP文档 )包括当前正在考虑的令牌左侧和右侧的令牌窗口,因此您希望标记的实体出现在其正常上下文中。 您还希望模型了解哪些单词不应标记为实体,因此它们还需要显示在训练数据的上下文中。 请参阅相关问题: 打开NLP名称查找器培训 If you are doing manual tagging to train your own NER mo ...
  • 我在使用BRAT方面有很好的经验。 GATE也是一个非常复杂的工具,用于注释,更陡峭的学习曲线。 I had a good experience working with BRAT. GATE is also a very complex tool for annotating, steeper learning curve.
  • 我认为对于您的特定用例,最好将其转换为小写,因为最终,您需要预测给定某个上下文的单词。 你可能不需要预测你的用例中的句子开始。 另外,如果预测名词,你可以稍后再利用它。 但是考虑反过来。 (假设你的语料库是英文的)你的模型可能会对一个句子开头的单词进行处理,该单词的大写字母与句子后面出现的同一个单词不同,后面没有任何后者。 这可能会导致准确性下降。 而我认为,降低这些词将是一个更好的折衷。 我在问题回答系统上做了一个项目,并将文本转换成小写字母是一个很好的折衷。 编辑:由于您的语料库是德语,因此它最好保留大 ...
  • 我在这里发布这个只是为了更长篇幅地总结一下这些评论并给你一些评论。 不确定它会回答你的问题。 如果有的话,它应该告诉你为什么要重新考虑它。 关于你的问题的要点 在我谈谈你的问题之前,让我指出一些关于你的方法的事情。 单词嵌入本质上是基于单词分布的意义的数学表示。 它们是“ 你应该知道它所保留的公司的一句话”这句话的缩影。 从这个意义上说,你需要非常规则的拼写错误才能从矢量空间方法中获得有用的东西。 例如,可以解决的问题是美国与英国的拼写或短w8与完整形式如wait 。 我想澄清的另一点(或者你应该这样做)是 ...
  • 那么,之后将一个简单但不是非常优雅的方式将您的ID分配给您的文档可能如下: for (i in 1:length(corpus)) { attr(corpus[[i]], "ID") <- df$ids[i] } Well, one simple but not very elegant way to assign your ids to your documents afterward could be the following : for (i in 1:length(corpus)) { ...

相关文章

更多

最新问答

更多
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
  • 是否可以嵌套hazelcast IMaps?(Is it possible to nest hazelcast IMaps? And whick side effects can I expect? Is it a good Idea anyway?)
  • UIViewAnimationOptionRepeat在两个动画之间暂停(UIViewAnimationOptionRepeat pausing in between two animations)
  • 在x-kendo-template中使用Razor查询(Using Razor query within x-kendo-template)
  • 在BeautifulSoup中替换文本而不转义(Replace text without escaping in BeautifulSoup)
  • 如何在存根或模拟不存在的方法时配置Rspec以引发错误?(How can I configure Rspec to raise error when stubbing or mocking non-existing methods?)
  • asp用javascript(asp with javascript)
  • “%()s”在sql查询中的含义是什么?(What does “%()s” means in sql query?)
  • 如何为其编辑的内容提供自定义UITableViewCell上下文?(How to give a custom UITableViewCell context of what it is editing?)
  • c ++十进制到二进制,然后使用操作,然后回到十进制(c++ Decimal to binary, then use operation, then back to decimal)
  • 以编程方式创建视频?(Create videos programmatically?)
  • 无法在BeautifulSoup中正确解析数据(Unable to parse data correctly in BeautifulSoup)
  • webform和mvc的区别 知乎
  • 如何使用wadl2java生成REST服务模板,其中POST / PUT方法具有参数?(How do you generate REST service template with wadl2java where POST/PUT methods have parameters?)
  • 我无法理解我的travis构建有什么问题(I am having trouble understanding what is wrong with my travis build)
  • iOS9 Scope Bar出现在Search Bar后面或旁边(iOS9 Scope Bar appears either behind or beside Search Bar)
  • 为什么开机慢上面还显示;Inetrnet,Explorer
  • 有关调用远程WCF服务的超时问题(Timeout Question about Invoking a Remote WCF Service)