Sentence:  For many nights afterward , the <WSD>idea</WSD> of her having been so close to me in that imagined bed would return and fill me with obscure and painful desires , would cause me to lie awake in shame , tossing with irresolution , longing to fall into a deep sleep . 
Meaning of the word marked with <WSD> tags:  the content of cognition; the main thing you are thinking about