captivity vs constraint

captivity

noun
  • The state of being captive. 

  • The state or period of being imprisoned, confined, or enslaved. 

constraint

noun
  • The repression of one's feelings. 

  • An irresistible force or compulsion. 

  • A condition that a solution to an optimization problem must satisfy. 

  • A linkage or other restriction that maintains database integrity. 

  • Something that constrains; a restriction. 

How often have the words captivity and constraint occurred in a corpus of books? (source: Google Ngram Viewer )