Natural Language Processing with Python Phần 2

Nó dừng lại sau 12 lần lặp lại, hoặc nếu nhận được một bản dịch đã được sản xuất đã được (chỉ một vòng lặp): babelize_shell () NLTK Babelizer: gõ 'giúp đỡ' cho một danh sách các lệnh. | then submits the resulting sentence for translation back into English. It stops after 12 iterations or if it receives a translation that was produced already indicating a loop babelize_shell NLTK Babelizer type help for a list of commands. Babel how long before the next flight to Alice Springs Babel german Babel run 0 how long before the next flight to Alice Springs 1 wie lang vor dem folgenden Flug zu Alice Springs 2 how long before the following flight to Alice jump 3 wie lang vor dem folgenden Flug zu Alice springen Sie 4 how long before the following flight to Alice do you jump 5 wie lang bevor der folgende Flug zu Alice tun Sie springen 6 how long before the following flight to Alice does do you jump 7 wie lang bevor der folgende Flug zu Alice tut tun Sie springen 8 how long before the following flight to Alice does do you jump 9 wie lang bevor der folgende Flug zu Alice tut tun Sie springen 10 how long before the following flight does to Alice do do you jump 11 wie lang bevor der folgende Flug zu Alice tut Sie tun Sprung 12 how long before the following flight does leap to Alice does you Observe that the system correctly translates Alice Springs from English to German in the line starting 1 but on the way back to English this ends up as Alice jump line 2 . The preposition before is initially translated into the corresponding German preposition vor but later into the conjunction bevor line 5 . After line 5 the sentences become non-sensical but notice the various phrasings indicated by the commas and the change from jump to leap . The translation system did not recognize when a word was part of a proper name and it misinterpreted the grammatical structure. The grammatical problems are more obvious in the following example. Did John find the pig or did the pig find John babelize_shell Babel The pig that John found looked happy Babel german Babel run 0 The pig that John found looked happy 1 Das Schwein das John fand schaute gl cklich 2 The pig which found John .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.