Python Forum
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
From noun to verb
#1
Hi everybody

I'm currently working on a language project. My actual task consists in finding verb forms of given nouns. Not in English, but in German.

We have Germanet available, which is a similar tool to Wordnet (but less functions and data). Due to this fact, it's not so easy to find verbs to the corresponding nouns.
Using Germanets Synsets only gives me similar nouns, but no verbs. So I'd have two possible solutions:

1.) translate the noun to English, use Wordnet and search for the corresponding verb forms, translate back to German
2.) take the noun and use online sites such as duden.de to find corresponding verbs (problem: duden.de doesn't indicate systematically the verbs to nouns; but maybe you know a better resource?)

What do you think about my two ideas, and which one would you do? Or do you have any other suggestion?
Thanks a lot!
Reply
#2
Given those two options, I'd probably be inclined toward (1) because I don't like relying on online APIs when libraries are available. You won't run into call caps, price hikes (including if it's free today and might not be later) and even though I usually have internet access when developing, I appreciate not being blocked by it or needing to tether or something.

All that reasoning aside, translation is fraught with issues (take any text, translated it from German to English and then back to German from English and you'll see what I mean). Avoiding it would probably lead to greater correctness.
Reply
#3
Hm if I understand you correctly, you think that both versions aren't ideal (me too, by the way).
But you don't have any other solution, neither?

If you would choose (1), how would you translate a given noun using python?
Reply
#4
You can't
Without a context, a single word could mean everything. This is why google.translate is showing all possible meanings and usage also.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#5
(May-22-2017, 05:50 PM)MattaFX Wrote: If you would choose (1), how would you translate a given noun using python?
I assumed you had a way to do it.
(May-22-2017, 05:54 PM)wavic Wrote: Without a context, a single word could mean everything.
+1

Doing it would be non-deterministic, since words don't have a 1-1 mapping between languages, but I partly assumed that you knew / it wasn't a big deal. If something like 80% accuracy is acceptable it would probably be fine, but it's virtually impossible to get it perfect.
Reply
#6
You might try NLTK .  They have many corpora available or you could create your own. Another resource would be  The Stanford Parser , though written in Java, it would at least give you an idea about direction.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#7
The problem is that I have a solution for English nouns to transform to English verbs (using nltk), but not in German. So I thought it would be a good idea to translate the words to English and back again to German after the verbalization....
Reply
#8
There are translation packages available, see: https://pypi.python.org/pypi?%3Aaction=s...mit=search
choose one with high download volume and recent updates
Reply
#9
I think the problem with that approach, as has been pointed out previously, is that words don't always translate nicely and the problem would only be compounded by going from German to English (US or UK versions, for example) then back to German.  For me, it seems option 2 would be the best fit, even if one site cannot supply all the information, it would at least give you a piece of the puzzle for your database, a second site may provide another piece and so on.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#10
I've got a new approach: I just implement the most important rules from here http://www.canoo.net/services/Wordformat...uffig.html

One question to this: How would you, for example, implement the rules for nouns "ohne Umlaut" ?
With an example, it should be possible for me to implement other rules :)

Thanks a lot! :)
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020