semantic-analysis

Find similar texts based on paraphrase detection [closed]

眉间皱痕 提交于 2021-02-08 10:32:21
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Improve this question I am interested in finding similar content(text) based on paraphrasing. How do I do this? Are there any specific tools which can do this? In python preferably. 回答1: I believe the tool you are looking for is Latent Semantic Analysis. Given that my post is going to

Find similar texts based on paraphrase detection [closed]

时光怂恿深爱的人放手 提交于 2021-02-08 10:31:04
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Improve this question I am interested in finding similar content(text) based on paraphrasing. How do I do this? Are there any specific tools which can do this? In python preferably. 回答1: I believe the tool you are looking for is Latent Semantic Analysis. Given that my post is going to

what are the different techniques for comparing 2 words semantically? Which one is the best among them?

此生再无相见时 提交于 2020-08-19 05:44:19
问题 Right now, I am at the starting point of a project in which I am supposed to compare two words semantically. I came to know about WordNet wherein we find distance between words to find how similar they are in terms of their meaning. It would be really helpful if you can suggest some more techniques and which method would be the best one. 来源: https://stackoverflow.com/questions/18570378/what-are-the-different-techniques-for-comparing-2-words-semantically-which-one

what are the different techniques for comparing 2 words semantically? Which one is the best among them?

核能气质少年 提交于 2020-08-19 05:44:07
问题 Right now, I am at the starting point of a project in which I am supposed to compare two words semantically. I came to know about WordNet wherein we find distance between words to find how similar they are in terms of their meaning. It would be really helpful if you can suggest some more techniques and which method would be the best one. 来源: https://stackoverflow.com/questions/18570378/what-are-the-different-techniques-for-comparing-2-words-semantically-which-one

What are the tools for semantic analysis phase of compiler construction?

喜欢而已 提交于 2020-02-27 09:21:49
问题 Compiler construction can be divided into several phases such as Lexical analysis, Syntax analysis, Semantic analysis and etc. In lexical analysis, there are tools such as Lex, Flex and etc. In syntax analysis, there are tools such as Yacc, Bison, etc. I'm just curious what are the tools available for semantic analysis phase? 回答1: To the best of my knowledge there are no language-agnostic tools to perform type checking and if there were, they'd certainly not be generally applicable as many

How to manage semantic rule of declaration of variable in bison

廉价感情. 提交于 2019-12-24 19:02:07
问题 I have to build a compiler that translates the java language into pyhton. I'm using the Flex and Bison tools. I created the flex file and I defined the syntactic grammar in Bison for some restrictions that I have to implement (such as array, management of cycles, management of a class, management of logical-arithmetic operators, etc.). I'm having trouble understanding how to handle semantic rules. For example, I should handle the semantics for import statement and variable declaration, add

Simplest feature selection algorithm

放肆的年华 提交于 2019-12-12 08:41:40
问题 I am trying to create my own and simple feature selection algorithm. The data set that I am going to work with is here (very famous data set). Can someone give me a pointer on how to do so? I am planning to write a feature rank algorithm for a text classification. This is for a sentiment analysis of movie reviews, classifying them as either positive or negative. So my question is on how to write a simple feature selection for a text data set. 回答1: Feature selection methods are a big topic.

Reusing symbol table from semantic analysis phase for code generation

大兔子大兔子 提交于 2019-12-11 11:17:40
问题 I'm currently building a compiler for a language which has global variable and nested subroutine feature. Previously, I've only ever built a compiler for languages which only has local variable without nested subroutine. I have a problem on how to reuse symbol table filled during semantic analysis phase in code generation phase. I make the symbol table as a stack of linked list, where each linked list represents identifiers declared in a particular scope. Every time it enters a scope, a new

How do I translate LR(1) Parse into a Abstract syntax tree?

瘦欲@ 提交于 2019-12-11 03:17:51
问题 I have coded a table driven LR(1) parser and it is working very well however I am having a bit of a disconnect on the stage of turing a parse into a syntax tree/abstract syntax tree. This is a project that I m very passionate about but I have really just hit a dead end here. Thank you for your help in advance. Edit: Also my parser just uses a 2d array and an action object that tells it where to go next or if its a reduction where to go and how many items to pop. I noticed that many people use

Associativity and Precedence of Expressions when Generating C / C++ Code?

試著忘記壹切 提交于 2019-12-10 19:59:55
问题 I have written a basic compiler which generates an AST, correctly taking account of the operator precedence in expressions. However, when performing code generation to produce C++ code, I'm unsure of how to handle the use of brackets. For this expression: A - (B - c) The AST below: - / \ A - / \ B C Should correctly generate the previous expression including the parentheses, however if the second operator was an addition operator (for example), the parentheses would be unecessary. I would