{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/vi/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Xác định đoạn văn bằng dữ liệu vị trí","projectTitle":"Tisane Developer Documentation","description":"Tisane is an NLP platform, used for content moderation & more.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"xác-định-đoạn-văn-bằng-dữ-liệu-vị-trí","__idx":0},"children":["Xác định đoạn văn bằng dữ liệu vị trí"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tisane cung cấp dữ liệu vị trí có cấu trúc nhằm giúp xác định chính xác các đoạn văn bản bị gắn cờ."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ba thuộc tính vị trí chính là:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentence_index"]}," : Chỉ số câu, đánh số từ 0, chứa đoạn văn bản."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]},": Vị trí bắt đầu, tính từ 0, của ký tự đầu tiên trong đoạn văn bản trong phạm vi câu."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["length"]}," : Số ký tự của đoạn văn bản."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cách-để-lấy-chuỗi","__idx":1},"children":["Cách để lấy chuỗi"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Xác định văn bản câu chứa đoạn văn bản:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Truy cập vào nút ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentence_list"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chọn nút có ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentence_index"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Hoặc có thể lấy trực tiếp câu đó từ mảng danh sách câu."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Lấy chuỗi con:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sử dụng giá trị ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," và ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["length"]}," để lấy ra chuỗi con từ câu đã chọn."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"vì-sao-dùng-vị-trí-tương-đối-thay-vì-vị-trí-tuyệt-đối","__idx":2},"children":["Vì sao dùng vị trí tương đối thay vì vị trí tuyệt đối?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Chúng tôi sử dụng chỉ mục theo câu thay vì vị trí ký tự tuyệt đối vì phần lớn người dùng cần lấy cả câu chứa đoạn bị gắn cờ để hiểu được ngữ cảnh."]}]},"headings":[{"value":"Xác định đoạn văn bằng dữ liệu vị trí","id":"xác-định-đoạn-văn-bằng-dữ-liệu-vị-trí","depth":1},{"value":"Cách để lấy chuỗi","id":"cách-để-lấy-chuỗi","depth":2},{"value":"Vì sao dùng vị trí tương đối thay vì vị trí tuyệt đối?","id":"vì-sao-dùng-vị-trí-tương-đối-thay-vì-vị-trí-tuyệt-đối","depth":2}],"frontmatter":{"seo":{"title":"Xác định đoạn văn bằng dữ liệu vị trí"}},"lastModified":"2025-06-30T05:16:22.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/vi/guides/how-tos/locateasnippet","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}