translate language of text locally [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of anyway to translate text in a given language to another language at a linux/unix command line? At the moment I'm most interested in western languages.
I'd prefer not to send anything external to a service such as google translate or babelfish due to volume and firewall constraints.
For me tools close at hand are python, nltk, java/jvm stack, wordpress, (locally), pretty much anything hadoop or open source.
Although I'd hate to attempt to write something to do this, I'm considering maybe just mapping two dictionaries together and then using that to look up tokens singularly. This obviously wouldn't be the best "translation" but might give me some data I could work with in the desired language... the caveats being words that don't exist verbatim in the desired language, etc.

I think what I may have been looking for was apertium. It seems to have packages for install for various linux distributions, and should be accessible through the command line.
http://wiki.apertium.org/wiki/Main_Page

You could install the dictd server and whatever dictionaries you would like to install. Example of command line syntax to translate English to French after installing dictd would be:
dict -d fd-eng-fra "This is a test of the software"

Related

A cryptographic tool for specific fields in data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I was thinking of building a piece of software that would be able to encrypt specific fields in a data file. So I started to consider writing some code in Python using cryptographic libraries. However I wonder: is it really safe? Should I rather use existing cryptographic tools?
If so, do you know a good cryptographic tool I could rely on? The only tools I find only encrypt entire files or disks. Thank you!
This greatly depends (obviously), on how you write it.
There are libraries like cryptography which already provide this solution though and are considered very safe.
https://github.com/fugue/credstash, for instance, which is widely used, uses cryptography.
https://github.com/lyft/confidant uses it also.
I implemented a locally usable secret store using cryptography (which you could use to encrypt any type of data) - https://github.com/nir0s/ghost which you could use as a reference implementation or simply use it (hope I'm not breaking any rules here)

Simulink for Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have been searching and found many libraries (scipy, numpy, matplotlib) for Python that lets a user easily shift from MATLAB to Python. However, I am unable to find any library that is related to the Simulink in MATLAB. I would like to know if such a library exists or something else that resembles Simulink in it's GUI and computation features.
SimuPy is a farily recent framework has similar features as simulink. There is a SciPy 2018 presenation on it.
Until now there is no library like Simulink in Python. The closest match is the Modelica language with OpenModelica and a python implementation JModelica.
Recently I did a quick test with Xcos/Scilab following a tutorial from YT. I was very positively impressed with how good it looks and how easy and intuitive it was for me to use it, since it has been more than 20 years since I last used Simulink in University. (Note that I have never been an advanced user).
Even though the syntax of Scilab is similar to MATLAB (and like Python, quite readable and easy to understand) it even includes a translation tool to convert code from MatLab. (But I haven't tested it)
So, in summary, if all you need is a tool to simulate some engineering problem, I think you should give Scilab/Xcos a try.
Python is a great tool, but it is not the only one!
(You should always pick the "best tool for the problem", not the other way around.
And apparently, "Scilab is able to interact with any code written in Python thanks to its PIMS module." | From: https://wiki.scilab.org/Interoperability )

Is it possible to send emails in python? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My goal is to send emails entirely from python. I want to do it all from scratch, maybe go as far as building an email server in python if someone hasn't done it already. I want to do this because I'm basically tired of using Postfix or the common email providers with the standard SMTP/POP/IMAP libraries. Also, another reason I want to try to do this is because I want to try and understand better how the email protocols work.
I'm not entirely sure where to start. Maybe I should take a look at the Postfix source code and try and make a python SMTP server. I know it would be much easier to just stick with the standard way of doing it instead of building from scratch, but like I said, this is more of an educational study for me to learn how it all works, I will very likely never use it in production.
So, give me ideas guys. Where should I start? If you know of an article that may enlighten me, please post it. --Thanks
It's been done before, but you can always make one if you want.
smtpd was a Python Module of the Week.
This is some good reading that was provided in a similar SO question here.
I've used this before when I was working on a project.

Looking for example or documentation for wikidump python lib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I stumbled upon the wikidump python library, which I think suits me just fine.
I could get by by looking at the source code, but I'm new at python and I don't want to write BS code as the project I need it for is kind of important to me.
I got the 'wiki-SPECIFICDATE-pages-articles.xml.bz2' file and I would need to use that as my source for single article fetching. Can anyone give me some pointers as to properly achieve this or, even better, point at some documentation? I couldn't find any!
(p.s. if you got any better and properly doc'd lib, please tell me)
Not sure if I understand the question, but if you have the Wikipedia dump and you need to parse the wikicode, I would suggest mwparserfromhell lib.
Another powerful framework is Pywikibot, that is the historic framework for bot users on Wikipedia (thus, it has many scripts dedicated to writing pages, instead of reading and parsing articles). It has a lot of documentation (though, sometimes obsolete) and it uses MediaWiki API.
You can use them both, of course: PWB for fetching articles and mwparserfromhell for parsing.

What is a good configuration file library for c thats not xml (preferably has python bindings)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a good config file library for c that is not xml. Optimally I would really like one that also has python bindings. The best option I have come up with is to use a JSON library in both c and python. What would you recommend, or what method of reading/writing configuration settings do you prefer?
YaML :)
If you're not married to Python, try Lua. It was originally designed for configuration.
You could use a pure python solution like ConfigObj and then simply use the CPython API to query for settings. This assumes that your application embeds Python. If it doesn't, and if you are shipping Python anyway, it might make sense to just embed it. Your C .exe won't get that much bigger if it's a dynamic link, and you will have all the flexibility of Python at your disposal.
Despite being hated by techies and disowned by Microsoft, INI files are actually quite popular with users, as they are easy to understand and edit. They are also very simple to write parsers for, should your libraries not already support them.

Categories