> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/vi/theo-linh-vuc/10-attribute-value-matrices.md).

# Ma trận giá trị thuộc tính

Bài viết này minh họa cách dàn trang ma trận giá trị thuộc tính (AVM), một cách thực tế để trình bày [cấu trúc đặc trưng](https://en.wikipedia.org/wiki/Feature_structure) như một nhóm các thuộc tính và các giá trị tương ứng của chúng.

## Các ghi chú khuyên dùng về các gói AVM cho LaTeX

Bài viết này sử dụng `gói avm` , vốn là lựa chọn được ưa dùng để dàn trang AVM vào thời điểm tài liệu này được viết ban đầu. Đáng tiếc là, `gói avm` gói này không được phân phối bởi TeX Live, nghĩa là người dùng Overleaf sẽ phải tải lên một bản sao (`avm.sty`) vào dự án của họ. Để khắc phục điều này, [dự án Overleaf Gallery](https://www.overleaf.com/latex/templates/examples-of-attribute-value-matrices/fnrbcjztvjjv) đi kèm với bài viết này bao gồm một bản sao của `gói avm` gói.

Một lựa chọn thay thế cho `gói avm`, còn [`langsci-avm` gói](https://ctan.org/pkg/langsci-avm?lang=en), hiện đã có trong TeX Live, nên có thể truy cập trực tiếp qua Overleaf. Tuy nhiên, do khác biệt về cú pháp và tính năng, các ví dụ dựa trên `gói avm`các ví dụ "-based" trong bài viết này sẽ không biên dịch được với `langsci-avm` và cần chỉnh sửa một chút. Xem mục 4.6 của [`langsci-avm` tài liệu](http://mirrors.ctan.org/macros/latex/contrib/langsci-avm/langsci-avm.pdf) để được hướng dẫn khi chuyển từ `gói avm` sang `langsci-avm`.

## Bắt đầu

Hãy sử dụng `gói avm` môi trường để tạo một ma trận giá trị thuộc tính, như minh họa trong ví dụ sau:

```latex
\documentclass{article}
\usepackage{avm}

\begin{document}

\begin{avm}
    \[ cat\|subcat & \<NP$_{it}$, NP$_{\@2}$, S[comp]:\@3\> \\
       content & \[ relation & \bf bother\\
                    bothered & \@2 \\
                    soa-arg  & \@3 \] \]
\end{avm}

\end{document}
```

Ví dụ này tạo ra kết quả sau:

![Một ma trận giá trị thuộc tính được dàn trang trên Overleaf bằng LaTeX](/files/5214509fa8d807cfc2dccba186d33621726738db)

\* Để khám phá AVM, hãy mở dự án Overleaf này. [Overleaf.](https://www.overleaf.com/project/new/template/26428?id=113292459\&templateName=Example+project+demonstrating+attribute+value+matrices\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)

## Cách dùng cơ bản

Để dàn trang một ma trận giá trị thuộc tính bên trong một `gói avm` môi trường, bạn cần biết một số lệnh:

* `\avmfont{\sc}`: thay đổi phông chữ dùng trong các ma trận, trong trường hợp này là chữ in hoa nhỏ. Bất kỳ [họ phông chữ](/latex/vi/phong-chu/01-font-sizes-families-and-styles.md) nào khác cũng đều dùng được. Cỡ chữ và [kiểu chữ](/latex/vi/phong-chu/02-font-typefaces.md) cũng có thể được khai báo ở đây.
* `\begin{avm}` và `\end{avm}`: mở và đóng môi trường nơi ma trận giá trị thuộc tính sẽ được tạo.
* `\[` và `\]`: in các dấu ngoặc vuông dùng để phân định các phần của ma trận. Các loại ngoặc khác cũng có thể được dùng với các lệnh `\<`, `\>`, `\{` và `\}`.
* `\\`: chèn một dòng mới.
* `&`: tạo một ngăn cột trong cùng một dòng.

Ví dụ sau minh họa các điều này:

```latex
\documentclass{article}

\usepackage{avm}
\avmfont{\sc}

\begin{document}
\begin{avm}
    \[ subj & \[ pers & 3 \\
                 num & sg \\
                 gend & masc\\
                 pred & \rm ‘pro’ \]\\

        pred & \rm ‘eat\q<SUBJ, OBJ\q>’\\

                 obj & \[ pers & 3 \\
                 num & pl \\
                 gend & fem \\
                 pred & \rm ‘pro’ \]
        \]
\end{avm}

\end{document}
```

Ví dụ này tạo ra kết quả sau:

![Một ma trận giá trị thuộc tính được dàn trang trên Overleaf bằng LaTeX](/files/5184beaf257fd1e94203af55f2a4662641c4e6a1)

\* Để khám phá AVM, hãy mở dự án Overleaf này. [Overleaf.](https://www.overleaf.com/project/new/template/26428?id=113292459\&templateName=Example+project+demonstrating+attribute+value+matrices\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)

## Các cột không căn chỉnh

Đôi khi, khi một dòng quá dài, có thể tiện hơn nếu dùng các cột không căn chỉnh để cải thiện đầu ra:

```latex
\begin{avm}
    \[ \avmspan{system\|local\|content\; \@2} \\
        qstore & \[det & \textnormal{forall} \\
                   restpar & \@2 \[para & \@1 \\
                                   restr & \[reln & \textnormal{book} \\
                                             inst & \@1 \] \] \] \]
\end{avm}
```

Ví dụ này tạo ra kết quả sau:

![Một ma trận giá trị thuộc tính được dàn trang trên Overleaf bằng LaTeX](/files/9d5f14f544f03e62fef1e2323a9e4b247cf8ca9e)

Lệnh `\avmspan{}` ngăn việc căn cột cho đối số của nó, trong khi lệnh `\;` chèn một khoảng trống ngang hơi dài hơn bình thường, tạo thành một dấu phân cách đẹp.

\* Để khám phá AVM, hãy mở dự án Overleaf này. [Overleaf.](https://www.overleaf.com/project/new/template/26428?id=113292459\&templateName=Example+project+demonstrating+attribute+value+matrices\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)

## Nhãn loại

Có thể thêm các nhãn loại ở các góc của một AVM. Có hai kiểu có thể dùng. Kiểu thứ nhất là in các nhãn bên trong ma trận:

```latex
\avmsortfont{\it}
\avmvalfont{\it}
\begin{avm}
    \[ \asort{indexed-obj}
       index & \[\asort{index}
                  variable & \@1 \[\asort{variable}
                                    per & 3rd \\
                                    num & sing \\
                                    gend & neut \] \\
                  restriction & \[\asort{psoa}
                                  relation & book \\
                                  instance & \@1 \] \] \]
\end{avm}
```

Mã này tạo ra kết quả sau:

![Một ma trận giá trị thuộc tính được dàn trang trên Overleaf bằng LaTeX](/files/a33d529d9f4c6f9befeb129e2881bdad359512b5)

\* Để khám phá AVM, hãy mở dự án Overleaf này. [Overleaf.](https://www.overleaf.com/project/new/template/26428?id=113292459\&templateName=Example+project+demonstrating+attribute+value+matrices\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)

Trong ví dụ này có ba lệnh mới:

* `\avmsortfont{\it}`: đặt kiểu phông chữ cho các khóa loại, ở đây là chữ nghiêng nhưng có thể dùng các [kiểu và cỡ phông chữ](/latex/vi/phong-chu/01-font-sizes-families-and-styles.md)
* `\avmvalfont{\it}`: đặt kiểu phông chữ cho các giá trị trong AVM, ở đây là chữ nghiêng.
* `\asort{*key*}`: in loại `*key*`.

Cũng có thể chồng nhãn loại lên cột trước đó, như minh họa trong ví dụ tiếp theo:

```latex
\avmvalfont{\it}
\avmsortfont{\it}
\begin{avm}
    \sort{indexed-obj}{\[ index & \osort{index}{\[
          variable & \@1 \osort{variable}{\[  per & 3rd \\
                                              num & sing \\
                                              gend & neut \]} \\
          restriction & \osort{psoa}{\[relation & book \\
                                       instance & \@1 \]} \]} \]}
\end{avm}
```

Ví dụ này tạo ra kết quả sau:

![Một ma trận giá trị thuộc tính được dàn trang trên Overleaf bằng LaTeX](/files/82f1b6261859219a029375af270eddabec79203b)

\* Để khám phá AVM, hãy mở dự án Overleaf này. [Overleaf.](https://www.overleaf.com/project/new/template/26428?id=113292459\&templateName=Example+project+demonstrating+attribute+value+matrices\&latexEngine=pdflatex\&texImage=texlive-full%3A2022.1\&mainFile=)

Có hai lệnh mới:

* `\sort{*label*}`: in `*label*`, chiếm không gian ở cột nơi nó xuất hiện.
* `\osort{*label*}`: chồng lên *label* mà không kiểm tra va chạm hay không gian sẵn có.

## Hướng dẫn tham khảo

Các dấu ngoặc có sẵn trong **gói avm** gói.

| Lệnh    | Kết quả                                                             |
| ------- | ------------------------------------------------------------------- |
| `\{ \}` | ![AVMbraces.png](/files/abf033419378af7457bcb0dc8f5627df797ef1d1)   |
| `\[ \]` | ![AVMbrackets.png](/files/5219c93efdfe1fcc3849186252c8c436f777be6e) |
| `\< \>` | ![AVMchevrons.png](/files/c59b3f280f15cfddf88382cf5738b23271087194) |

## Đọc thêm

Để biết thêm thông tin, xem

* [Tính năng **gói avm** tài liệu gói](http://nlp.stanford.edu/manning/tex/avm-doc.pdf)
* [Tính năng **avm.sty** mã nguồn](http://nlp.stanford.edu/manning/tex/avm.sty)
* [Kích thước phông chữ, họ phông và kiểu chữ](/latex/vi/phong-chu/01-font-sizes-families-and-styles.md)
* [Kiểu chữ](/latex/vi/phong-chu/02-font-typefaces.md)
* [Bảng](/latex/vi/hinh-va-bang/01-tables.md)
* [Dấu ngoặc và ngoặc tròn](/latex/vi/toan-hoc/03-brackets-and-parentheses.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/vi/theo-linh-vuc/10-attribute-value-matrices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
