Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
Super Guru

Related: ApacheCon 2018 in Montreal

With my talk in a dual language city, I thought perhaps I should do my talk in French. My college French is very rusty and my accent is very New Jersey. The two don't mix well. So let's have Apache NiFi do it for me. After publically debating this on Twitter, I decided to see if I could implement a solution.


Most of the heavy lifting is done by Python which calls Google Translate API under the covers, automagically.

My Presentation is here:

Flow to Extract French


Apache Tika extracts the text from PDF or PPTX and converts to text or HTML. ( I chose text).

Run the Translate Python with a sentence extracted from the PDF or PPTX.


Let's send that translated french line to it's own slack channel.


Let's send the english to another.


And there it is:



python3.6 -W ignore /Volumes/TSPANN/2018/talks/IOT/ "$1" 2>/dev/null

from textblob import TextBlob
import sys
text = ""
for x in sys.argv[1:]:
    text += str(x)
#text =
blob = TextBlob(text)
#for sentence in blob.sentences:
#    print(sentence.sentiment.polarity)
# 0.060
# -0.341
print(blob.translate(to="fr") )

NiFi Flow


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎08-17-2019 06:22 AM
Updated by:
Top Kudoed Authors