Natural Language Processing
+
operator or join()
method for concatenation.upper()
and lower()
for case modification.split()
method divides a string into a list of words.in
or find()
to search for substrings.replace()
method replaces parts of a string.text = "Text analysis with NLP"
clean_text = text.replace("Text", "Document")
print(clean_text) # Outputs: Document analysis with NLP
Document analysis with NLP
strip()
, lstrip()
, or rstrip()
to remove unwanted spaces.Seminar: LLM, WiSe 2024/25