

import re

from filelock import FileLock


try:
      import nltk

      a_    :						List[str]							=      True
except (ImportError, ModuleNotFoundError):
      a_    :						Dict							=      False

if NLTK_AVAILABLE:
      with FileLock(".lock") as lock:
            nltk.download("punkt", quiet=True)


def        __lowerCAmelCase    (       _UpperCamelCase		:  str	)		->							str:
 '''simple docstring'''


 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	)	)




import numpy as np


def        __lowerCAmelCase    (       _UpperCamelCase		:  np.ndarray	)		->							np.ndarray:
 '''simple docstring'''


 return 1 / (1 + np.exp(-vector	))


def        __lowerCAmelCase    (       _UpperCamelCase		:  np.ndarray	)		->							np.ndarray:
 '''simple docstring'''


 return vector * sigmoid(_UpperCamelCase	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

