Questions tagged [negation]

Negation is the logic operation that inverses a value, also seen as a NOT operation. Functions in specific languages may operate with negation to specific uses. For questions specific to the use of complement patterns in regular expressions, use [regex-negation] instead.

Negation is the logic operation that inverses a value, also seen as a NOT operation. Negation may be implemented by specific languages to provide functions capable of operating with values for specific uses.

Read also the wikipedia article on Negation.

248 questions
1
vote
2 answers

Drools Constraint object other than P is found in collection

I have been trying to figure this out on and off for a really long time. I can imagine a lot of very verbose and non-droolsy ways to go about accomplishing this. However, I would like to know the best practice for dealing with a situation like this.…
melchoir55
  • 6,842
  • 7
  • 60
  • 106
1
vote
1 answer

Negation of Formal Logic

What domain is U and what is P(x) in order for this statement to be false? ∀x∈U, P(x) ⇒ ∃x∈U, P(x) I don't think this is possible but I am hoping someone can figure out how to make this statement false.
1
vote
3 answers

"not" operator or negation in Prolog

Background I need to write a relation power(P) that looks through a list and decides if all but one element of P is zero. Here is what I have: %I have a relation called zero(P) which decides if every element is zero. power([H|T]) :- H is not…
jessicaraygun
  • 315
  • 1
  • 4
  • 15
1
vote
2 answers

MongoEngine - Query Operator for negation - Substitute for exclude()

I need to make a query with a negation. In Django I would use exclude() but regarding to the MongoEngine doc exclude means something different. Is there an query operator or a different function to make a…
Ron
  • 22,128
  • 31
  • 108
  • 206
1
vote
1 answer

Negation and testing for a unique set in Prolog

I've just started experimenting with Prolog, and I was trying to write a rule to find out whether a list contained only unique elements. I got it working in the second variation (by negating a positive test), but I've completely failed to understand…
Michael Schuller
  • 494
  • 4
  • 14
0
votes
2 answers

Prolog - Is this negation by failure correct?

Using ! and fail, I'm trying negation by failure. The method below however gives me the warning: Singleton variables: [X]. However, it seems to work so I'm wondering if there's anything wrong with my method of doing it: likes(vincent,…
mino
  • 6,978
  • 21
  • 62
  • 75
0
votes
0 answers

Is it possible to use Spacy for negation detection in the French language?

In negspacy, one can detect negations. I have done the following for the English language. nlp = spacy.load("en_core_web_sm") nlp.add_pipe("negex", config={"ent_types":["PERSON","ORG"]}) doc = nlp("She does not like London but likes Paris.") for e…
Ruthger Righart
  • 4,799
  • 2
  • 28
  • 33
0
votes
1 answer

Rationale for default NaN is never returned from FABS, FMAX*, FMIN*, and FNEG instructions

Arm Architecture Reference Manual for A-profile architecture (issue I.a) (emphases added): DN, bit [25] Default NaN use for NaN propagation. 0b0 NaN operands propagate through to the output of a floating-point operation. 0b1 Any operation involving…
pmor
  • 5,392
  • 4
  • 17
  • 36
0
votes
1 answer

TCL glob negative match when listing files

I have a directory containing some files (e.g.): SASA_AMK12.txt SASA_AMK13.txt SASA_AMK5.txt SASA_AMK9.txt SASA_ATH10.txt SASA_PSK.txt SASA_ProtAMK12.txt SASA_ProtAMK13.txt SASA_ProtAMK5.txt SASA_ProtAMK9.txt SASA_ProtATH10.txt SASA_ProtGSK.txt For…
Nikola
  • 5
  • 3
0
votes
1 answer

Neo4j Cypher exclude nodes where a specific relationship is missing

I am trying to implement a fraud detection system in neo4j, where I have a bunch of nodes with person, bank account, kredit card, telephone numbers and addresses. A basic idea of detecting fraud in bank sytems is someone who has a bank account and a…
0
votes
2 answers

Negating a sentence

I'm looking for algorithm or function to negate a sentence, for example: input: "The Belgian kid like chocolate" output: "The Belgian kid doesn't like chocolate" Does anyone knows an Algorithm or ML model to perform this task?
0
votes
0 answers

NLP Negex Taking Too Long

I'm currently trying to find entities that are negated. I have the following code, but since my string is too long, it's taking forever to run. Is there any way I can optimize this? I haven't found a good solution that's…
Willie
  • 33
  • 2
0
votes
3 answers

Cracking my head over the usage of tilde in Pandas

I read numerous similar posts about the subject here but still cannot make anything out of this. I have this simple list: mask =[False, False, False, False, True, True, False] And am attempting to negate this list via the ~ operator (this is the…
DDogu
  • 5
  • 4
0
votes
1 answer

How to run NegAIT with Stanford core nlp in Java in terminal in Mac?

I am not familiar with Java (only python). But I'd like to run NegAIT. I have stanford core nlp 3.7 installed & downloaded the NegAIT repository. They're both in my home directory. I also have JDK SE 1.8 set as my home path. When I ran the command…
blah
  • 674
  • 3
  • 17
0
votes
1 answer

z3py: How to convert a formula into NNF format?

I wanted to convert a formula to its NNF format using z3py. For e.g., Given Or(Not(And(i1, Not(And(i0, i4, i1, i2)))), And(i3, i1, i2)) I want Or(Not(i1), And(i0, i4, i1, i2), And(i3, i1, i2)) Thanks
Ravi Raja
  • 61
  • 9