Đang chuẩn bị liên kết để tải về tài liệu:
learn prolog now phần 8

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Quy tắc DCG thực sự các quy tắc Prolog thông thường trong ngụy trang, và điều này có nghĩa rằng bạn phải chú ý những gì thông dịch viên Prolog của bạn với họ.Ví dụ cuối cùng của chúng tôi, chúng ta sẽ xác định một DCG cho ngôn ngữ chính thức một tỷ. Ngôn ngữ này là gì? Và một ngôn ngữ chính thức là gì? | 122 Chapter 8. More Definite Clause Grammars 8.4 Exercises Exercise 8.1 Here s our basic DCG. s -- np vp. np -- det n. vp -- v np. vp -- v. det -- the . det -- a . n -- woman . n -- man . v -- shoots . Suppose we add the noun men which is plural and the verb shoot . Then we would want a DCG which says that The men shoot is ok The man shoots is ok The men shoots is not ok and The man shoot is not ok. Change the DCG so that it correctly handles these sentences. Use an extra argument to cope with the singular plural distinction. Exercise 8.2 Translate the following DCG rule into the form Prolog uses kanga V R Q -- roo V R jumps Q Q marsupial V R Q . 8.5 Practical Session 8 The purpose of Practical Session 8 is to help you get familiar with DCGs that make use of additional arguments and tests. First some keyboard exercises 1. Trace some examples using the DCG which uses extra arguments to handle the subject object distinct the DCG which produces parses and the DCG which uses extra tests to separate lexicon and rules. Make sure you fully understand the way all three DCGs work. 2. Carry out traces on the DCG for dnbncn that was given in the text that is the DCG that gave the Count variable the values 0 succ 0 succ succ 0 and so on . Try cases where the three blocks of as bs and cs are indeed of the same length as well as queries where this is not the case. Now for some programming. We suggest two exercises. 8.5. Practical Session 8 123 1. First bring together all the things we have learned about DCGs for English into one DCG. In particular today we say how to use extra arguments to deal with the subject object distinction and in the exercises you were asked to use additional arguments to deal with the singular plural distinction. Write a DCG which handles both. Moreover write the DCG in such a way that it will produce parse trees and makes use of a separate lexicon. 2. Once you have done this extend the DCG so that noun phrases can be modified by adjectives and simple .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.