'''simple docstring'''

import re

from filelock import FileLock


try:
  import nltk

  __a:			Tuple	       =       True
except (ImportError, ModuleNotFoundError):
  __a:			List[Any]	       =       False

if NLTK_AVAILABLE:
  with FileLock(""".lock""") as lock:
    nltk.download("""punkt""", quiet=True)
def       __UpperCamelCase	(       UpperCAmelCase					):
 re.sub('''<n>'''		,					''''''		,					UpperCAmelCase					)  # remove pegasus newline char
 assert NLTK_AVAILABLE, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
 return "\n".join(nltk.sent_tokenize(UpperCAmelCase					)					)


'''simple docstring'''

import numpy as np
def       __UpperCamelCase	(       UpperCAmelCase					):
 return 1 / (1 + np.exp(-vector					))
def       __UpperCamelCase	(       UpperCAmelCase					):
 return vector * sigmoid(UpperCAmelCase					)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

