split the process function into 2 so that it can be called in Python
instead of calling the function via terminal, process_text can be independently called to process wiki text