import{S as FE,i as GE,s as UE,e as h,k as o,w as u,t as a,M as JE,c,d as e,m as p,a as l,x as m,h as s,b as g,f as RE,G as n,g as r,y as f,q as v,o as _,B as b,v as KE}from"../../chunks/vendor-hf-doc-builder.js";import{T as ue}from"../../chunks/Tip-hf-doc-builder.js";import{Y as e$}from"../../chunks/Youtube-hf-doc-builder.js";import{I as Ja}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as $}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as YE}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function XE(V){let d,q,k,w,D,y,j,C;return{c(){d=h("p"),q=a("\u270F\uFE0F "),k=h("strong"),w=a("Th\u1EED nghi\u1EC7m th\xF4i!"),D=a(" S\u1EED d\u1EE5ng h\xE0m "),y=h("code"),j=a("Dataset.unique()"),C=a(" \u0111\u1EC3 t\xECm s\u1ED1 l\u01B0\u1EE3ng thu\u1ED1c \u0111\u1ED9c nh\u1EA5t v\xE0 \u0111i\u1EC1u ki\u1EC7n trong t\u1EADp hu\u1EA5n luy\u1EC7n v\xE0 ki\u1EC3m th\u1EED.")},l(E){d=c(E,"P",{});var x=l(d);q=s(x,"\u270F\uFE0F "),k=c(x,"STRONG",{});var P=l(k);w=s(P,"Th\u1EED nghi\u1EC7m th\xF4i!"),P.forEach(e),D=s(x," S\u1EED d\u1EE5ng h\xE0m "),y=c(x,"CODE",{});var T=l(y);j=s(T,"Dataset.unique()"),T.forEach(e),C=s(x," \u0111\u1EC3 t\xECm s\u1ED1 l\u01B0\u1EE3ng thu\u1ED1c \u0111\u1ED9c nh\u1EA5t v\xE0 \u0111i\u1EC1u ki\u1EC7n trong t\u1EADp hu\u1EA5n luy\u1EC7n v\xE0 ki\u1EC3m th\u1EED."),x.forEach(e)},m(E,x){r(E,d,x),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C)},d(E){E&&e(d)}}}function WE(V){let d,q,k,w,D,y,j,C;return{c(){d=h("p"),q=a("\u{1F64B} M\u1ED9t c\xE1ch thay th\u1EBF \u0111\u1EC3 th\xEAm c\xE1c c\u1ED9t m\u1EDBi v\xE0o t\u1EADp d\u1EEF li\u1EC7u l\xE0 s\u1EED d\u1EE5ng h\xE0m "),k=h("code"),w=a("Dataset.add_column()"),D=a(". \u0110i\u1EC1u n\xE0y cho ph\xE9p b\u1EA1n cung c\u1EA5p c\u1ED9t d\u01B0\u1EDBi d\u1EA1ng danh s\xE1ch Python ho\u1EB7c m\u1EA3ng NumPy v\xE0 c\xF3 th\u1EC3 h\u1EEFu \xEDch trong c\xE1c tr\u01B0\u1EDDng h\u1EE3p m\xE0 "),y=h("code"),j=a("Dataset.map()"),C=a(" kh\xF4ng ph\xF9 h\u1EE3p cho ph\xE2n t\xEDch c\u1EE7a b\u1EA1n.")},l(E){d=c(E,"P",{});var x=l(d);q=s(x,"\u{1F64B} M\u1ED9t c\xE1ch thay th\u1EBF \u0111\u1EC3 th\xEAm c\xE1c c\u1ED9t m\u1EDBi v\xE0o t\u1EADp d\u1EEF li\u1EC7u l\xE0 s\u1EED d\u1EE5ng h\xE0m "),k=c(x,"CODE",{});var P=l(k);w=s(P,"Dataset.add_column()"),P.forEach(e),D=s(x,". \u0110i\u1EC1u n\xE0y cho ph\xE9p b\u1EA1n cung c\u1EA5p c\u1ED9t d\u01B0\u1EDBi d\u1EA1ng danh s\xE1ch Python ho\u1EB7c m\u1EA3ng NumPy v\xE0 c\xF3 th\u1EC3 h\u1EEFu \xEDch trong c\xE1c tr\u01B0\u1EDDng h\u1EE3p m\xE0 "),y=c(x,"CODE",{});var T=l(y);j=s(T,"Dataset.map()"),T.forEach(e),C=s(x," kh\xF4ng ph\xF9 h\u1EE3p cho ph\xE2n t\xEDch c\u1EE7a b\u1EA1n."),x.forEach(e)},m(E,x){r(E,d,x),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C)},d(E){E&&e(d)}}}function QE(V){let d,q,k,w,D,y,j,C,E,x,P;return{c(){d=h("p"),q=a("\u270F\uFE0F "),k=h("strong"),w=a("Th\u1EED nghi\u1EC7m th\xF4i!"),D=a(" S\u1EED d\u1EE5ng h\xE0m "),y=h("code"),j=a("Dataset.sort()"),C=a(" \u0111\u1EC3 ki\u1EC3m tra c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 s\u1ED1 l\u01B0\u1EE3ng t\u1EEB l\u1EDBn nh\u1EA5t. Tham kh\u1EA3o "),E=h("a"),x=a("t\xE0i li\u1EC7u"),P=a(" \u0111\u1EC3 bi\u1EBFt b\u1EA1n c\u1EA7n s\u1EED d\u1EE5ng tham s\u1ED1 n\xE0o \u0111\u1EC3 s\u1EAFp x\u1EBFp c\xE1c b\xE0i \u0111\xE1nh gi\xE1 theo th\u1EE9 t\u1EF1 gi\u1EA3m d\u1EA7n."),this.h()},l(T){d=c(T,"P",{});var O=l(d);q=s(O,"\u270F\uFE0F "),k=c(O,"STRONG",{});var J=l(k);w=s(J,"Th\u1EED nghi\u1EC7m th\xF4i!"),J.forEach(e),D=s(O," S\u1EED d\u1EE5ng h\xE0m "),y=c(O,"CODE",{});var A=l(y);j=s(A,"Dataset.sort()"),A.forEach(e),C=s(O," \u0111\u1EC3 ki\u1EC3m tra c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 s\u1ED1 l\u01B0\u1EE3ng t\u1EEB l\u1EDBn nh\u1EA5t. Tham kh\u1EA3o "),E=c(O,"A",{href:!0,rel:!0});var z=l(E);x=s(z,"t\xE0i li\u1EC7u"),z.forEach(e),P=s(O," \u0111\u1EC3 bi\u1EBFt b\u1EA1n c\u1EA7n s\u1EED d\u1EE5ng tham s\u1ED1 n\xE0o \u0111\u1EC3 s\u1EAFp x\u1EBFp c\xE1c b\xE0i \u0111\xE1nh gi\xE1 theo th\u1EE9 t\u1EF1 gi\u1EA3m d\u1EA7n."),O.forEach(e),this.h()},h(){g(E,"href","https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.sort"),g(E,"rel","nofollow")},m(T,O){r(T,d,O),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C),n(d,E),n(E,x),n(d,P)},d(T){T&&e(d)}}}function ZE(V){let d,q,k,w,D,y,j,C,E,x,P,T,O,J;return{c(){d=h("p"),q=a("\u270F\uFE0F "),k=h("strong"),w=a("Th\u1EED nghi\u1EC7m th\xF4i!"),D=a(" Th\u1EF1c hi\u1EC7n c\xF9ng m\u1ED9t h\u01B0\u1EDBng d\u1EABn c\xF3 v\xE0 kh\xF4ng c\xF3 "),y=h("code"),j=a("batched=True"),C=a(", sau \u0111\xF3 th\u1EED n\xF3 v\u1EDBi tokenizer ch\u1EADm (th\xEAm "),E=h("code"),x=a("use_fast=False"),P=a(" v\xE0o "),T=h("code"),O=a("AutoTokenizer.from_pretrained()"),J=a(") \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y gi\xE1 tr\u1ECB b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c tr\xEAn ph\u1EA7n c\u1EE9ng c\u1EE7a m\xECnh.")},l(A){d=c(A,"P",{});var z=l(d);q=s(z,"\u270F\uFE0F "),k=c(z,"STRONG",{});var vt=l(k);w=s(vt,"Th\u1EED nghi\u1EC7m th\xF4i!"),vt.forEach(e),D=s(z," Th\u1EF1c hi\u1EC7n c\xF9ng m\u1ED9t h\u01B0\u1EDBng d\u1EABn c\xF3 v\xE0 kh\xF4ng c\xF3 "),y=c(z,"CODE",{});var B=l(y);j=s(B,"batched=True"),B.forEach(e),C=s(z,", sau \u0111\xF3 th\u1EED n\xF3 v\u1EDBi tokenizer ch\u1EADm (th\xEAm "),E=c(z,"CODE",{});var X=l(E);x=s(X,"use_fast=False"),X.forEach(e),P=s(z," v\xE0o "),T=c(z,"CODE",{});var st=l(T);O=s(st,"AutoTokenizer.from_pretrained()"),st.forEach(e),J=s(z,") \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y gi\xE1 tr\u1ECB b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c tr\xEAn ph\u1EA7n c\u1EE9ng c\u1EE7a m\xECnh."),z.forEach(e)},m(A,z){r(A,d,z),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C),n(d,E),n(E,x),n(d,P),n(d,T),n(T,O),n(d,J)},d(A){A&&e(d)}}}function tx(V){let d,q,k,w,D;return{c(){d=h("p"),q=a("S\u1EED d\u1EE5ng "),k=h("code"),w=a("num_proc"),D=a(" \u0111\u1EC3 t\u0103ng t\u1ED1c qu\xE1 tr\xECnh x\u1EED l\xFD c\u1EE7a b\u1EA1n th\u01B0\u1EDDng l\xE0 m\u1ED9t \xFD t\u01B0\u1EDFng tuy\u1EC7t v\u1EDDi, mi\u1EC5n l\xE0 h\xE0m b\u1EA1n \u0111ang s\u1EED d\u1EE5ng ch\u01B0a th\u1EF1c hi\u1EC7n m\u1ED9t s\u1ED1 ki\u1EC3u x\u1EED l\xFD \u0111a x\u1EED l\xFD c\u1EE7a ri\xEAng n\xF3.")},l(y){d=c(y,"P",{});var j=l(d);q=s(j,"S\u1EED d\u1EE5ng "),k=c(j,"CODE",{});var C=l(k);w=s(C,"num_proc"),C.forEach(e),D=s(j," \u0111\u1EC3 t\u0103ng t\u1ED1c qu\xE1 tr\xECnh x\u1EED l\xFD c\u1EE7a b\u1EA1n th\u01B0\u1EDDng l\xE0 m\u1ED9t \xFD t\u01B0\u1EDFng tuy\u1EC7t v\u1EDDi, mi\u1EC5n l\xE0 h\xE0m b\u1EA1n \u0111ang s\u1EED d\u1EE5ng ch\u01B0a th\u1EF1c hi\u1EC7n m\u1ED9t s\u1ED1 ki\u1EC3u x\u1EED l\xFD \u0111a x\u1EED l\xFD c\u1EE7a ri\xEAng n\xF3."),j.forEach(e)},m(y,j){r(y,d,j),n(d,q),n(d,k),n(k,w),n(d,D)},d(y){y&&e(d)}}}function nx(V){let d,q,k,w,D,y,j,C,E,x,P;return{c(){d=h("p"),q=a("\u{1F4A1} Trong h\u1ECDc m\xE1y, m\u1ED9t "),k=h("em"),w=a("m\u1EABu"),D=a(" th\u01B0\u1EDDng \u0111\u01B0\u1EE3c \u0111\u1ECBnh ngh\u0129a l\xE0 t\u1EADp h\u1EE3p "),y=h("em"),j=a("\u0111\u1EB7c tr\u01B0ng"),C=a(" m\xE0 ch\xFAng ta cung c\u1EA5p cho m\xF4 h\xECnh. Trong m\u1ED9t s\u1ED1 ng\u1EEF c\u1EA3nh, c\xE1c \u0111\u1EB7c tr\u01B0ng n\xE0y s\u1EBD l\xE0 t\u1EADp h\u1EE3p th\xE0nh c\xE1c c\u1ED9t trong "),E=h("code"),x=a("Dataset"),P=a(", nh\u01B0ng trong c\xE1c tr\u01B0\u1EDDng h\u1EE3p kh\xE1c (nh\u01B0 \u1EDF \u0111\xE2y v\xE0 \u0111\u1EC3 ph\u1EE5c v\u1EE5 h\u1ECFi \u0111\xE1p), nhi\u1EC1u \u0111\u1EB7c tr\u01B0ng c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c tr\xEDch xu\u1EA5t t\u1EEB m\u1ED9t m\u1EABu v\xE0 thu\u1ED9c v\u1EC1 m\u1ED9t c\u1ED9t duy nh\u1EA5t.")},l(T){d=c(T,"P",{});var O=l(d);q=s(O,"\u{1F4A1} Trong h\u1ECDc m\xE1y, m\u1ED9t "),k=c(O,"EM",{});var J=l(k);w=s(J,"m\u1EABu"),J.forEach(e),D=s(O," th\u01B0\u1EDDng \u0111\u01B0\u1EE3c \u0111\u1ECBnh ngh\u0129a l\xE0 t\u1EADp h\u1EE3p "),y=c(O,"EM",{});var A=l(y);j=s(A,"\u0111\u1EB7c tr\u01B0ng"),A.forEach(e),C=s(O," m\xE0 ch\xFAng ta cung c\u1EA5p cho m\xF4 h\xECnh. Trong m\u1ED9t s\u1ED1 ng\u1EEF c\u1EA3nh, c\xE1c \u0111\u1EB7c tr\u01B0ng n\xE0y s\u1EBD l\xE0 t\u1EADp h\u1EE3p th\xE0nh c\xE1c c\u1ED9t trong "),E=c(O,"CODE",{});var z=l(E);x=s(z,"Dataset"),z.forEach(e),P=s(O,", nh\u01B0ng trong c\xE1c tr\u01B0\u1EDDng h\u1EE3p kh\xE1c (nh\u01B0 \u1EDF \u0111\xE2y v\xE0 \u0111\u1EC3 ph\u1EE5c v\u1EE5 h\u1ECFi \u0111\xE1p), nhi\u1EC1u \u0111\u1EB7c tr\u01B0ng c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c tr\xEDch xu\u1EA5t t\u1EEB m\u1ED9t m\u1EABu v\xE0 thu\u1ED9c v\u1EC1 m\u1ED9t c\u1ED9t duy nh\u1EA5t."),O.forEach(e)},m(T,O){r(T,d,O),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C),n(d,E),n(E,x),n(d,P)},d(T){T&&e(d)}}}function ex(V){let d,q,k,w,D,y,j,C,E,x,P,T,O,J,A,z,vt,B,X,st,et,me,Kt,Yt,kn,L;return{c(){d=h("p"),q=a("\u{1F6A8} B\xEAn d\u01B0\u1EDBi "),k=h("code"),w=a("Dataset.set_format()"),D=a(" thay \u0111\u1ED5i \u0111\u1ECBnh d\u1EA1ng tr\u1EA3 v\u1EC1 cho ph\u01B0\u01A1ng th\u1EE9c "),y=h("code"),j=a("__getitem __()"),C=a(" c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u. \u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 khi ch\xFAng ta mu\u1ED1n t\u1EA1o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng m\u1EDBi nh\u01B0 "),E=h("code"),x=a("train_df"),P=a(" t\u1EEB "),T=h("code"),O=a("Dataset"),J=a(" \u1EDF \u0111\u1ECBnh d\u1EA1ng "),A=h("code"),z=a('"pandas"'),vt=a(", ch\xFAng ta c\u1EA7n c\u1EAFt to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c m\u1ED9t "),B=h("code"),X=a("pandas.DataFrame"),st=a(". B\u1EA1n c\xF3 th\u1EC3 t\u1EF1 x\xE1c minh xem ki\u1EC3u d\u1EEF li\u1EC7u c\u1EE7a "),et=h("code"),me=a('drug_dataset["train"]'),Kt=a(" c\xF3 ph\u1EA3i l\xE0 "),Yt=h("code"),kn=a("Dataset"),L=a(", b\u1EA5t k\u1EC3 \u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra l\xE0 g\xEC.")},l(Xt){d=c(Xt,"P",{});var N=l(d);q=s(N,"\u{1F6A8} B\xEAn d\u01B0\u1EDBi "),k=c(N,"CODE",{});var Ka=l(k);w=s(Ka,"Dataset.set_format()"),Ka.forEach(e),D=s(N," thay \u0111\u1ED5i \u0111\u1ECBnh d\u1EA1ng tr\u1EA3 v\u1EC1 cho ph\u01B0\u01A1ng th\u1EE9c "),y=c(N,"CODE",{});var Ya=l(y);j=s(Ya,"__getitem __()"),Ya.forEach(e),C=s(N," c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u. \u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 khi ch\xFAng ta mu\u1ED1n t\u1EA1o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng m\u1EDBi nh\u01B0 "),E=c(N,"CODE",{});var yn=l(E);x=s(yn,"train_df"),yn.forEach(e),P=s(N," t\u1EEB "),T=c(N,"CODE",{});var Xa=l(T);O=s(Xa,"Dataset"),Xa.forEach(e),J=s(N," \u1EDF \u0111\u1ECBnh d\u1EA1ng "),A=c(N,"CODE",{});var Wa=l(A);z=s(Wa,'"pandas"'),Wa.forEach(e),vt=s(N,", ch\xFAng ta c\u1EA7n c\u1EAFt to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c m\u1ED9t "),B=c(N,"CODE",{});var En=l(B);X=s(En,"pandas.DataFrame"),En.forEach(e),st=s(N,". B\u1EA1n c\xF3 th\u1EC3 t\u1EF1 x\xE1c minh xem ki\u1EC3u d\u1EEF li\u1EC7u c\u1EE7a "),et=c(N,"CODE",{});var Qa=l(et);me=s(Qa,'drug_dataset["train"]'),Qa.forEach(e),Kt=s(N," c\xF3 ph\u1EA3i l\xE0 "),Yt=c(N,"CODE",{});var Za=l(Yt);kn=s(Za,"Dataset"),Za.forEach(e),L=s(N,", b\u1EA5t k\u1EC3 \u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra l\xE0 g\xEC."),N.forEach(e)},m(Xt,N){r(Xt,d,N),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C),n(d,E),n(E,x),n(d,P),n(d,T),n(T,O),n(d,J),n(d,A),n(A,z),n(d,vt),n(d,B),n(B,X),n(d,st),n(d,et),n(et,me),n(d,Kt),n(d,Yt),n(Yt,kn),n(d,L)},d(Xt){Xt&&e(d)}}}function ax(V){let d,q,k,w,D,y,j,C;return{c(){d=h("p"),q=a("\u270F\uFE0F "),k=h("strong"),w=a("Th\u1EED nghi\u1EC7m th\xF4i!"),D=a(" T\xEDnh x\u1EBFp h\u1EA1ng trung b\xECnh cho m\u1ED7i lo\u1EA1i thu\u1ED1c v\xE0 l\u01B0u tr\u1EEF k\u1EBFt qu\u1EA3 \u1EDF d\u1EA1ng "),y=h("code"),j=a("Dataset"),C=a(" m\u1EDBi.")},l(E){d=c(E,"P",{});var x=l(d);q=s(x,"\u270F\uFE0F "),k=c(x,"STRONG",{});var P=l(k);w=s(P,"Th\u1EED nghi\u1EC7m th\xF4i!"),P.forEach(e),D=s(x," T\xEDnh x\u1EBFp h\u1EA1ng trung b\xECnh cho m\u1ED7i lo\u1EA1i thu\u1ED1c v\xE0 l\u01B0u tr\u1EEF k\u1EBFt qu\u1EA3 \u1EDF d\u1EA1ng "),y=c(x,"CODE",{});var T=l(y);j=s(T,"Dataset"),T.forEach(e),C=s(x," m\u1EDBi."),x.forEach(e)},m(E,x){r(E,d,x),n(d,q),n(d,k),n(k,w),n(d,D),n(d,y),n(y,j),n(d,C)},d(E){E&&e(d)}}}function sx(V){let d,q,k,w,D,y,j,C,E,x,P,T,O,J,A,z,vt,B,X,st,et,me,Kt,Yt,kn,L,Xt,N,Ka,Ya,yn,Xa,Wa,En,Qa,Za,ts,Rd,Fd,mr,$t,Gd,fe,Ud,Jd,ve,Kd,Yd,fr,kt,Xd,Lh,Wd,Qd,Rh,Zd,tg,vr,_e,_r,ht,ng,Fh,eg,ag,Gh,sg,hg,Uh,cg,lg,br,be,$r,yt,ig,Jh,rg,og,Kh,pg,dg,kr,$e,yr,ke,Er,ct,gg,Yh,ug,mg,Xh,fg,vg,Wh,_g,bg,xr,Et,ye,$g,Qh,kg,yg,Eg,Ee,xg,Zh,wg,jg,Dg,Wt,Tg,tc,qg,Cg,nc,Og,Pg,wr,xt,zg,ec,Ng,Ag,ac,Hg,Sg,jr,xe,Dr,wt,Ig,sc,Mg,Vg,hc,Bg,Lg,Tr,we,qr,je,Cr,xn,Or,W,Rg,cc,Fg,Gg,lc,Ug,Jg,ns,Kg,Yg,ic,Xg,Wg,Pr,De,zr,Te,Nr,Q,Qg,rc,Zg,tu,oc,nu,eu,pc,au,su,dc,hu,cu,Ar,qe,Hr,jt,lu,gc,iu,ru,uc,ou,pu,Sr,Ce,Ir,Z,du,mc,gu,uu,Oe,mu,fu,fc,vu,_u,vc,bu,$u,Mr,Pe,Vr,es,ku,Br,ze,Lr,Ne,Rr,as,yu,Fr,Ae,Gr,He,Ur,Dt,Eu,Se,xu,wu,_c,ju,Du,Jr,Ie,Kr,Tt,Tu,bc,qu,Cu,$c,Ou,Pu,Yr,Me,Xr,Ve,Wr,ss,zu,Qr,Qt,wn,kc,Be,Nu,yc,Au,Zr,hs,Hu,to,cs,Su,no,Le,eo,K,Iu,Ec,Mu,Vu,xc,Bu,Lu,wc,Ru,Fu,jc,Gu,Uu,Dc,Ju,Ku,ao,Re,so,Fe,ho,qt,Yu,Tc,Xu,Wu,qc,Qu,Zu,co,Ge,lo,Ue,io,ls,tm,ro,jn,oo,Ct,nm,Cc,em,am,Oc,sm,hm,po,Je,go,Ke,uo,is,cm,mo,Dn,fo,Tn,lm,Pc,im,rm,vo,Ye,_o,Xe,bo,qn,om,zc,pm,dm,$o,We,ko,Cn,gm,Nc,um,mm,yo,Zt,On,Ac,Qe,fm,rs,vm,Hc,_m,Eo,lt,bm,Sc,$m,km,Ic,ym,Em,Mc,xm,wm,xo,tt,jm,Vc,Dm,Tm,Bc,qm,Cm,Lc,Om,Pm,Rc,zm,Nm,wo,Ze,jo,Ot,Am,Fc,Hm,Sm,Gc,Im,Mm,Do,it,Vm,Uc,Bm,Lm,Jc,Rm,Fm,os,Gm,Um,To,ta,qo,rt,Jm,ps,Km,Ym,Kc,Xm,Wm,Yc,Qm,Zm,Co,na,Oo,Pn,tf,Xc,nf,ef,Po,zn,zo,ds,af,No,Nn,Wc,tn,gs,sf,hf,us,cf,lf,ms,rf,of,ea,nn,fs,Qc,pf,df,vs,gf,uf,_s,mf,ff,en,bs,Zc,vf,_f,$s,bf,$f,ks,kf,Ao,Pt,yf,tl,Ef,xf,nl,wf,jf,Ho,ys,Df,So,_t,el,Tf,qf,al,Cf,Of,sl,Pf,zf,Io,aa,Mo,Es,Nf,Vo,An,hl,an,xs,Af,Hf,ws,Sf,If,js,Mf,Vf,bt,sn,Ds,cl,Bf,Lf,Ts,Rf,Ff,qs,Gf,Uf,hn,Cs,ll,Jf,Kf,Os,Yf,Xf,Ps,Wf,Qf,cn,Hn,il,Zf,tv,rl,nv,ev,zs,av,sv,Ns,hv,cv,ln,Sn,ol,lv,iv,pl,rv,ov,As,pv,dv,Hs,gv,Bo,ot,uv,dl,mv,fv,gl,vv,_v,ul,bv,$v,Lo,In,Ro,pt,kv,ml,yv,Ev,fl,xv,wv,Ss,jv,Dv,Fo,Mn,Go,zt,Tv,vl,qv,Cv,_l,Ov,Pv,Uo,sa,Jo,Vn,zv,bl,Nv,Av,Ko,ha,Yo,ca,Xo,Is,Hv,Wo,la,Qo,ia,Zo,Nt,Sv,ra,Iv,Mv,$l,Vv,Bv,tp,nt,Lv,kl,Rv,Fv,yl,Gv,Uv,El,Jv,Kv,xl,Yv,Xv,np,oa,ep,Ms,Wv,ap,pa,sp,da,hp,At,Qv,wl,Zv,t_,jl,n_,e_,cp,ga,lp,Bn,a_,Dl,s_,h_,ip,ua,rp,ma,op,Vs,c_,pp,Ln,l_,Tl,i_,r_,dp,rn,Rn,ql,fa,o_,on,p_,Cl,d_,g_,Ol,u_,m_,gp,va,up,dt,f_,Pl,v_,__,zl,b_,$_,Nl,k_,y_,mp,_a,fp,Fn,E_,Al,x_,w_,vp,ba,_p,Ht,Hl,H,bp,j_,Sl,D_,T_,Il,q_,C_,Ml,O_,P_,Vl,z_,N_,Bl,A_,H_,Ll,S_,I_,Rl,M_,V_,Fl,B_,L_,pn,S,Gl,R_,F_,Ul,G_,U_,Jl,J_,K_,Kl,Y_,X_,Yl,W_,Q_,Xl,Z_,t2,Wl,n2,e2,Ql,a2,s2,Zl,h2,c2,I,ti,l2,i2,ni,r2,o2,ei,p2,d2,ai,g2,u2,si,m2,f2,hi,v2,_2,ci,b2,$2,li,k2,y2,ii,E2,x2,M,ri,w2,j2,oi,D2,T2,pi,q2,C2,di,O2,P2,gi,z2,N2,ui,A2,H2,mi,S2,I2,fi,M2,V2,vi,B2,$p,St,L2,_i,R2,F2,bi,G2,U2,kp,$a,yp,Gn,Ep,Un,J2,$i,K2,Y2,xp,ka,wp,It,ki,Mt,jp,X2,yi,W2,Q2,Ei,Z2,tb,at,dn,xi,nb,eb,wi,ab,sb,ji,hb,cb,gn,Di,lb,ib,Ti,rb,ob,qi,pb,db,un,Ci,gb,ub,Oi,mb,fb,Pi,vb,_b,mn,zi,bb,$b,Ni,kb,yb,Ai,Eb,xb,fn,Hi,wb,jb,Si,Db,Tb,Ii,qb,Dp,Vt,Cb,Mi,Ob,Pb,Vi,zb,Nb,Tp,ya,qp,Ea,Cp,Jn,Op,gt,Ab,Bi,Hb,Sb,Li,Ib,Mb,Ri,Vb,Bb,Pp,xa,zp,vn,Kn,Fi,wa,Lb,Gi,Rb,Np,Bs,Fb,Ap,Y,Gb,Ui,Ub,Jb,Ji,Kb,Yb,Ki,Xb,Wb,Yi,Qb,Zb,Xi,t1,n1,Hp,ja,Sp,Da,Ip,Yn,e1,Ls,a1,s1,Mp,_n,Xn,Wi,Ta,h1,Qi,c1,Vp,qa,Bp,Rs,l1,Lp,Wn,Zi,Ca,Fs,i1,r1,Gs,o1,p1,bn,Oa,Us,d1,g1,Js,tr,u1,m1,Pa,Ks,f1,v1,Ys,nr,_1,b1,za,Xs,$1,k1,Ws,er,y1,Rp,Qs,E1,Fp,Na,Gp,Zs,x1,Up,Aa,Jp,ut,w1,ar,j1,D1,sr,T1,q1,hr,C1,O1,Kp,Qn,P1,cr,z1,N1,Yp,Ha,Xp,Sa,Wp,Zn,A1,lr,H1,S1,Qp,Ia,Zp,te,I1,Ma,M1,V1,td,Va,nd,Ba,ed,ne,B1,th,L1,R1,ad,La,sd,nh,F1,hd,ee,Ra,G1,eh,U1,J1,K1,$n,Y1,ir,X1,W1,ah,Q1,Z1,cd,sh,t$,ld;return y=new Ja({}),P=new YE({props:{chapter:5,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/vi/chapter5/section3.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/vi/chapter5/section3.ipynb"}]}}),z=new e$({props:{id:"tqfSFcPMgOI"}}),et=new Ja({}),_e=new $({props:{code:`!wget "https://archive.ics.uci.edu/ml/machine-learning-databases/00462/drugsCom_raw.zip"
!unzip drugsCom_raw.zip`,highlighted:`!wget <span class="hljs-string">&quot;https://archive.ics.uci.edu/ml/machine-learning-databases/00462/drugsCom_raw.zip&quot;</span>
!unzip drugsCom_raw.<span class="hljs-built_in">zip</span>`}}),be=new $({props:{code:`from datasets import load_dataset

data_files = {"train": "drugsComTrain_raw.tsv", "test": "drugsComTest_raw.tsv"}
# \\t is the tab character in Python
drug_dataset = load_dataset("csv", data_files=data_files, delimiter="\\t")`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

data_files = {<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;drugsComTrain_raw.tsv&quot;</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;drugsComTest_raw.tsv&quot;</span>}
<span class="hljs-comment"># \\t is the tab character in Python</span>
drug_dataset = load_dataset(<span class="hljs-string">&quot;csv&quot;</span>, data_files=data_files, delimiter=<span class="hljs-string">&quot;\\t&quot;</span>)`}}),$e=new $({props:{code:`drug_sample = drug_dataset["train"].shuffle(seed=42).select(range(1000))
# Xem qua m\u1ED9t s\u1ED1 v\xED d\u1EE5 \u0111\u1EA7u ti\xEAn
drug_sample[:3]`,highlighted:`drug_sample = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].shuffle(seed=<span class="hljs-number">42</span>).select(<span class="hljs-built_in">range</span>(<span class="hljs-number">1000</span>))
<span class="hljs-comment"># Xem qua m\u1ED9t s\u1ED1 v\xED d\u1EE5 \u0111\u1EA7u ti\xEAn</span>
drug_sample[:<span class="hljs-number">3</span>]`}}),ke=new $({props:{code:`{'Unnamed: 0': [87571, 178045, 80482],
 'drugName': ['Naproxen', 'Duloxetine', 'Mobic'],
 'condition': ['Gout, Acute', 'ibromyalgia', 'Inflammatory Conditions'],
 'review': ['"like the previous person mention, I&#039;m a strong believer of aleve, it works faster for my gout than the prescription meds I take. No more going to the doctor for refills.....Aleve works!"',
  '"I have taken Cymbalta for about a year and a half for fibromyalgia pain. It is great\\r\\nas a pain reducer and an anti-depressant, however, the side effects outweighed \\r\\nany benefit I got from it. I had trouble with restlessness, being tired constantly,\\r\\ndizziness, dry mouth, numbness and tingling in my feet, and horrible sweating. I am\\r\\nbeing weaned off of it now. Went from 60 mg to 30mg and now to 15 mg. I will be\\r\\noff completely in about a week. The fibro pain is coming back, but I would rather deal with it than the side effects."',
  '"I have been taking Mobic for over a year with no side effects other than an elevated blood pressure.  I had severe knee and ankle pain which completely went away after taking Mobic.  I attempted to stop the medication however pain returned after a few days."'],
 'rating': [9.0, 3.0, 10.0],
 'date': ['September 2, 2015', 'November 7, 2011', 'June 5, 2013'],
 'usefulCount': [36, 13, 128]}`,highlighted:`{<span class="hljs-string">&#x27;Unnamed: 0&#x27;</span>: [<span class="hljs-number">87571</span>, <span class="hljs-number">178045</span>, <span class="hljs-number">80482</span>],
 <span class="hljs-string">&#x27;drugName&#x27;</span>: [<span class="hljs-string">&#x27;Naproxen&#x27;</span>, <span class="hljs-string">&#x27;Duloxetine&#x27;</span>, <span class="hljs-string">&#x27;Mobic&#x27;</span>],
 <span class="hljs-string">&#x27;condition&#x27;</span>: [<span class="hljs-string">&#x27;Gout, Acute&#x27;</span>, <span class="hljs-string">&#x27;ibromyalgia&#x27;</span>, <span class="hljs-string">&#x27;Inflammatory Conditions&#x27;</span>],
 <span class="hljs-string">&#x27;review&#x27;</span>: [<span class="hljs-string">&#x27;&quot;like the previous person mention, I&amp;#039;m a strong believer of aleve, it works faster for my gout than the prescription meds I take. No more going to the doctor for refills.....Aleve works!&quot;&#x27;</span>,
  <span class="hljs-string">&#x27;&quot;I have taken Cymbalta for about a year and a half for fibromyalgia pain. It is great\\r\\nas a pain reducer and an anti-depressant, however, the side effects outweighed \\r\\nany benefit I got from it. I had trouble with restlessness, being tired constantly,\\r\\ndizziness, dry mouth, numbness and tingling in my feet, and horrible sweating. I am\\r\\nbeing weaned off of it now. Went from 60 mg to 30mg and now to 15 mg. I will be\\r\\noff completely in about a week. The fibro pain is coming back, but I would rather deal with it than the side effects.&quot;&#x27;</span>,
  <span class="hljs-string">&#x27;&quot;I have been taking Mobic for over a year with no side effects other than an elevated blood pressure.  I had severe knee and ankle pain which completely went away after taking Mobic.  I attempted to stop the medication however pain returned after a few days.&quot;&#x27;</span>],
 <span class="hljs-string">&#x27;rating&#x27;</span>: [<span class="hljs-number">9.0</span>, <span class="hljs-number">3.0</span>, <span class="hljs-number">10.0</span>],
 <span class="hljs-string">&#x27;date&#x27;</span>: [<span class="hljs-string">&#x27;September 2, 2015&#x27;</span>, <span class="hljs-string">&#x27;November 7, 2011&#x27;</span>, <span class="hljs-string">&#x27;June 5, 2013&#x27;</span>],
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: [<span class="hljs-number">36</span>, <span class="hljs-number">13</span>, <span class="hljs-number">128</span>]}`}}),xe=new $({props:{code:`for split in drug_dataset.keys():
    assert len(drug_dataset[split]) == len(drug_dataset[split].unique("Unnamed: 0"))`,highlighted:`<span class="hljs-keyword">for</span> split <span class="hljs-keyword">in</span> drug_dataset.keys():
    <span class="hljs-keyword">assert</span> <span class="hljs-built_in">len</span>(drug_dataset[split]) == <span class="hljs-built_in">len</span>(drug_dataset[split].unique(<span class="hljs-string">&quot;Unnamed: 0&quot;</span>))`}}),we=new $({props:{code:`drug_dataset = drug_dataset.rename_column(
    original_column_name="Unnamed: 0", new_column_name="patient_id"
)
drug_dataset`,highlighted:`drug_dataset = drug_dataset.rename_column(
    original_column_name=<span class="hljs-string">&quot;Unnamed: 0&quot;</span>, new_column_name=<span class="hljs-string">&quot;patient_id&quot;</span>
)
drug_dataset`}}),je=new $({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount'],
        num_rows: 161297
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount'],
        num_rows: 53766
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">161297</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">53766</span>
    })
})`}}),xn=new ue({props:{$$slots:{default:[XE]},$$scope:{ctx:V}}}),De=new $({props:{code:`def lowercase_condition(example):
    return {"condition": example["condition"].lower()}


drug_dataset.map(lowercase_condition)`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">lowercase_condition</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;condition&quot;</span>: example[<span class="hljs-string">&quot;condition&quot;</span>].lower()}


drug_dataset.<span class="hljs-built_in">map</span>(lowercase_condition)`}}),Te=new $({props:{code:"AttributeError: 'NoneType' object has no attribute 'lower'",highlighted:'AttributeError: <span class="hljs-string">&#x27;NoneType&#x27;</span> <span class="hljs-built_in">object</span> has no attribute <span class="hljs-string">&#x27;lower&#x27;</span>'}}),qe=new $({props:{code:`def filter_nones(x):
    return x["condition"] is not None`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">filter_nones</span>(<span class="hljs-params">x</span>):
    <span class="hljs-keyword">return</span> x[<span class="hljs-string">&quot;condition&quot;</span>] <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>`}}),Ce=new $({props:{code:"lambda <arguments> : <expression>",highlighted:'lambda <span class="hljs-tag">&lt;<span class="hljs-name">arguments</span>&gt;</span> : <span class="hljs-tag">&lt;<span class="hljs-name">expression</span>&gt;</span>'}}),Pe=new $({props:{code:"lambda x : x * x",highlighted:'lambda <span class="hljs-keyword">x</span> : <span class="hljs-keyword">x</span> * <span class="hljs-keyword">x</span>'}}),ze=new $({props:{code:"(lambda x: x * x)(3)",highlighted:'(<span class="hljs-keyword">lambda</span> x: x * x)(<span class="hljs-number">3</span>)'}}),Ne=new $({props:{code:"9",highlighted:'<span class="hljs-number">9</span>'}}),Ae=new $({props:{code:"(lambda base, height: 0.5 * base * height)(4, 8)",highlighted:'(<span class="hljs-keyword">lambda</span> base, height: <span class="hljs-number">0.5</span> * base * height)(<span class="hljs-number">4</span>, <span class="hljs-number">8</span>)'}}),He=new $({props:{code:"16.0",highlighted:'<span class="hljs-number">16.0</span>'}}),Ie=new $({props:{code:'drug_dataset = drug_dataset.filter(lambda x: x["condition"] is not None)',highlighted:'drug_dataset = drug_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;condition&quot;</span>] <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>)'}}),Me=new $({props:{code:`drug_dataset = drug_dataset.map(lowercase_condition)
# Ki\u1EC3m tra xem ch\u1EEF vi\u1EBFt th\u01B0\u1EDDng \u0111\xE3 ho\u1EA1t \u0111\u1ED9ng ch\u01B0a
drug_dataset["train"]["condition"][:3]`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(lowercase_condition)
<span class="hljs-comment"># Ki\u1EC3m tra xem ch\u1EEF vi\u1EBFt th\u01B0\u1EDDng \u0111\xE3 ho\u1EA1t \u0111\u1ED9ng ch\u01B0a</span>
drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;condition&quot;</span>][:<span class="hljs-number">3</span>]`}}),Ve=new $({props:{code:"['left ventricular dysfunction', 'adhd', 'birth control']",highlighted:'[<span class="hljs-string">&#x27;left ventricular dysfunction&#x27;</span>, <span class="hljs-string">&#x27;adhd&#x27;</span>, <span class="hljs-string">&#x27;birth control&#x27;</span>]'}}),Be=new Ja({}),Le=new $({props:{code:`def compute_review_length(example):
    return {"review_length": len(example["review"].split())}`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_review_length</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;review_length&quot;</span>: <span class="hljs-built_in">len</span>(example[<span class="hljs-string">&quot;review&quot;</span>].split())}`}}),Re=new $({props:{code:`drug_dataset = drug_dataset.map(compute_review_length)
# Ki\u1EC3m tra m\u1EABu hu\u1EA5n luy\u1EC7n \u0111\u1EA7u ti\xEAn
drug_dataset["train"][0]`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(compute_review_length)
<span class="hljs-comment"># Ki\u1EC3m tra m\u1EABu hu\u1EA5n luy\u1EC7n \u0111\u1EA7u ti\xEAn</span>
drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]`}}),Fe=new $({props:{code:`{'patient_id': 206461,
 'drugName': 'Valsartan',
 'condition': 'left ventricular dysfunction',
 'review': '"It has no side effect, I take it in combination of Bystolic 5 Mg and Fish Oil"',
 'rating': 9.0,
 'date': 'May 20, 2012',
 'usefulCount': 27,
 'review_length': 17}`,highlighted:`{<span class="hljs-string">&#x27;patient_id&#x27;</span>: <span class="hljs-number">206461</span>,
 <span class="hljs-string">&#x27;drugName&#x27;</span>: <span class="hljs-string">&#x27;Valsartan&#x27;</span>,
 <span class="hljs-string">&#x27;condition&#x27;</span>: <span class="hljs-string">&#x27;left ventricular dysfunction&#x27;</span>,
 <span class="hljs-string">&#x27;review&#x27;</span>: <span class="hljs-string">&#x27;&quot;It has no side effect, I take it in combination of Bystolic 5 Mg and Fish Oil&quot;&#x27;</span>,
 <span class="hljs-string">&#x27;rating&#x27;</span>: <span class="hljs-number">9.0</span>,
 <span class="hljs-string">&#x27;date&#x27;</span>: <span class="hljs-string">&#x27;May 20, 2012&#x27;</span>,
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: <span class="hljs-number">27</span>,
 <span class="hljs-string">&#x27;review_length&#x27;</span>: <span class="hljs-number">17</span>}`}}),Ge=new $({props:{code:'drug_dataset["train"].sort("review_length")[:3]',highlighted:'drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].sort(<span class="hljs-string">&quot;review_length&quot;</span>)[:<span class="hljs-number">3</span>]'}}),Ue=new $({props:{code:`{'patient_id': [103488, 23627, 20558],
 'drugName': ['Loestrin 21 1 / 20', 'Chlorzoxazone', 'Nucynta'],
 'condition': ['birth control', 'muscle spasm', 'pain'],
 'review': ['"Excellent."', '"useless"', '"ok"'],
 'rating': [10.0, 1.0, 6.0],
 'date': ['November 4, 2008', 'March 24, 2017', 'August 20, 2016'],
 'usefulCount': [5, 2, 10],
 'review_length': [1, 1, 1]}`,highlighted:`{<span class="hljs-string">&#x27;patient_id&#x27;</span>: [<span class="hljs-number">103488</span>, <span class="hljs-number">23627</span>, <span class="hljs-number">20558</span>],
 <span class="hljs-string">&#x27;drugName&#x27;</span>: [<span class="hljs-string">&#x27;Loestrin 21 1 / 20&#x27;</span>, <span class="hljs-string">&#x27;Chlorzoxazone&#x27;</span>, <span class="hljs-string">&#x27;Nucynta&#x27;</span>],
 <span class="hljs-string">&#x27;condition&#x27;</span>: [<span class="hljs-string">&#x27;birth control&#x27;</span>, <span class="hljs-string">&#x27;muscle spasm&#x27;</span>, <span class="hljs-string">&#x27;pain&#x27;</span>],
 <span class="hljs-string">&#x27;review&#x27;</span>: [<span class="hljs-string">&#x27;&quot;Excellent.&quot;&#x27;</span>, <span class="hljs-string">&#x27;&quot;useless&quot;&#x27;</span>, <span class="hljs-string">&#x27;&quot;ok&quot;&#x27;</span>],
 <span class="hljs-string">&#x27;rating&#x27;</span>: [<span class="hljs-number">10.0</span>, <span class="hljs-number">1.0</span>, <span class="hljs-number">6.0</span>],
 <span class="hljs-string">&#x27;date&#x27;</span>: [<span class="hljs-string">&#x27;November 4, 2008&#x27;</span>, <span class="hljs-string">&#x27;March 24, 2017&#x27;</span>, <span class="hljs-string">&#x27;August 20, 2016&#x27;</span>],
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: [<span class="hljs-number">5</span>, <span class="hljs-number">2</span>, <span class="hljs-number">10</span>],
 <span class="hljs-string">&#x27;review_length&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`}}),jn=new ue({props:{$$slots:{default:[WE]},$$scope:{ctx:V}}}),Je=new $({props:{code:`drug_dataset = drug_dataset.filter(lambda x: x["review_length"] > 30)
print(drug_dataset.num_rows)`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;review_length&quot;</span>] &gt; <span class="hljs-number">30</span>)
<span class="hljs-built_in">print</span>(drug_dataset.num_rows)`}}),Ke=new $({props:{code:"{'train': 138514, 'test': 46108}",highlighted:'{<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-number">138514</span>, <span class="hljs-string">&#x27;test&#x27;</span>: <span class="hljs-number">46108</span>}'}}),Dn=new ue({props:{$$slots:{default:[QE]},$$scope:{ctx:V}}}),Ye=new $({props:{code:`import html

text = "I&#039;m a transformer called BERT"
html.unescape(text)`,highlighted:`<span class="hljs-keyword">import</span> html

text = <span class="hljs-string">&quot;I&amp;#039;m a transformer called BERT&quot;</span>
html.unescape(text)`}}),Xe=new $({props:{code:`"I'm a transformer called BERT"`,highlighted:'<span class="hljs-string">&quot;I&#x27;m a transformer called BERT&quot;</span>'}}),We=new $({props:{code:'drug_dataset = drug_dataset.map(lambda x: {"review": html.unescape(x["review"])})',highlighted:'drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: {<span class="hljs-string">&quot;review&quot;</span>: html.unescape(x[<span class="hljs-string">&quot;review&quot;</span>])})'}}),Qe=new Ja({}),Ze=new $({props:{code:`new_drug_dataset = drug_dataset.map(
    lambda x: {"review": [html.unescape(o) for o in x["review"]]}, batched=True
)`,highlighted:`new_drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(
    <span class="hljs-keyword">lambda</span> x: {<span class="hljs-string">&quot;review&quot;</span>: [html.unescape(o) <span class="hljs-keyword">for</span> o <span class="hljs-keyword">in</span> x[<span class="hljs-string">&quot;review&quot;</span>]]}, batched=<span class="hljs-literal">True</span>
)`}}),ta=new $({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")


def tokenize_function(examples):
    return tokenizer(examples["review"], truncation=True)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_function</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;review&quot;</span>], truncation=<span class="hljs-literal">True</span>)`}}),na=new $({props:{code:"%time tokenized_dataset = drug_dataset.map(tokenize_function, batched=True)",highlighted:'%time tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_function, batched=<span class="hljs-literal">True</span>)'}}),zn=new ue({props:{$$slots:{default:[ZE]},$$scope:{ctx:V}}}),aa=new $({props:{code:`slow_tokenizer = AutoTokenizer.from_pretrained("bert-base-cased", use_fast=False)


def slow_tokenize_function(examples):
    return slow_tokenizer(examples["review"], truncation=True)


tokenized_dataset = drug_dataset.map(slow_tokenize_function, batched=True, num_proc=8)`,highlighted:`slow_tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>, use_fast=<span class="hljs-literal">False</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">slow_tokenize_function</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> slow_tokenizer(examples[<span class="hljs-string">&quot;review&quot;</span>], truncation=<span class="hljs-literal">True</span>)


tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(slow_tokenize_function, batched=<span class="hljs-literal">True</span>, num_proc=<span class="hljs-number">8</span>)`}}),In=new ue({props:{$$slots:{default:[tx]},$$scope:{ctx:V}}}),Mn=new ue({props:{$$slots:{default:[nx]},$$scope:{ctx:V}}}),sa=new $({props:{code:`def tokenize_and_split(examples):
    return tokenizer(
        examples["review"],
        truncation=True,
        max_length=128,
        return_overflowing_tokens=True,
    )`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_and_split</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> tokenizer(
        examples[<span class="hljs-string">&quot;review&quot;</span>],
        truncation=<span class="hljs-literal">True</span>,
        max_length=<span class="hljs-number">128</span>,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
    )`}}),ha=new $({props:{code:`result = tokenize_and_split(drug_dataset["train"][0])
[len(inp) for inp in result["input_ids"]]`,highlighted:`result = tokenize_and_split(drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>])
[<span class="hljs-built_in">len</span>(inp) <span class="hljs-keyword">for</span> inp <span class="hljs-keyword">in</span> result[<span class="hljs-string">&quot;input_ids&quot;</span>]]`}}),ca=new $({props:{code:"[128, 49]",highlighted:'[<span class="hljs-number">128</span>, <span class="hljs-number">49</span>]'}}),la=new $({props:{code:"tokenized_dataset = drug_dataset.map(tokenize_and_split, batched=True)",highlighted:'tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_and_split, batched=<span class="hljs-literal">True</span>)'}}),ia=new $({props:{code:"ArrowInvalid: Column 1 named condition expected length 1463 but got length 1000",highlighted:'ArrowInvalid: Column <span class="hljs-number">1</span> named condition expected length <span class="hljs-number">1463</span> but got length <span class="hljs-number">1000</span>'}}),oa=new $({props:{code:`tokenized_dataset = drug_dataset.map(
    tokenize_and_split, batched=True, remove_columns=drug_dataset["train"].column_names
)`,highlighted:`tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(
    tokenize_and_split, batched=<span class="hljs-literal">True</span>, remove_columns=drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].column_names
)`}}),pa=new $({props:{code:'len(tokenized_dataset["train"]), len(drug_dataset["train"])',highlighted:'<span class="hljs-built_in">len</span>(tokenized_dataset[<span class="hljs-string">&quot;train&quot;</span>]), <span class="hljs-built_in">len</span>(drug_dataset[<span class="hljs-string">&quot;train&quot;</span>])'}}),da=new $({props:{code:"(206772, 138514)",highlighted:'(<span class="hljs-number">206772</span>, <span class="hljs-number">138514</span>)'}}),ga=new $({props:{code:`def tokenize_and_split(examples):
    result = tokenizer(
        examples["review"],
        truncation=True,
        max_length=128,
        return_overflowing_tokens=True,
    )
    # Extract mapping between new and old indices
    sample_map = result.pop("overflow_to_sample_mapping")
    for key, values in examples.items():
        result[key] = [values[i] for i in sample_map]
    return result`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_and_split</span>(<span class="hljs-params">examples</span>):
    result = tokenizer(
        examples[<span class="hljs-string">&quot;review&quot;</span>],
        truncation=<span class="hljs-literal">True</span>,
        max_length=<span class="hljs-number">128</span>,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
    )
    <span class="hljs-comment"># Extract mapping between new and old indices</span>
    sample_map = result.pop(<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>)
    <span class="hljs-keyword">for</span> key, values <span class="hljs-keyword">in</span> examples.items():
        result[key] = [values[i] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> sample_map]
    <span class="hljs-keyword">return</span> result`}}),ua=new $({props:{code:`tokenized_dataset = drug_dataset.map(tokenize_and_split, batched=True)
tokenized_dataset`,highlighted:`tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_and_split, batched=<span class="hljs-literal">True</span>)
tokenized_dataset`}}),ma=new $({props:{code:`DatasetDict({
    train: Dataset({
        features: ['attention_mask', 'condition', 'date', 'drugName', 'input_ids', 'patient_id', 'rating', 'review', 'review_length', 'token_type_ids', 'usefulCount'],
        num_rows: 206772
    })
    test: Dataset({
        features: ['attention_mask', 'condition', 'date', 'drugName', 'input_ids', 'patient_id', 'rating', 'review', 'review_length', 'token_type_ids', 'usefulCount'],
        num_rows: 68876
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">206772</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">68876</span>
    })
})`}}),fa=new Ja({}),va=new e$({props:{id:"tfcY1067A5Q"}}),_a=new $({props:{code:'drug_dataset.set_format("pandas")',highlighted:'drug_dataset.set_format(<span class="hljs-string">&quot;pandas&quot;</span>)'}}),ba=new $({props:{code:'drug_dataset["train"][:3]',highlighted:'drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][:<span class="hljs-number">3</span>]'}}),$a=new $({props:{code:'train_df = drug_dataset["train"][:]',highlighted:'train_df = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][:]'}}),Gn=new ue({props:{$$slots:{default:[ex]},$$scope:{ctx:V}}}),ka=new $({props:{code:`frequencies = (
    train_df["condition"]
    .value_counts()
    .to_frame()
    .reset_index()
    .rename(columns={"index": "condition", "condition": "frequency"})
)
frequencies.head()`,highlighted:`frequencies = (
    train_df[<span class="hljs-string">&quot;condition&quot;</span>]
    .value_counts()
    .to_frame()
    .reset_index()
    .rename(columns={<span class="hljs-string">&quot;index&quot;</span>: <span class="hljs-string">&quot;condition&quot;</span>, <span class="hljs-string">&quot;condition&quot;</span>: <span class="hljs-string">&quot;frequency&quot;</span>})
)
frequencies.head()`}}),ya=new $({props:{code:`from datasets import Dataset

freq_dataset = Dataset.from_pandas(frequencies)
freq_dataset`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Dataset

freq_dataset = Dataset.from_pandas(frequencies)
freq_dataset`}}),Ea=new $({props:{code:`Dataset({
    features: ['condition', 'frequency'],
    num_rows: 819
})`,highlighted:`Dataset({
    features: [<span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;frequency&#x27;</span>],
    num_rows: <span class="hljs-number">819</span>
})`}}),Jn=new ue({props:{$$slots:{default:[ax]},$$scope:{ctx:V}}}),xa=new $({props:{code:"drug_dataset.reset_format()",highlighted:"drug_dataset.reset_format()"}}),wa=new Ja({}),ja=new $({props:{code:`drug_dataset_clean = drug_dataset["train"].train_test_split(train_size=0.8, seed=42)
# Thay \u0111\u1ED5i t\xEAn m\u1EB7c \u0111\u1ECBnh "test" th\xE0nh "validation"
drug_dataset_clean["validation"] = drug_dataset_clean.pop("test")
# Th\xEAm "test" v\xE0o \`DatasetDict\`
drug_dataset_clean["test"] = drug_dataset["test"]
drug_dataset_clean`,highlighted:`drug_dataset_clean = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].train_test_split(train_size=<span class="hljs-number">0.8</span>, seed=<span class="hljs-number">42</span>)
<span class="hljs-comment"># Thay \u0111\u1ED5i t\xEAn m\u1EB7c \u0111\u1ECBnh &quot;test&quot; th\xE0nh &quot;validation&quot;</span>
drug_dataset_clean[<span class="hljs-string">&quot;validation&quot;</span>] = drug_dataset_clean.pop(<span class="hljs-string">&quot;test&quot;</span>)
<span class="hljs-comment"># Th\xEAm &quot;test&quot; v\xE0o \`DatasetDict\`</span>
drug_dataset_clean[<span class="hljs-string">&quot;test&quot;</span>] = drug_dataset[<span class="hljs-string">&quot;test&quot;</span>]
drug_dataset_clean`}}),Da=new $({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 110811
    })
    validation: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 27703
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 46108
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">110811</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">27703</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">46108</span>
    })
})`}}),Ta=new Ja({}),qa=new e$({props:{id:"blF9uxYcKHo"}}),Na=new $({props:{code:'drug_dataset_clean.save_to_disk("drug-reviews")',highlighted:'drug_dataset_clean.save_to_disk(<span class="hljs-string">&quot;drug-reviews&quot;</span>)'}}),Aa=new $({props:{code:`drug-reviews/
\u251C\u2500\u2500 dataset_dict.json
\u251C\u2500\u2500 test
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u2514\u2500\u2500 state.json
\u251C\u2500\u2500 train
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u251C\u2500\u2500 indices.arrow
\u2502   \u2514\u2500\u2500 state.json
\u2514\u2500\u2500 validation
    \u251C\u2500\u2500 dataset.arrow
    \u251C\u2500\u2500 dataset_info.json
    \u251C\u2500\u2500 indices.arrow
    \u2514\u2500\u2500 state.json`,highlighted:`drug-reviews/
\u251C\u2500\u2500 dataset_dict.json
\u251C\u2500\u2500 test
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json
\u251C\u2500\u2500 train
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u251C\u2500\u2500 indices.arrow
\u2502   \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json
\u2514\u2500\u2500 validation
    \u251C\u2500\u2500 dataset.arrow
    \u251C\u2500\u2500 dataset_info.json
    \u251C\u2500\u2500 indices.arrow
    \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json`}}),Ha=new $({props:{code:`from datasets import load_from_disk

drug_dataset_reloaded = load_from_disk("drug-reviews")
drug_dataset_reloaded`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_from_disk

drug_dataset_reloaded = load_from_disk(<span class="hljs-string">&quot;drug-reviews&quot;</span>)
drug_dataset_reloaded`}}),Sa=new $({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 110811
    })
    validation: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 27703
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 46108
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">110811</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">27703</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">46108</span>
    })
})`}}),Ia=new $({props:{code:`for split, dataset in drug_dataset_clean.items():
    dataset.to_json(f"drug-reviews-{split}.jsonl")`,highlighted:`<span class="hljs-keyword">for</span> split, dataset <span class="hljs-keyword">in</span> drug_dataset_clean.items():
    dataset.to_json(<span class="hljs-string">f&quot;drug-reviews-<span class="hljs-subst">{split}</span>.jsonl&quot;</span>)`}}),Va=new $({props:{code:"!head -n 1 drug-reviews-train.jsonl",highlighted:'!head -n <span class="hljs-number">1</span> drug-reviews-train.jsonl'}}),Ba=new $({props:{code:`{"patient_id":141780,"drugName":"Escitalopram","condition":"depression","review":"\\"I seemed to experience the regular side effects of LEXAPRO, insomnia, low sex drive, sleepiness during the day. I am taking it at night because my doctor said if it made me tired to take it at night. I assumed it would and started out taking it at night. Strange dreams, some pleasant. I was diagnosed with fibromyalgia. Seems to be helping with the pain. Have had anxiety and depression in my family, and have tried quite a few other medications that haven't worked. Only have been on it for two weeks but feel more positive in my mind, want to accomplish more in my life. Hopefully the side effects will dwindle away, worth it to stick with it from hearing others responses. Great medication.\\"","rating":9.0,"date":"May 29, 2011","usefulCount":10,"review_length":125}`,highlighted:'{<span class="hljs-string">&quot;patient_id&quot;</span>:<span class="hljs-number">141780</span>,<span class="hljs-string">&quot;drugName&quot;</span>:<span class="hljs-string">&quot;Escitalopram&quot;</span>,<span class="hljs-string">&quot;condition&quot;</span>:<span class="hljs-string">&quot;depression&quot;</span>,<span class="hljs-string">&quot;review&quot;</span>:<span class="hljs-string">&quot;\\&quot;I seemed to experience the regular side effects of LEXAPRO, insomnia, low sex drive, sleepiness during the day. I am taking it at night because my doctor said if it made me tired to take it at night. I assumed it would and started out taking it at night. Strange dreams, some pleasant. I was diagnosed with fibromyalgia. Seems to be helping with the pain. Have had anxiety and depression in my family, and have tried quite a few other medications that haven&#x27;t worked. Only have been on it for two weeks but feel more positive in my mind, want to accomplish more in my life. Hopefully the side effects will dwindle away, worth it to stick with it from hearing others responses. Great medication.\\&quot;&quot;</span>,<span class="hljs-string">&quot;rating&quot;</span>:<span class="hljs-number">9.0</span>,<span class="hljs-string">&quot;date&quot;</span>:<span class="hljs-string">&quot;May 29, 2011&quot;</span>,<span class="hljs-string">&quot;usefulCount&quot;</span>:<span class="hljs-number">10</span>,<span class="hljs-string">&quot;review_length&quot;</span>:<span class="hljs-number">125</span>}'}}),La=new $({props:{code:`data_files = {
    "train": "drug-reviews-train.jsonl",
    "validation": "drug-reviews-validation.jsonl",
    "test": "drug-reviews-test.jsonl",
}
drug_dataset_reloaded = load_dataset("json", data_files=data_files)`,highlighted:`data_files = {
    <span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;drug-reviews-train.jsonl&quot;</span>,
    <span class="hljs-string">&quot;validation&quot;</span>: <span class="hljs-string">&quot;drug-reviews-validation.jsonl&quot;</span>,
    <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;drug-reviews-test.jsonl&quot;</span>,
}
drug_dataset_reloaded = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=data_files)`}}),{c(){d=h("meta"),q=o(),k=h("h1"),w=h("a"),D=h("span"),u(y.$$.fragment),j=o(),C=h("span"),E=a("S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u"),x=o(),u(P.$$.fragment),T=o(),O=h("p"),J=a("H\u1EA7u h\u1EBFt th\u1EDDi gian, d\u1EEF li\u1EC7u b\u1EA1n l\xE0m vi\u1EC7c s\u1EBD ch\u01B0a \u0111\u01B0\u1EE3c chu\u1EA9n b\u1ECB ho\xE0n h\u1EA3o cho c\xE1c m\xF4 h\xECnh hu\u1EA5n luy\u1EC7n. Trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD kh\xE1m ph\xE1 c\xE1c t\xEDnh n\u0103ng kh\xE1c nhau m\xE0 \u{1F917} Datasets cung c\u1EA5p \u0111\u1EC3 l\xE0m s\u1EA1ch c\xE1c t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n."),A=o(),u(z.$$.fragment),vt=o(),B=h("h2"),X=h("a"),st=h("span"),u(et.$$.fragment),me=o(),Kt=h("span"),Yt=a("S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u c\u1EE7a ch\xFAng ta"),kn=o(),L=h("p"),Xt=a("T\u01B0\u01A1ng t\u1EF1 nh\u01B0 Pandas, \u{1F917} Datasets cung c\u1EA5p m\u1ED9t s\u1ED1 t\xEDnh n\u0103ng \u0111\u1EC3 thao t\xFAng n\u1ED9i dung c\u1EE7a "),N=h("code"),Ka=a("Dataset"),Ya=a(" v\xE0 "),yn=h("code"),Xa=a("DatasetDict"),Wa=a(". Ch\xFAng ta \u0111\xE3 g\u1EB7p ph\u01B0\u01A1ng th\u1EE9c "),En=h("code"),Qa=a("Dataset.map()"),Za=a(" trong "),ts=h("a"),Rd=a("Ch\u01B0\u01A1ng 3"),Fd=a(" v\xE0 trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD kh\xE1m ph\xE1 m\u1ED9t s\u1ED1 h\xE0m kh\xE1c theo \xFD c\u1EE7a ch\xFAng ta."),mr=o(),$t=h("p"),Gd=a("\u0110\u1ED1i v\u1EDBi v\xED d\u1EE5 n\xE0y, ch\xFAng t\xF4i s\u1EBD s\u1EED d\u1EE5ng "),fe=h("a"),Ud=a("B\u1ED9 d\u1EEF li\u1EC7u \u0111\xE1nh gi\xE1 thu\u1ED1c"),Jd=a(" \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF tr\xEAn "),ve=h("a"),Kd=a("Kho l\u01B0u tr\u1EEF H\u1ECDc m\xE1y UC Irvine"),Yd=a(", ch\u1EE9a c\xE1c \u0111\xE1nh gi\xE1 c\u1EE7a b\u1EC7nh nh\xE2n v\u1EC1 c\xE1c lo\u1EA1i thu\u1ED1c kh\xE1c nhau, c\xF9ng v\u1EDBi t\xECnh tr\u1EA1ng \u0111ang \u0111\u01B0\u1EE3c \u0111i\u1EC1u tr\u1ECB v\xE0 x\u1EBFp h\u1EA1ng 10 sao v\u1EC1 m\u1EE9c \u0111\u1ED9 h\xE0i l\xF2ng c\u1EE7a b\u1EC7nh nh\xE2n."),fr=o(),kt=h("p"),Xd=a("Tr\u01B0\u1EDBc ti\xEAn, ch\xFAng ta c\u1EA7n t\u1EA3i xu\u1ED1ng v\xE0 gi\u1EA3i n\xE9n d\u1EEF li\u1EC7u, c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n b\u1EB1ng l\u1EC7nh "),Lh=h("code"),Wd=a("wget"),Qd=a(" v\xE0  "),Rh=h("code"),Zd=a("unzip"),tg=a(":"),vr=o(),u(_e.$$.fragment),_r=o(),ht=h("p"),ng=a("V\xEC TSV ch\u1EC9 l\xE0 m\u1ED9t bi\u1EBFn th\u1EC3 c\u1EE7a CSV s\u1EED d\u1EE5ng d\u1EA5u tab thay v\xEC d\u1EA5u ph\u1EA9y l\xE0m d\u1EA5u ph\xE2n c\xE1ch, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA3i c\xE1c t\u1EC7p n\xE0y b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng t\u1EADp l\u1EC7nh t\u1EA3i "),Fh=h("code"),eg=a("csv"),ag=a(" v\xE0 ch\u1EC9 \u0111\u1ECBnh \u0111\u1ED1i s\u1ED1 "),Gh=h("code"),sg=a("delimiter"),hg=a(" trong h\xE0m "),Uh=h("code"),cg=a("load_dataset()"),lg=a(" nh\u01B0 sau:"),br=o(),u(be.$$.fragment),$r=o(),yt=h("p"),ig=a("M\u1ED9t th\u1EF1c ti\u1EC5n khi th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 lo\u1EA1i ph\xE2n t\xEDch d\u1EEF li\u1EC7u n\xE0o l\xE0 l\u1EA5y m\u1ED9t m\u1EABu ng\u1EABu nhi\xEAn nh\u1ECF \u0111\u1EC3 c\xF3 th\u1EC3 c\u1EA3m nh\u1EADn nhanh v\u1EC1 lo\u1EA1i d\u1EEF li\u1EC7u b\u1EA1n \u0111ang l\xE0m vi\u1EC7c. Trong \u{1F917} Datasets, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA1o m\u1ED9t m\u1EABu ng\u1EABu nhi\xEAn b\u1EB1ng c\xE1ch x\xE2u chu\u1ED7i c\xE1c h\xE0m "),Jh=h("code"),rg=a("Dataset.shuffle()"),og=a(" v\xE0 "),Kh=h("code"),pg=a("Dataset.select()"),dg=a(" v\u1EDBi nhau:"),kr=o(),u($e.$$.fragment),yr=o(),u(ke.$$.fragment),Er=o(),ct=h("p"),gg=a("L\u01B0u \xFD r\u1EB1ng ch\xFAng ta \u0111\xE3 s\u1EEDa seed trong "),Yh=h("code"),ug=a("Dataset.shuffle()"),mg=a(" cho m\u1EE5c \u0111\xEDch t\xE1i t\u1EA1o.  "),Xh=h("code"),fg=a("Dataset.select()"),vg=a(" mong \u0111\u1EE3i m\u1ED9t ch\u1EC9 s\u1ED1 c\xF3 th\u1EC3 l\u1EB7p l\u1EA1i, v\xEC v\u1EADy ch\xFAng ta truy\u1EC1n v\xE0o kho\u1EA3ng "),Wh=h("code"),_g=a("range(1000)"),bg=a(" \u0111\u1EC3 l\u1EA5y 1,000 m\u1EABu \u0111\u1EA7u ti\xEAn t\u1EEB t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 x\xE1o tr\u1ED9n. T\u1EEB m\u1EABu n\xE0y, ta \u0111\xE3 c\xF3 th\u1EC3 th\u1EA5y m\u1ED9t s\u1ED1 \u0111i\u1EC1u k\u1EF3 qu\u1EB7c trong t\u1EADp d\u1EEF li\u1EC7u:"),xr=o(),Et=h("ul"),ye=h("li"),$g=a("C\u1ED9t "),Qh=h("code"),kg=a("Unnamed: 0"),yg=a("  tr\xF4ng \u0111\xE1ng ng\u1EDD gi\u1ED1ng nh\u01B0 m\u1ED9t ID \u1EA9n danh cho m\u1ED7i b\u1EC7nh nh\xE2n."),Eg=o(),Ee=h("li"),xg=a("C\u1ED9t "),Zh=h("code"),wg=a("condition"),jg=a(" bao g\u1ED3m s\u1EF1 k\u1EBFt h\u1EE3p gi\u1EEFa c\xE1c nh\xE3n ch\u1EEF hoa v\xE0 ch\u1EEF th\u01B0\u1EDDng."),Dg=o(),Wt=h("li"),Tg=a("C\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \u0111\u1ED9 d\xE0i kh\xE1c nhau v\xE0 ch\u1EE9a h\u1ED7n h\u1EE3p c\xE1c d\u1EA5u ph\xE2n t\xE1ch d\xF2ng Python ("),tc=h("code"),qg=a("\\r\\n"),Cg=a(") c\u0169ng nh\u01B0 c\xE1c m\xE3 k\xFD t\u1EF1 HTML nh\u01B0 "),nc=h("code"),Og=a("&\\#039;"),Pg=a("."),wr=o(),xt=h("p"),zg=a("H\xE3y xem c\xE1ch ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u{1F917} Datasets \u0111\u1EC3 gi\u1EA3i quy\u1EBFt t\u1EEBng v\u1EA5n \u0111\u1EC1 n\xE0y. \u0110\u1EC3 ki\u1EC3m tra gi\u1EA3 thuy\u1EBFt ID b\u1EC7nh nh\xE2n cho c\u1ED9t "),ec=h("code"),Ng=a("Unnamed: 0"),Ag=a(", ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m  "),ac=h("code"),Hg=a("Dataset.unique()"),Sg=a(" \u0111\u1EC3 x\xE1c minh r\u1EB1ng s\u1ED1 l\u01B0\u1EE3ng ID kh\u1EDBp v\u1EDBi s\u1ED1 h\xE0ng trong m\u1ED7i l\u1EA7n t\xE1ch:"),jr=o(),u(xe.$$.fragment),Dr=o(),wt=h("p"),Ig=a("\u0110i\u1EC1u n\xE0y d\u01B0\u1EDDng nh\u01B0 x\xE1c nh\u1EADn gi\u1EA3 thuy\u1EBFt c\u1EE7a ch\xFAng t\xF4i, v\xEC v\u1EADy h\xE3y d\u1ECDn d\u1EB9p t\u1EADp d\u1EEF li\u1EC7u m\u1ED9t ch\xFAt b\u1EB1ng c\xE1ch \u0111\u1ED5i t\xEAn c\u1ED9t "),sc=h("code"),Mg=a("Unname: 0"),Vg=a(" th\xE0nh m\u1ED9t c\xE1i g\xEC \u0111\xF3 d\u1EC5 hi\u1EC3u h\u01A1n m\u1ED9t ch\xFAt. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m "),hc=h("code"),Bg=a("DatasetDict.rename_column()"),Lg=a(" \u0111\u1EC3 \u0111\u1ED5i t\xEAn c\u1ED9t tr\xEAn c\u1EA3 hai t\u1EADp con trong m\u1ED9t l\u1EA7n:"),Tr=o(),u(we.$$.fragment),qr=o(),u(je.$$.fragment),Cr=o(),u(xn.$$.fragment),Or=o(),W=h("p"),Rg=a("Ti\u1EBFp theo, h\xE3y chu\u1EA9n h\xF3a t\u1EA5t c\u1EA3 c\xE1c nh\xE3n "),cc=h("code"),Fg=a("condition"),Gg=a(" b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),lc=h("code"),Ug=a("Dataset.map()"),Jg=a(". Nh\u01B0 ch\xFAng ta \u0111\xE3 l\xE0m v\u1EDBi tokenize trong "),ns=h("a"),Kg=a("Ch\u01B0\u01A1ng 3"),Yg=a(", ch\xFAng ta c\xF3 th\u1EC3 x\xE1c \u0111\u1ECBnh m\u1ED9t h\xE0m \u0111\u01A1n gi\u1EA3n c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c \xE1p d\u1EE5ng tr\xEAn t\u1EA5t c\u1EA3 c\xE1c h\xE0ng c\u1EE7a m\u1ED7i t\u1EADp trong "),ic=h("code"),Xg=a("drug_dataset"),Wg=a(":"),Pr=o(),u(De.$$.fragment),zr=o(),u(Te.$$.fragment),Nr=o(),Q=h("p"),Qg=a("\u1ED2 kh\xF4ng, ch\xFAng ta \u0111\xE3 g\u1EB7p s\u1EF1 c\u1ED1 v\u1EDBi ch\u1EE9c n\u0103ng n\u1ED1i c\u1EE7a m\xECnh! T\u1EEB l\u1ED7i, ch\xFAng ta c\xF3 th\u1EC3 suy ra r\u1EB1ng m\u1ED9t s\u1ED1 m\u1EE5c nh\u1EADp trong c\u1ED9t "),rc=h("code"),Zg=a("condition"),tu=a(" l\xE0 "),oc=h("code"),nu=a("None"),eu=a(", kh\xF4ng th\u1EC3 vi\u1EBFt th\u01B0\u1EDDng v\xEC ch\xFAng kh\xF4ng ph\u1EA3i l\xE0 chu\u1ED7i. H\xE3y b\u1ECF c\xE1c h\xE0ng n\xE0y b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),pc=h("code"),au=a("Dataset.filter()"),su=a(", ho\u1EA1t \u0111\u1ED9ng theo c\xE1ch t\u01B0\u01A1ng t\u1EF1 nh\u01B0 "),dc=h("code"),hu=a("Dataset.map()"),cu=a(" v\xE0 mong \u0111\u1EE3i m\u1ED9t h\xE0m nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t m\u1EABu v\u1EC1 t\u1EADp d\u1EEF li\u1EC7u. Thay v\xEC vi\u1EBFt m\u1ED9t h\xE0m r\xF5 r\xE0ng nh\u01B0:"),Ar=o(),u(qe.$$.fragment),Hr=o(),jt=h("p"),lu=a("v\xE0 sau \u0111\xF3 ch\u1EA1y "),gc=h("code"),iu=a("drug_dataset.filter(filter_nones)"),ru=a(", ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y trong m\u1ED9t d\xF2ng b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),uc=h("em"),ou=a("h\xE0m lambda"),pu=a(". Trong Python, c\xE1c h\xE0m lambda l\xE0 c\xE1c h\xE0m nh\u1ECF m\xE0 b\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a m\xE0 kh\xF4ng c\u1EA7n \u0111\u1EB7t t\xEAn r\xF5 r\xE0ng. Ch\xFAng c\xF3 d\u1EA1ng chung:"),Sr=o(),u(Ce.$$.fragment),Ir=o(),Z=h("p"),du=a("\u1EDF \u0111\xE2y "),mc=h("code"),gu=a("lambda"),uu=a(" l\xE0 m\u1ED9t trong nh\u1EEFng "),Oe=h("a"),mu=a("t\u1EEB kh\xF3a"),fu=a(" \u0111\u1EB7c bi\u1EC7t c\u1EE7a Python, "),fc=h("code"),vu=a("<arguments>"),_u=a(" l\xE0 danh s\xE1ch / t\u1EADp h\u1EE3p c\xE1c gi\xE1 tr\u1ECB \u0111\u01B0\u1EE3c ph\xE2n t\xE1ch b\u1EB1ng d\u1EA5u ph\u1EA9y x\xE1c \u0111\u1ECBnh c\xE1c \u0111\u1EA7u v\xE0o cho h\xE0m v\xE0 "),vc=h("code"),bu=a("<expression>"),$u=a("  \u0111\u1EA1i di\u1EC7n cho c\xE1c ho\u1EA1t \u0111\u1ED9ng b\u1EA1n mu\u1ED1n th\u1EF1c hi\u1EC7n. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a m\u1ED9t h\xE0m lambda \u0111\u01A1n gi\u1EA3n b\xECnh ph\u01B0\u01A1ng m\u1ED9t s\u1ED1 nh\u01B0 sau:"),Mr=o(),u(Pe.$$.fragment),Vr=o(),es=h("p"),ku=a("\u0110\u1EC3 \xE1p d\u1EE5ng h\xE0m n\xE0y cho m\u1ED9t \u0111\u1EA7u v\xE0o, ch\xFAng ta c\u1EA7n \u0111\u1EB7t n\xF3 v\xE0 \u0111\u1EA7u v\xE0o trong d\u1EA5u ngo\u1EB7c \u0111\u01A1n:"),Br=o(),u(ze.$$.fragment),Lr=o(),u(Ne.$$.fragment),Rr=o(),as=h("p"),yu=a("T\u01B0\u01A1ng t\u1EF1, ch\xFAng ta c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a c\xE1c h\xE0m lambda v\u1EDBi nhi\u1EC1u tham s\u1ED1 b\u1EB1ng c\xE1ch ph\xE2n t\xE1ch ch\xFAng b\u1EB1ng d\u1EA5u ph\u1EA9y. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 t\xEDnh di\u1EC7n t\xEDch c\u1EE7a m\u1ED9t tam gi\xE1c nh\u01B0 sau:"),Fr=o(),u(Ae.$$.fragment),Gr=o(),u(He.$$.fragment),Ur=o(),Dt=h("p"),Eu=a("C\xE1c h\xE0m Lambda r\u1EA5t h\u1EEFu \xEDch khi b\u1EA1n mu\u1ED1n \u0111\u1ECBnh ngh\u0129a c\xE1c h\xE0m nh\u1ECF, s\u1EED d\u1EE5ng m\u1ED9t l\u1EA7n (\u0111\u1EC3 bi\u1EBFt th\xEAm th\xF4ng tin v\u1EC1 ch\xFAng, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n n\xEAn \u0111\u1ECDc "),Se=h("a"),xu=a("H\u01B0\u1EDBng d\u1EABn Python \u0111\xEDch th\u1EF1c"),wu=a(" c\u1EE7a Andre Burgaud). Trong ng\u1EEF c\u1EA3nh \u{1F917} Datasets, ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng c\xE1c h\xE0m lambda \u0111\u1EC3 x\xE1c \u0111\u1ECBnh c\xE1c ho\u1EA1t \u0111\u1ED9ng n\u1ED1i v\xE0 l\u1ECDc \u0111\u01A1n gi\u1EA3n, v\xEC v\u1EADy h\xE3y s\u1EED d\u1EE5ng th\u1EE7 thu\u1EADt n\xE0y \u0111\u1EC3 lo\u1EA1i b\u1ECF c\xE1c ph\u1EA7n "),_c=h("code"),ju=a("None"),Du=a(" trong t\u1EADp d\u1EEF li\u1EC7u:"),Jr=o(),u(Ie.$$.fragment),Kr=o(),Tt=h("p"),Tu=a("V\u1EDBi "),bc=h("code"),qu=a("None"),Cu=a(" \u0111\xE3 b\u1ECB x\xF3a, ch\xFAng ta  c\xF3 th\u1EC3 chu\u1EA9n h\xF3a c\u1ED9t "),$c=h("code"),Ou=a("condition"),Pu=a(":"),Yr=o(),u(Me.$$.fragment),Xr=o(),u(Ve.$$.fragment),Wr=o(),ss=h("p"),zu=a("N\xF3 ho\u1EA1t \u0111\u1ED9ng! V\u1EADy l\xE0 ch\xFAng ta \u0111\xE3 l\xE0m s\u1EA1ch c\xE1c nh\xE3n, gi\u1EDD ch\xFAng ta h\xE3y xem x\xE9t vi\u1EC7c l\xE0m s\u1EA1ch c\xE1c b\xE0i \u0111\xE1nh gi\xE1."),Qr=o(),Qt=h("h2"),wn=h("a"),kc=h("span"),u(Be.$$.fragment),Nu=o(),yc=h("span"),Au=a("T\u1EA1o ra c\xE1c c\u1ED9t m\u1EDBi"),Zr=o(),hs=h("p"),Hu=a("B\u1EA5t c\u1EE9 khi n\xE0o b\u1EA1n x\u1EED l\xFD c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a kh\xE1ch h\xE0ng, m\u1ED9t ph\u01B0\u01A1ng ph\xE1p hay \u0111\xF3 l\xE0 ki\u1EC3m tra s\u1ED1 l\u01B0\u1EE3ng t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1. B\xE0i \u0111\xE1nh gi\xE1 c\xF3 th\u1EC3 ch\u1EC9 l\xE0 m\u1ED9t t\u1EEB duy nh\u1EA5t nh\u01B0 \u201CTuy\u1EC7t v\u1EDDi!\u201D ho\u1EB7c m\u1ED9t b\xE0i lu\u1EADn \u0111\u1EA7y \u0111\u1EE7 v\u1EDBi h\xE0ng ngh\xECn t\u1EEB, v\xE0 t\xF9y thu\u1ED9c v\xE0o tr\u01B0\u1EDDng h\u1EE3p s\u1EED d\u1EE5ng, b\u1EA1n s\u1EBD c\u1EA7n x\u1EED l\xFD nh\u1EEFng th\xE1i c\u1EF1c n\xE0y theo c\xE1ch kh\xE1c nhau. \u0110\u1EC3 t\xEDnh to\xE1n s\u1ED1 l\u01B0\u1EE3ng t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1, ch\xFAng t\xF4i s\u1EBD s\u1EED d\u1EE5ng ph\u01B0\u01A1ng ph\xE1p ph\u1ECFng \u0111o\xE1n s\u01A1 b\u1ED9 d\u1EF1a tr\xEAn vi\u1EC7c t\xE1ch t\u1EEBng v\u0103n b\u1EA3n theo kho\u1EA3ng tr\u1EAFng."),to=o(),cs=h("p"),Su=a("H\xE3y \u0111\u1ECBnh ngh\u0129a m\u1ED9t h\xE0m \u0111\u01A1n gi\u1EA3n \u0111\u1EBFm s\u1ED1 t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1:"),no=o(),u(Le.$$.fragment),eo=o(),K=h("p"),Iu=a("Kh\xF4ng gi\u1ED1ng nh\u01B0 h\xE0m "),Ec=h("code"),Mu=a("lowercase_condition()"),Vu=a(", "),xc=h("code"),Bu=a("compute_review_length()"),Lu=a(" tr\u1EA3 v\u1EC1 m\u1ED9t t\u1EEB \u0111i\u1EC3n c\xF3 kh\xF3a kh\xF4ng t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t trong c\xE1c t\xEAn c\u1ED9t trong t\u1EADp d\u1EEF li\u1EC7u. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, khi "),wc=h("code"),Ru=a("compute_review_length()"),Fu=a(" \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o "),jc=h("code"),Gu=a("Dataset.map()"),Uu=a(", n\xF3 s\u1EBD \u0111\u01B0\u1EE3c \xE1p d\u1EE5ng cho t\u1EA5t c\u1EA3 c\xE1c h\xE0ng trong t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EC3 t\u1EA1o c\u1ED9t m\u1EDBi "),Dc=h("code"),Ju=a("review_length"),Ku=a(":"),ao=o(),u(Re.$$.fragment),so=o(),u(Fe.$$.fragment),ho=o(),qt=h("p"),Yu=a("Nh\u01B0 mong \u0111\u1EE3i, ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y c\u1ED9t "),Tc=h("code"),Xu=a("review_length"),Wu=a(" \u0111\xE3 \u0111\u01B0\u1EE3c th\xEAm v\xE0o t\u1EADp hu\u1EA5n luy\u1EC7n c\u1EE7a ch\xFAng ta. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EAFp x\u1EBFp c\u1ED9t m\u1EDBi n\xE0y v\u1EDBi "),qc=h("code"),Qu=a("Dataset.sort()"),Zu=a(" \u0111\u1EC3 xem c\xE1c gi\xE1 tr\u1ECB c\u1EF1c \u0111\u1EA1i tr\xF4ng nh\u01B0 th\u1EBF n\xE0o:"),co=o(),u(Ge.$$.fragment),lo=o(),u(Ue.$$.fragment),io=o(),ls=h("p"),tm=a("Nh\u01B0 ta \u0111\xE3 nghi v\u1EA5n, m\u1ED9t s\u1ED1 \u0111\xE1nh gi\xE1 ch\u1EC9 ch\u1EE9a m\u1ED9t t\u1EEB duy nh\u1EA5t, m\u1EB7c d\xF9 c\xF3 th\u1EC3 \u1ED5n \u0111\u1EC3 ph\xE2n t\xEDch s\u1EAFc th\xE1i, nh\u01B0ng s\u1EBD kh\xF4ng c\xF3 nhi\u1EC1u th\xF4ng tin n\u1EBFu ch\xFAng t\xF4i mu\u1ED1n d\u1EF1 \u0111o\xE1n t\xECnh tr\u1EA1ng b\u1EC7nh."),ro=o(),u(jn.$$.fragment),oo=o(),Ct=h("p"),nm=a("H\xE3y s\u1EED d\u1EE5ng h\xE0m "),Cc=h("code"),em=a("Dataset.filter()"),am=a(" \u0111\u1EC3 x\xF3a c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \xEDt h\u01A1n 30 t\u1EEB. T\u01B0\u01A1ng t\u1EF1 nh\u01B0 nh\u1EEFng g\xEC ch\xFAng ta \u0111\xE3 l\xE0m v\u1EDBi c\u1ED9t "),Oc=h("code"),sm=a("condition"),hm=a(", ch\xFAng ta c\xF3 th\u1EC3 l\u1ECDc ra c\xE1c b\xE0i \u0111\xE1nh gi\xE1 r\u1EA5t ng\u1EAFn b\u1EB1ng c\xE1ch y\xEAu c\u1EA7u c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \u0111\u1ED9 d\xE0i tr\xEAn ng\u01B0\u1EE1ng n\xE0y:"),po=o(),u(Je.$$.fragment),go=o(),u(Ke.$$.fragment),uo=o(),is=h("p"),cm=a("Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y, \u0111i\u1EC1u n\xE0y \u0111\xE3 lo\u1EA1i b\u1ECF kho\u1EA3ng 15% b\xE0i \u0111\xE1nh gi\xE1 kh\u1ECFi b\u1ED9 hu\u1EA5n luy\u1EC7n v\xE0 ki\u1EC3m th\u1EED ban \u0111\u1EA7u."),mo=o(),u(Dn.$$.fragment),fo=o(),Tn=h("p"),lm=a("\u0110i\u1EC1u cu\u1ED1i c\xF9ng ch\xFAng ta c\u1EA7n gi\u1EA3i quy\u1EBFt l\xE0 s\u1EF1 hi\u1EC7n di\u1EC7n c\u1EE7a k\xFD t\u1EF1 HTML trong c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a ch\xFAng ta. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\xF4-\u0111un "),Pc=h("code"),im=a("html"),rm=a(" c\u1EE7a Python \u0111\u1EC3 lo\u1EA1i b\u1ECF qua c\xE1c k\xFD t\u1EF1 n\xE0y, nh\u01B0 sau:"),vo=o(),u(Ye.$$.fragment),_o=o(),u(Xe.$$.fragment),bo=o(),qn=h("p"),om=a("Ta s\u1EBD s\u1EED d\u1EE5ng "),zc=h("code"),pm=a("Dataset.map()"),dm=a(" \u0111\u1EC3 h\u1EE7y t\u1EA5t c\u1EA3 c\xE1c k\xFD t\u1EF1 HTML trong kho t\xE0i li\u1EC7u c\u1EE7a m\xECnh:"),$o=o(),u(We.$$.fragment),ko=o(),Cn=h("p"),gm=a("Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y, ph\u01B0\u01A1ng th\u1EE9c "),Nc=h("code"),um=a("Dataset.map()"),mm=a(" kh\xE1 h\u1EEFu \xEDch \u0111\u1EC3 x\u1EED l\xFD d\u1EEF li\u1EC7u - v\xE0 ch\xFAng ta th\u1EADm ch\xED c\xF2n ch\u01B0a r\xF5 t\u1EA5t m\u1ECDi th\u1EE9 m\xE0 n\xF3 c\xF3 th\u1EC3 l\xE0m!"),yo=o(),Zt=h("h2"),On=h("a"),Ac=h("span"),u(Qe.$$.fragment),fm=o(),rs=h("span"),vm=a("Si\xEAu s\u1EE9c m\u1EA1nh c\u1EE7a h\xE0m "),Hc=h("code"),_m=a("map()"),Eo=o(),lt=h("p"),bm=a("Ph\u01B0\u01A1ng th\u1EE9c "),Sc=h("code"),$m=a("Dataset.map ()"),km=a(" nh\u1EADn tham s\u1ED1 "),Ic=h("code"),ym=a("batched"),Em=a(", n\u1EBFu \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh "),Mc=h("code"),xm=a("True"),wm=a(", n\xF3 s\u1EBD g\u1EEDi m\u1ED9t lo\u1EA1t c\xE1c m\u1EABu \u0111\u1EBFn h\xE0m map c\xF9ng m\u1ED9t l\xFAc (ta c\xF3 th\u1EC3 c\u1EA5u h\xECnh k\xEDch th\u01B0\u1EDBc l\xF4 nh\u01B0ng m\u1EB7c \u0111\u1ECBnh l\xE0 1,000). V\xED d\u1EE5: h\xE0m map tr\u01B0\u1EDBc \u0111\xF3 lo\u1EA1i b\u1ECF t\u1EA5t c\u1EA3 HTML \u0111\xE3 m\u1EA5t m\u1ED9t ch\xFAt th\u1EDDi gian \u0111\u1EC3 ch\u1EA1y (b\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECDc th\u1EDDi gian th\u1EF1c hi\u1EC7n t\u1EEB c\xE1c thanh ti\u1EBFn tr\xECnh). Ch\xFAng ta c\xF3 th\u1EC3 t\u0103ng t\u1ED1c \u0111\u1ED9 n\xE0y b\u1EB1ng c\xE1ch x\u1EED l\xFD m\u1ED9t s\u1ED1 ph\u1EA7n t\u1EED c\xF9ng l\xFAc th\xF4ng qua s\u1EED d\u1EE5ng bao h\xE0m."),xo=o(),tt=h("p"),jm=a("Khi b\u1EA1n ch\u1EC9 \u0111\u1ECBnh "),Vc=h("code"),Dm=a("batched=True"),Tm=a(", h\xE0m s\u1EBD nh\u1EADn m\u1ED9t t\u1EEB \u0111i\u1EC3n v\u1EDBi c\xE1c tr\u01B0\u1EDDng c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, nh\u01B0ng m\u1ED7i gi\xE1 tr\u1ECB b\xE2y gi\u1EDD l\xE0 m\u1ED9t "),Bc=h("em"),qm=a("danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB"),Cm=a(" v\xE0 kh\xF4ng ch\u1EC9 l\xE0 m\u1ED9t gi\xE1 tr\u1ECB duy nh\u1EA5t. Gi\xE1 tr\u1ECB tr\u1EA3 v\u1EC1 c\u1EE7a "),Lc=h("code"),Om=a("Dataset.map()"),Pm=a(" ph\u1EA3i gi\u1ED1ng nhau: m\u1ED9t t\u1EEB \u0111i\u1EC3n v\u1EDBi c\xE1c tr\u01B0\u1EDDng ta mu\u1ED1n c\u1EADp nh\u1EADt ho\u1EB7c th\xEAm v\xE0o t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\xE0 m\u1ED9t danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB. V\xED d\u1EE5: \u0111\xE2y l\xE0 m\u1ED9t c\xE1ch kh\xE1c \u0111\u1EC3 h\u1EE7y t\u1EA5t c\u1EA3 c\xE1c k\xFD t\u1EF1 HTML, nh\u01B0ng s\u1EED d\u1EE5ng "),Rc=h("code"),zm=a("batched=True"),Nm=a(":"),wo=o(),u(Ze.$$.fragment),jo=o(),Ot=h("p"),Am=a("N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y \u0111o\u1EA1n m\xE3 n\xE0y tr\xEAn notebook, b\u1EA1n s\u1EBD th\u1EA5y r\u1EB1ng l\u1EC7nh n\xE0y th\u1EF1c thi nhanh h\u01A1n l\u1EC7nh tr\u01B0\u1EDBc \u0111\xF3. V\xE0 \u0111\xF3 kh\xF4ng ph\u1EA3i l\xE0 do c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a ch\xFAng t\xF4i \u0111\xE3 \u0111\u01B0\u1EE3c lo\u1EA1i \u0111i HTML - n\u1EBFu b\u1EA1n th\u1EF1c hi\u1EC7n l\u1EA1i h\u01B0\u1EDBng d\u1EABn t\u1EEB ph\u1EA7n tr\u01B0\u1EDBc (kh\xF4ng c\xF3 "),Fc=h("code"),Hm=a("batch = True"),Sm=a("), n\xF3 s\u1EBD m\u1EA5t c\xF9ng m\u1ED9t kho\u1EA3ng th\u1EDDi gian nh\u01B0 tr\u01B0\u1EDBc. \u0110i\u1EC1u n\xE0y l\xE0 do vi\u1EC7c bao h\xE0m th\u01B0\u1EDDng nhanh h\u01A1n vi\u1EC7c th\u1EF1c thi c\xF9ng m\u1ED9t \u0111o\u1EA1n m\xE3 trong v\xF2ng l\u1EB7p "),Gc=h("code"),Im=a("for"),Mm=a(" v\xE0 ch\xFAng ta c\u0169ng \u0111\u1EA1t \u0111\u01B0\u1EE3c m\u1ED9t s\u1ED1 hi\u1EC7u su\u1EA5t b\u1EB1ng c\xE1ch truy c\u1EADp nhi\u1EC1u ph\u1EA7n t\u1EED c\xF9ng m\u1ED9t l\xFAc thay v\xEC t\u1EEBng ph\u1EA7n t\u1EED m\u1ED9t."),Do=o(),it=h("p"),Vm=a("S\u1EED d\u1EE5ng "),Uc=h("code"),Bm=a("Dataset.map()"),Lm=a(" v\u1EDBi "),Jc=h("code"),Rm=a("batched=True"),Fm=a(" s\u1EBD l\xE0 \u0111i\u1EC1u c\u1EA7n thi\u1EBFt \u0111\u1EC3 m\u1EDF kh\xF3a t\u1ED1c \u0111\u1ED9 c\u1EE7a c\xE1c tr\xECnh tokenize \u201Cnhanh\u201D m\xE0 ch\xFAng ta s\u1EBD g\u1EB7p trong "),os=h("a"),Gm=a("Ch\u01B0\u01A1ng 6"),Um=a(", c\xF3 th\u1EC3 nhanh ch\xF3ng tokenize c\xE1c danh s\xE1ch l\u1EDBn c\xE1c v\u0103n b\u1EA3n. V\xED d\u1EE5: \u0111\u1EC3 tokenize t\u1EA5t c\u1EA3 c\xE1c \u0111\xE1nh gi\xE1 thu\u1ED1c b\u1EB1ng tr\xECnh tokenize nhanh, ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\u1ED9t h\xE0m nh\u01B0 sau:"),To=o(),u(ta.$$.fragment),qo=o(),rt=h("p"),Jm=a("Nh\u01B0 b\u1EA1n \u0111\xE3 th\u1EA5y trong "),ps=h("a"),Km=a("Ch\u01B0\u01A1ng 3"),Ym=a(", ch\xFAng ta c\xF3 th\u1EC3 truy\u1EC1n v\xE0o m\u1ED9t ho\u1EB7c nhi\u1EC1u m\u1EABu cho tokenizer, v\xEC v\u1EADy ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m n\xE0y v\u1EDBi "),Kc=h("code"),Xm=a("batched=True"),Wm=a(" ho\u1EB7c kh\xF4ng. H\xE3y c\u0169ng coi \u0111\xE2y l\xE0 m\u1ED9t c\u01A1 h\u1ED9i \u0111\u1EC3 so s\xE1nh hi\u1EC7u n\u0103ng c\u1EE7a hai tu\u1EF3 ch\u1ECDn n\xE0y. Trong m\u1ED9t notebook, b\u1EA1n c\xF3 th\u1EC3 b\u1EA5m gi\u1EDD ch\u1EC9 v\u1EDBi m\u1ED9t d\xF2ng l\u1EC7nh "),Yc=h("code"),Qm=a("%time"),Zm=a(" tr\u01B0\u1EDBc d\xF2ng m\xE3 b\u1EA1n mu\u1ED1n t\xECnh th\u1EDDi gian:"),Co=o(),u(na.$$.fragment),Oo=o(),Pn=h("p"),tf=a("B\u1EA1n c\u0169ng c\xF3 th\u1EC3 t\xEDnh th\u1EDDi gian cho to\xE0n b\u1ED9 \xF4 b\u1EB1ng c\xE1ch \u0111\u1EB7t "),Xc=h("code"),nf=a("%%time"),ef=a(" \u1EDF \u0111\u1EA7u c\u1EE7a \xF4 m\xE3. Tr\xEAn ph\u1EA7n c\u1EE9ng m\xE0 ch\xFAng ta th\u1EF1c hi\u1EC7n, n\xF3 hi\u1EC3n th\u1ECB 10.8 gi\xE2y cho l\u1EC7nh n\xE0y (\u0111\xF3 l\xE0 s\u1ED1 \u0111\u01B0\u1EE3c vi\u1EBFt sau \u201CWall time\u201D)."),Po=o(),u(zn.$$.fragment),zo=o(),ds=h("p"),af=a("D\u01B0\u1EDBi \u0111\xE2y l\xE0 k\u1EBFt qu\u1EA3 thu \u0111\u01B0\u1EE3c khi c\xF3 v\xE0 kh\xF4ng c\xF3 t\xEDnh n\u0103ng ph\xE2n l\xF4, v\u1EDBi tokenizer nhanh v\xE0 ch\u1EADm:"),No=o(),Nn=h("table"),Wc=h("thead"),tn=h("tr"),gs=h("th"),sf=a("Tu\u1EF3 ch\u1ECDn"),hf=o(),us=h("th"),cf=a("Tokenizer nhanh"),lf=o(),ms=h("th"),rf=a("Tokenizer ch\u1EADm"),of=o(),ea=h("tbody"),nn=h("tr"),fs=h("td"),Qc=h("code"),pf=a("batched=True"),df=o(),vs=h("td"),gf=a("10.8s"),uf=o(),_s=h("td"),mf=a("4min41s"),ff=o(),en=h("tr"),bs=h("td"),Zc=h("code"),vf=a("batched=False"),_f=o(),$s=h("td"),bf=a("59.2s"),$f=o(),ks=h("td"),kf=a("5min3s"),Ao=o(),Pt=h("p"),yf=a("\u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 vi\u1EC7c s\u1EED d\u1EE5ng m\u1ED9t tokenizer nhanh v\u1EDBi t\xF9y ch\u1ECDn "),tl=h("code"),Ef=a("batched=True"),xf=a(" s\u1EBD nhanh h\u01A1n 30 l\u1EA7n so v\u1EDBi phi\xEAn b\u1EA3n ch\u1EADm m\xE0 kh\xF4ng c\xF3 l\xF4 - \u0111i\u1EC1u n\xE0y th\u1EF1c s\u1EF1 tuy\u1EC7t v\u1EDDi! \u0110\xF3 l\xE0 l\xFD do ch\xEDnh t\u1EA1i sao tokenizer nhanh l\xE0 m\u1EB7c \u0111\u1ECBnh khi s\u1EED d\u1EE5ng "),nl=h("code"),wf=a("AutoTokenizer"),jf=a(" (v\xE0 t\u1EA1i sao ch\xFAng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 \u201Cnhanh\u201D). Ch\xFAng c\xF3 th\u1EC3 \u0111\u1EA1t \u0111\u01B0\u1EE3c t\u1ED1c \u0111\u1ED9 nh\u01B0 v\u1EADy b\u1EDFi v\xEC ph\xEDa sau, \u0111o\u1EA1n m\xE3 token h\xF3a \u0111\u01B0\u1EE3c th\u1EF1c thi b\u1EB1ng Rust, \u0111\xE2y l\xE0 m\u1ED9t ng\xF4n ng\u1EEF gi\xFAp d\u1EC5 d\xE0ng th\u1EF1c hi\u1EC7n \u0111o\u1EA1n m\xE3 song song."),Ho=o(),ys=h("p"),Df=a("Song song h\xF3a c\u0169ng l\xE0 l\xFD do gi\u1EA3i th\xEDch cho t\u1ED1c \u0111\u1ED9 t\u0103ng g\u1EA7n g\u1EA5p 6 l\u1EA7n m\xE0 tr\xECnh tokenize nhanh \u0111\u1EA1t \u0111\u01B0\u1EE3c v\u1EDBi vi\u1EC7c ph\xE2n l\xF4: b\u1EA1n kh\xF4ng th\u1EC3 song song m\u1ED9t thao t\xE1c tokenize \u0111\u01A1n l\u1EBB, nh\u01B0ng khi b\u1EA1n mu\u1ED1n tokenize nhi\u1EC1u v\u0103n b\u1EA3n c\xF9ng m\u1ED9t l\xFAc, b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 c\u1EA7n chia nh\u1ECF vi\u1EC7c th\u1EF1c thi tr\xEAn nhi\u1EC1u quy tr\xECnh, m\u1ED7i ng\u01B0\u1EDDi ch\u1ECBu tr\xE1ch nhi\u1EC7m v\u1EC1 c\xE1c v\u0103n b\u1EA3n c\u1EE7a ri\xEAng m\xECnh."),So=o(),_t=h("p"),el=h("code"),Tf=a("Dataset.map()"),qf=a(" c\u0169ng t\u1EF1 c\xF3 m\u1ED9t s\u1ED1 kh\u1EA3 n\u0103ng t\xEDnh to\xE1n song song. V\xEC ch\xFAng kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi Rust, n\xEAn ch\xFAng s\u1EBD kh\xF4ng \u0111\u1EC3 m\u1ED9t tr\xECnh tokenizer ch\u1EADm b\u1EAFt k\u1ECBp v\u1EDBi m\u1ED9t tokenizer nhanh, nh\u01B0ng ch\xFAng v\u1EABn c\xF3 th\u1EC3 h\u1EEFu \xEDch (\u0111\u1EB7c bi\u1EC7t n\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng m\u1ED9t tokenizer kh\xF4ng c\xF3 phi\xEAn b\u1EA3n nhanh). \u0110\u1EC3 b\u1EADt x\u1EED l\xFD \u0111a lu\u1ED3ng, h\xE3y s\u1EED d\u1EE5ng tham s\u1ED1 "),al=h("code"),Cf=a("num_proc"),Of=a(" v\xE0 ch\u1EC9 \u0111\u1ECBnh s\u1ED1 l\u01B0\u1EE3ng quy tr\xECnh s\u1EBD s\u1EED d\u1EE5ng trong l\u1EC7nh g\u1ECDi c\u1EE7a b\u1EA1n t\u1EDBi "),sl=h("code"),Pf=a("Dataset.map()"),zf=a(":"),Io=o(),u(aa.$$.fragment),Mo=o(),Es=h("p"),Nf=a("B\u1EA1n c\xF3 th\u1EC3 th\u1EED nghi\u1EC7m m\u1ED9t ch\xFAt v\u1EDBi th\u1EDDi gian \u0111\u1EC3 x\xE1c \u0111\u1ECBnh s\u1ED1 l\u01B0\u1EE3ng quy tr\xECnh t\u1ED1i \u01B0u \u0111\u1EC3 s\u1EED d\u1EE5ng; trong tr\u01B0\u1EDDng h\u1EE3p c\u1EE7a ch\xFAng ta, 8 d\u01B0\u1EDDng nh\u01B0 t\u1EA1o ra t\u1ED1c \u0111\u1ED9 t\u0103ng t\u1ED1t nh\u1EA5t. D\u01B0\u1EDBi \u0111\xE2y l\xE0 nh\u1EEFng con s\u1ED1 ch\xFAng t\xF4i nh\u1EADn \u0111\u01B0\u1EE3c khi c\xF3 v\xE0 kh\xF4ng c\xF3 x\u1EED l\xFD \u0111a lu\u1ED3ng:"),Vo=o(),An=h("table"),hl=h("thead"),an=h("tr"),xs=h("th"),Af=a("Tu\u1EF3 ch\u1ECDn"),Hf=o(),ws=h("th"),Sf=a("Tokenizer nhanh"),If=o(),js=h("th"),Mf=a("Tokenizer ch\u1EADm"),Vf=o(),bt=h("tbody"),sn=h("tr"),Ds=h("td"),cl=h("code"),Bf=a("batched=True"),Lf=o(),Ts=h("td"),Rf=a("10.8s"),Ff=o(),qs=h("td"),Gf=a("4min41s"),Uf=o(),hn=h("tr"),Cs=h("td"),ll=h("code"),Jf=a("batched=False"),Kf=o(),Os=h("td"),Yf=a("59.2s"),Xf=o(),Ps=h("td"),Wf=a("5min3s"),Qf=o(),cn=h("tr"),Hn=h("td"),il=h("code"),Zf=a("batched=True"),tv=a(", "),rl=h("code"),nv=a("num_proc=8"),ev=o(),zs=h("td"),av=a("6.52s"),sv=o(),Ns=h("td"),hv=a("41.3s"),cv=o(),ln=h("tr"),Sn=h("td"),ol=h("code"),lv=a("batched=False"),iv=a(", "),pl=h("code"),rv=a("num_proc=8"),ov=o(),As=h("td"),pv=a("9.49s"),dv=o(),Hs=h("td"),gv=a("45.2s"),Bo=o(),ot=h("p"),uv=a("\u0110\xF3 l\xE0 nh\u1EEFng k\u1EBFt qu\u1EA3 h\u1EE3p l\xFD h\u01A1n nhi\u1EC1u \u0111\u1ED1i v\u1EDBi tokenizer ch\u1EADm, nh\u01B0ng hi\u1EC7u su\u1EA5t c\u1EE7a tokenizer nhanh c\u0169ng \u0111\xE3 \u0111\u01B0\u1EE3c c\u1EA3i thi\u1EC7n \u0111\xE1ng k\u1EC3. Tuy nhi\xEAn, l\u01B0u \xFD r\u1EB1ng \u0111i\u1EC1u \u0111\xF3 kh\xF4ng ph\u1EA3i l\xFAc n\xE0o c\u0169ng \u0111\xFAng - \u0111\u1ED1i v\u1EDBi c\xE1c gi\xE1 tr\u1ECB c\u1EE7a "),dl=h("code"),mv=a("num_proc"),fv=a(" kh\xE1c 8, c\xE1c th\u1EED nghi\u1EC7m c\u1EE7a ch\xFAng t\xF4i cho th\u1EA5y r\u1EB1ng s\u1EED d\u1EE5ng "),gl=h("code"),vv=a("batched=True"),_v=a(" m\xE0 kh\xF4ng c\xF3 t\xF9y ch\u1ECDn n\xE0y s\u1EBD nhanh h\u01A1n. N\xF3i chung, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n kh\xF4ng n\xEAn s\u1EED d\u1EE5ng x\u1EED l\xFD \u0111a lu\u1ED3ng Python cho c\xE1c tr\xECnh tokenize nhanh v\u1EDBi "),ul=h("code"),bv=a("batched=True"),$v=a("."),Lo=o(),u(In.$$.fragment),Ro=o(),pt=h("p"),kv=a("T\u1EA5t c\u1EA3 c\xE1c ch\u1EE9c n\u0103ng n\xE0y \u0111\u01B0\u1EE3c c\xF4 \u0111\u1ECDng trong m\u1ED9t ph\u01B0\u01A1ng ph\xE1p \u0111\xE3 kh\xE1 tuy\u1EC7t v\u1EDDi, nh\u01B0ng c\xF2n nhi\u1EC1u h\u01A1n th\u1EBF n\u1EEFa! V\u1EDBi "),ml=h("code"),yv=a("Dataset.map()"),Ev=a(" v\xE0 "),fl=h("code"),xv=a("batched=True"),wv=a(", b\u1EA1n c\xF3 th\u1EC3 thay \u0111\u1ED5i s\u1ED1 l\u01B0\u1EE3ng ph\u1EA7n t\u1EED trong t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh. \u0110i\u1EC1u n\xE0y c\u1EF1c k\u1EF3 h\u1EEFu \xEDch trong nhi\u1EC1u tr\u01B0\u1EDDng h\u1EE3p m\xE0 b\u1EA1n mu\u1ED1n t\u1EA1o m\u1ED9t s\u1ED1 \u0111\u1EB7c tr\u01B0ng hu\u1EA5n luy\u1EC7n t\u1EEB m\u1ED9t m\u1EABu v\xE0 ch\xFAng ta s\u1EBD c\u1EA7n th\u1EF1c hi\u1EC7n \u0111i\u1EC1u n\xE0y nh\u01B0 m\u1ED9t ph\u1EA7n c\u1EE7a qu\xE1 tr\xECnh ti\u1EC1n x\u1EED l\xFD cho m\u1ED9t s\u1ED1 t\xE1c v\u1EE5 NLP s\u1EBD th\u1EF1c hi\u1EC7n trong "),Ss=h("a"),jv=a("Ch\u01B0\u01A1ng 7"),Dv=a("."),Fo=o(),u(Mn.$$.fragment),Go=o(),zt=h("p"),Tv=a("Ch\xFAng ta h\xE3y xem n\xF3 ho\u1EA1t \u0111\u1ED9ng nh\u01B0 th\u1EBF n\xE0o! \u1EDE \u0111\xE2y, ta s\u1EBD tokenize c\xE1c m\u1EABu c\u1EE7a m\xECnh v\xE0 c\u1EAFt ch\xFAng v\u1EC1 \u0111\u1ED9 d\xE0i t\u1ED1i \u0111a l\xE0 128, nh\u01B0ng ta s\u1EBD y\xEAu c\u1EA7u tr\xECnh tokenize tr\u1EA3 v\u1EC1 "),vl=h("em"),qv=a("t\u1EA5t c\u1EA3"),Cv=a(" c\xE1c \u0111o\u1EA1n v\u0103n b\u1EA3n thay v\xEC ch\u1EC9 \u0111o\u1EA1n v\u0103n b\u1EA3n \u0111\u1EA7u ti\xEAn. \u0110i\u1EC1u n\xE0y c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n v\u1EDBi "),_l=h("code"),Ov=a("return_overflowing_tokens=True"),Pv=a(":"),Uo=o(),u(sa.$$.fragment),Jo=o(),Vn=h("p"),zv=a("H\xE3y ki\u1EC3m tra \u0111i\u1EC1u n\xE0y tr\xEAn m\u1ED9t m\u1EABu tr\u01B0\u1EDBc khi s\u1EED d\u1EE5ng "),bl=h("code"),Nv=a("Dataset.map()"),Av=a(" tr\xEAn to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u:"),Ko=o(),u(ha.$$.fragment),Yo=o(),u(ca.$$.fragment),Xo=o(),Is=h("p"),Hv=a("V\xEC v\u1EADy, m\u1EABu \u0111\u1EA7u ti\xEAn trong t\u1EADp hu\u1EA5n luy\u1EC7n \u0111\xE3 tr\u1EDF th\xE0nh hai \u0111\u1EB7c tr\u01B0ng v\xEC n\xF3 \u0111\xE3 \u0111\u01B0\u1EE3c tokenize nhi\u1EC1u h\u01A1n s\u1ED1 l\u01B0\u1EE3ng token t\u1ED1i \u0111a m\xE0 ch\xFAng t\xF4i \u0111\xE3 ch\u1EC9 \u0111\u1ECBnh: c\xE1i \u0111\u1EA7u ti\xEAn c\xF3 \u0111\u1ED9 d\xE0i 128 v\xE0 c\xE1i th\u1EE9 hai c\xF3 \u0111\u1ED9 d\xE0i 49. B\xE2y gi\u1EDD h\xE3y l\xE0m \u0111i\u1EC1u n\xE0y cho t\u1EA5t c\u1EA3 c\xE1c ph\u1EA7n t\u1EED c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u!"),Wo=o(),u(la.$$.fragment),Qo=o(),u(ia.$$.fragment),Zo=o(),Nt=h("p"),Sv=a("\xD4i kh\xF4ng! N\xF3 \u0111\xE3 kh\xF4ng ho\u1EA1t \u0111\u1ED9ng! T\u1EA1i sao kh\xF4ng? Nh\xECn v\xE0o th\xF4ng b\xE1o l\u1ED7i s\u1EBD cho ch\xFAng ta manh m\u1ED1i: c\xF3 s\u1EF1 kh\xF4ng kh\u1EDBp v\u1EC1 \u0111\u1ED9 d\xE0i c\u1EE7a m\u1ED9t trong c\xE1c c\u1ED9t, m\u1ED9t c\u1ED9t c\xF3 \u0111\u1ED9 d\xE0i 1,463 v\xE0 c\u1ED9t c\xF2n l\u1EA1i c\xF3 \u0111\u1ED9 d\xE0i 1,000. N\u1EBFu b\u1EA1n \u0111\xE3 xem "),ra=h("a"),Iv=a("t\xE0i li\u1EC7u"),Mv=a(" v\u1EC1 "),$l=h("code"),Vv=a("Dataset.map()"),Bv=a(", b\u1EA1n c\xF3 th\u1EC3 nh\u1EDB r\u1EB1ng \u0111\xF3 l\xE0 s\u1ED1 c\xE1c m\u1EABu \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o h\xE0m m\xE0 ch\xFAng ta \u0111ang \xE1nh x\u1EA1; \u1EDF \u0111\xE2y 1,000 m\u1EABu \u0111\xF3 \u0111\xE3 cung c\u1EA5p 1,463 \u0111\u1EB7c tr\u01B0ng m\u1EDBi, d\u1EABn \u0111\u1EBFn l\u1ED7i h\xECnh d\u1EA1ng."),tp=o(),nt=h("p"),Lv=a("V\u1EA5n \u0111\u1EC1 l\xE0 ch\xFAng ta \u0111ang c\u1ED1 g\u1EAFng k\u1EBFt h\u1EE3p hai t\u1EADp d\u1EEF li\u1EC7u kh\xE1c nhau v\u1EDBi c\xE1c k\xEDch th\u01B0\u1EDBc kh\xE1c nhau: c\u1ED9t "),kl=h("code"),Rv=a("drug_dataset"),Fv=a(" s\u1EBD c\xF3 m\u1ED9t s\u1ED1 m\u1EABu nh\u1EA5t \u0111\u1ECBnh (l\u1ED7i ph\xEDa ch\xFAng ta l\xE0 1,000), nh\u01B0ng "),yl=h("code"),Gv=a("tokenized_dataset"),Uv=a("  m\xE0 ch\xFAng ta \u0111ang x\xE2y d\u1EF1ng s\u1EBD c\xF3 nhi\u1EC1u h\u01A1n (1,463 trong th\xF4ng b\xE1o l\u1ED7i). \u0110i\u1EC1u n\xE0y kh\xF4ng ho\u1EA1t \u0111\u1ED9ng \u0111\u1ED1i v\u1EDBi "),El=h("code"),Jv=a("Dataset"),Kv=a(", v\xEC v\u1EADy ch\xFAng ta c\u1EA7n x\xF3a c\xE1c c\u1ED9t kh\u1ECFi t\u1EADp d\u1EEF li\u1EC7u c\u0169 ho\u1EB7c l\xE0m cho ch\xFAng c\xF3 c\xF9ng k\xEDch th\u01B0\u1EDBc v\u1EDBi ch\xFAng trong t\u1EADp d\u1EEF li\u1EC7u m\u1EDBi. Ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n \u0111i\u1EC1u \u0111\u1EA7u th\xF4ng qua tham s\u1ED1 "),xl=h("code"),Yv=a("remove_columns"),Xv=a(":"),np=o(),u(oa.$$.fragment),ep=o(),Ms=h("p"),Wv=a("B\xE2y gi\u1EDD n\xF3 ho\u1EA1t \u0111\u1ED9ng m\xE0 kh\xF4ng c\xF3 l\u1ED7i. Ch\xFAng ta c\xF3 th\u1EC3 ki\u1EC3m tra xem t\u1EADp d\u1EEF li\u1EC7u m\u1EDBi c\u1EE7a m\xECnh c\xF3 nhi\u1EC1u ph\u1EA7n t\u1EED h\u01A1n t\u1EADp d\u1EEF li\u1EC7u g\u1ED1c hay kh\xF4ng b\u1EB1ng c\xE1ch so s\xE1nh \u0111\u1ED9 d\xE0i:"),ap=o(),u(pa.$$.fragment),sp=o(),u(da.$$.fragment),hp=o(),At=h("p"),Qv=a("Ch\xFAng t\xF4i \u0111\xE3 \u0111\u1EC1 c\u1EADp r\u1EB1ng ch\xFAng ta c\u0169ng c\xF3 th\u1EC3 gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 chi\u1EC1u d\xE0i kh\xF4ng kh\u1EDBp b\u1EB1ng c\xE1ch l\xE0m cho c\xE1c c\u1ED9t c\u0169 c\xF3 c\xF9ng k\xEDch th\u01B0\u1EDBc v\u1EDBi c\xE1c c\u1ED9t m\u1EDBi. \u0110\u1EC3 th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y, ch\xFAng ta s\u1EBD c\u1EA7n tr\u01B0\u1EDDng "),wl=h("code"),Zv=a("overflow_to_sample_mapping"),t_=a(" m\xE0 tokenizer tr\u1EA3 v\u1EC1 khi ch\xFAng ta \u0111\u1EB7t "),jl=h("code"),n_=a("return_overflowing_tokens=True"),e_=a(". N\xF3 cung c\u1EA5p cho ch\xFAng ta m\u1ED9t \xE1nh x\u1EA1 t\u1EEB m\u1ED9t ch\u1EC9 m\u1EE5c \u0111\u1EB7c tr\u01B0ng m\u1EDBi \u0111\u1EBFn ch\u1EC9 m\u1EE5c c\u1EE7a m\u1EABu m\xE0 n\xF3 b\u1EAFt ngu\u1ED3n t\u1EEB \u0111\xF3. S\u1EED d\u1EE5ng \u0111i\u1EC1u n\xE0y, ch\xFAng ta c\xF3 th\u1EC3 li\xEAn k\u1EBFt m\u1ED7i kh\xF3a c\xF3 trong t\u1EADp d\u1EEF li\u1EC7u ban \u0111\u1EA7u v\u1EDBi m\u1ED9t danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB c\xF3 k\xEDch th\u01B0\u1EDBc ph\xF9 h\u1EE3p b\u1EB1ng c\xE1ch l\u1EB7p l\u1EA1i c\xE1c gi\xE1 tr\u1ECB c\u1EE7a m\u1ED7i v\xED d\u1EE5 nhi\u1EC1u l\u1EA7n khi n\xF3 t\u1EA1o ra c\xE1c \u0111\u1EB7c tr\u01B0ng m\u1EDBi:"),cp=o(),u(ga.$$.fragment),lp=o(),Bn=h("p"),a_=a("Ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y n\xF3 ho\u1EA1t \u0111\u1ED9ng v\u1EDBi "),Dl=h("code"),s_=a("Dataset.map()"),h_=a(" m\xE0 ch\xFAng ta kh\xF4ng c\u1EA7n x\xF3a c\xE1c c\u1ED9t c\u0169:"),ip=o(),u(ua.$$.fragment),rp=o(),u(ma.$$.fragment),op=o(),Vs=h("p"),c_=a("Ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c c\xF9ng s\u1ED1 \u0111\u1EB7c tr\u01B0ng hu\u1EA5n luy\u1EC7n nh\u01B0 tr\u01B0\u1EDBc \u0111\xF3, nh\u01B0ng \u1EDF \u0111\xE2y ta \u0111\xE3 gi\u1EEF l\u1EA1i t\u1EA5t c\u1EA3 c\xE1c tr\u01B0\u1EDDng c\u0169. N\u1EBFu b\u1EA1n c\u1EA7n ch\xFAng \u0111\u1EC3 h\u1EADu x\u1EED l\xFD sau khi \xE1p d\u1EE5ng m\xF4 h\xECnh c\u1EE7a m\xECnh, b\u1EA1n c\xF3 th\u1EC3 mu\u1ED1n s\u1EED d\u1EE5ng ph\u01B0\u01A1ng ph\xE1p n\xE0y."),pp=o(),Ln=h("p"),l_=a(`B\xE2y gi\u1EDD b\u1EA1n \u0111\xE3 th\u1EA5y c\xE1ch \u{1F917} Datasets c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 ti\u1EC1n x\u1EED l\xFD m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u theo nhi\u1EC1u c\xE1ch kh\xE1c nhau. M\u1EB7c d\xF9 c\xE1c ch\u1EE9c n\u0103ng x\u1EED l\xFD c\u1EE7a \u{1F917} Datasets s\u1EBD \u0111\xE1p \u1EE9ng h\u1EA7u h\u1EBFt c\xE1c nhu c\u1EA7u hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh c\u1EE7a b\u1EA1n,
c\xF3 th\u1EC3 \u0111\xF4i khi b\u1EA1n c\u1EA7n chuy\u1EC3n sang Pandas \u0111\u1EC3 truy c\u1EADp c\xE1c t\xEDnh n\u0103ng m\u1EA1nh m\u1EBD h\u01A1n, ch\u1EB3ng h\u1EA1n nh\u01B0  `),Tl=h("code"),i_=a("DataFrame.groupby()"),r_=a(" ho\u1EB7c c\xE1c API c\u1EA5p cao \u0111\u1EC3 tr\u1EF1c quan h\xF3a. May m\u1EAFn thay, \u{1F917} Datasets \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF \u0111\u1EC3 c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c th\u01B0 vi\u1EC7n nh\u01B0 Pandas, NumPy, PyTorch, TensorFlow v\xE0 JAX. Ch\xFAng ta h\xE3y xem c\xE1ch n\xE0y ho\u1EA1t \u0111\u1ED9ng nh\u01B0 th\u1EBF n\xE0o."),dp=o(),rn=h("h2"),Rn=h("a"),ql=h("span"),u(fa.$$.fragment),o_=o(),on=h("span"),p_=a("T\u1EEB "),Cl=h("code"),d_=a("Dataset"),g_=a(" t\u1EDBi "),Ol=h("code"),u_=a("DataFrame"),m_=a(" v\xE0 ng\u01B0\u1EE3c l\u1EA1i"),gp=o(),u(va.$$.fragment),up=o(),dt=h("p"),f_=a("\u0110\u1EC3 cho ph\xE9p chuy\u1EC3n \u0111\u1ED5i gi\u1EEFa c\xE1c th\u01B0 vi\u1EC7n b\xEAn th\u1EE9 ba kh\xE1c nhau, \u{1F917} Datasets cung c\u1EA5p h\xE0m "),Pl=h("code"),v_=a("Dataset.set_format()"),__=a(". H\xE0m n\xE0y ch\u1EC9 thay \u0111\u1ED5i "),zl=h("em"),b_=a("\u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra"),$_=a(" c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, v\xEC v\u1EADy b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng chuy\u1EC3n sang \u0111\u1ECBnh d\u1EA1ng kh\xE1c m\xE0 kh\xF4ng \u1EA3nh h\u01B0\u1EDFng \u0111\u1EBFn "),Nl=h("em"),k_=a("\u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra"),y_=a(" b\xEAn d\u01B0\u1EDBi, \u0111\xF3 l\xE0 Apache Arrow. Vi\u1EC7c \u0111\u1ECBnh d\u1EA1ng \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n t\u1EA1i ch\u1ED7. \u0110\u1EC3 ch\u1EE9ng minh, h\xE3y chuy\u1EC3n \u0111\u1ED5i t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a ch\xFAng t\xF4i th\xE0nh Pandas:"),mp=o(),u(_a.$$.fragment),fp=o(),Fn=h("p"),E_=a("Gi\u1EDD khi ch\xFAng ta truy c\u1EADp c\xE1c ph\u1EA7n t\u1EED c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, ta nh\u1EADn \u0111\u01B0\u1EE3c "),Al=h("code"),x_=a("pandas.DataFrame"),w_=a(" thay v\xEC t\u1EEB \u0111i\u1EC3n:"),vp=o(),u(ba.$$.fragment),_p=o(),Ht=h("table"),Hl=h("thead"),H=h("tr"),bp=h("th"),j_=o(),Sl=h("th"),D_=a("patient_id"),T_=o(),Il=h("th"),q_=a("drugName"),C_=o(),Ml=h("th"),O_=a("condition"),P_=o(),Vl=h("th"),z_=a("review"),N_=o(),Bl=h("th"),A_=a("rating"),H_=o(),Ll=h("th"),S_=a("date"),I_=o(),Rl=h("th"),M_=a("usefulCount"),V_=o(),Fl=h("th"),B_=a("review_length"),L_=o(),pn=h("tbody"),S=h("tr"),Gl=h("th"),R_=a("0"),F_=o(),Ul=h("td"),G_=a("95260"),U_=o(),Jl=h("td"),J_=a("Guanfacine"),K_=o(),Kl=h("td"),Y_=a("adhd"),X_=o(),Yl=h("td"),W_=a('"My son is halfway through his fourth week of Intuniv..."'),Q_=o(),Xl=h("td"),Z_=a("8.0"),t2=o(),Wl=h("td"),n2=a("April 27, 2010"),e2=o(),Ql=h("td"),a2=a("192"),s2=o(),Zl=h("td"),h2=a("141"),c2=o(),I=h("tr"),ti=h("th"),l2=a("1"),i2=o(),ni=h("td"),r2=a("92703"),o2=o(),ei=h("td"),p2=a("Lybrel"),d2=o(),ai=h("td"),g2=a("birth control"),u2=o(),si=h("td"),m2=a('"I used to take another oral contraceptive, which had 21 pill cycle, and was very happy- very light periods, max 5 days, no other side effects..."'),f2=o(),hi=h("td"),v2=a("5.0"),_2=o(),ci=h("td"),b2=a("December 14, 2009"),$2=o(),li=h("td"),k2=a("17"),y2=o(),ii=h("td"),E2=a("134"),x2=o(),M=h("tr"),ri=h("th"),w2=a("2"),j2=o(),oi=h("td"),D2=a("138000"),T2=o(),pi=h("td"),q2=a("Ortho Evra"),C2=o(),di=h("td"),O2=a("birth control"),P2=o(),gi=h("td"),z2=a('"This is my first time using any form of birth control..."'),N2=o(),ui=h("td"),A2=a("8.0"),H2=o(),mi=h("td"),S2=a("November 3, 2015"),I2=o(),fi=h("td"),M2=a("10"),V2=o(),vi=h("td"),B2=a("89"),$p=o(),St=h("p"),L2=a("H\xE3y t\u1EA1o ra m\u1ED9t "),_i=h("code"),R2=a("pandas.DataFrame"),F2=a(" cho to\xE0n b\u1ED9 t\u1EADp hu\u1EA5n luy\u1EC7n b\u1EB1ng c\xE1ch ch\u1ECDn t\u1EA5t c\u1EA3 c\xE1c ph\u1EA7n t\u1EED trong "),bi=h("code"),G2=a('drug_dataset["train"]'),U2=a(":"),kp=o(),u($a.$$.fragment),yp=o(),u(Gn.$$.fragment),Ep=o(),Un=h("p"),J2=a("T\u1EEB \u0111\xE2y, ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng t\u1EA5t c\u1EA3 c\xE1c ch\u1EE9c n\u0103ng c\u1EE7a Pandas m\xE0 ta mu\u1ED1n. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n chu\u1ED7i l\u1EA1 m\u1EAFt \u0111\u1EC3 t\xEDnh to\xE1n ph\xE2n ph\u1ED1i l\u1EDBp gi\u1EEFa c\xE1c "),$i=h("code"),K2=a("condition"),Y2=a(":"),xp=o(),u(ka.$$.fragment),wp=o(),It=h("table"),ki=h("thead"),Mt=h("tr"),jp=h("th"),X2=o(),yi=h("th"),W2=a("condition"),Q2=o(),Ei=h("th"),Z2=a("frequency"),tb=o(),at=h("tbody"),dn=h("tr"),xi=h("th"),nb=a("0"),eb=o(),wi=h("td"),ab=a("birth control"),sb=o(),ji=h("td"),hb=a("27655"),cb=o(),gn=h("tr"),Di=h("th"),lb=a("1"),ib=o(),Ti=h("td"),rb=a("depression"),ob=o(),qi=h("td"),pb=a("8023"),db=o(),un=h("tr"),Ci=h("th"),gb=a("2"),ub=o(),Oi=h("td"),mb=a("acne"),fb=o(),Pi=h("td"),vb=a("5209"),_b=o(),mn=h("tr"),zi=h("th"),bb=a("3"),$b=o(),Ni=h("td"),kb=a("anxiety"),yb=o(),Ai=h("td"),Eb=a("4991"),xb=o(),fn=h("tr"),Hi=h("th"),wb=a("4"),jb=o(),Si=h("td"),Db=a("pain"),Tb=o(),Ii=h("td"),qb=a("4744"),Dp=o(),Vt=h("p"),Cb=a("V\xE0 khi ch\xFAng ta ho\xE0n th\xE0nh ph\xE2n t\xEDch Pandas c\u1EE7a m\xECnh, ch\xFAng ta lu\xF4n c\xF3 th\u1EC3 t\u1EA1o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng "),Mi=h("code"),Ob=a("Dataset"),Pb=a(" m\u1EDBi b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),Vi=h("code"),zb=a("Dataset.from_pandas()"),Nb=a(" nh\u01B0 sau:"),Tp=o(),u(ya.$$.fragment),qp=o(),u(Ea.$$.fragment),Cp=o(),u(Jn.$$.fragment),Op=o(),gt=h("p"),Ab=a("Ph\u1EA7n n\xE0y k\u1EBFt th\xFAc chuy\u1EBFn tham quan c\u1EE7a ch\xFAng ta v\u1EC1 c\xE1c k\u1EF9 thu\u1EADt ti\u1EC1n x\u1EED l\xFD kh\xE1c nhau c\xF3 s\u1EB5n trong \u{1F917} Datasets. \u0110\u1EC3 ho\xE0n thi\u1EC7n ph\u1EA7n n\xE0y, h\xE3y t\u1EA1o m\u1ED9t t\u1EC7p ki\u1EC3m \u0111\u1ECBnh \u0111\u1EC3 chu\u1EA9n b\u1ECB t\u1EADp d\u1EEF li\u1EC7u cho vi\u1EC7c hu\u1EA5n luy\u1EC7n m\u1ED9t tr\xECnh ph\xE2n lo\u1EA1i. Tr\u01B0\u1EDBc khi l\xE0m nh\u01B0 v\u1EADy, ch\xFAng ta s\u1EBD \u0111\u1EB7t l\u1EA1i \u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra c\u1EE7a "),Bi=h("code"),Hb=a("drug_dataset"),Sb=a(" t\u1EEB "),Li=h("code"),Ib=a('"pandas"'),Mb=a(" th\xE0nh "),Ri=h("code"),Vb=a('"arrow"'),Bb=a(":"),Pp=o(),u(xa.$$.fragment),zp=o(),vn=h("h2"),Kn=h("a"),Fi=h("span"),u(wa.$$.fragment),Lb=o(),Gi=h("span"),Rb=a("T\u1EA1o ra m\u1ED9t t\u1EC7p ki\u1EC3m \u0111\u1ECBnh"),Np=o(),Bs=h("p"),Fb=a("M\u1EB7c d\xF9 ch\xFAng ta c\xF3 m\u1ED9t b\u1ED9 d\u1EEF li\u1EC7u ki\u1EC3m th\u1EED c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u0111\u1EC3 \u0111\xE1nh gi\xE1, nh\u01B0ng b\u1EA1n n\xEAn gi\u1EEF nguy\xEAn b\u1ED9 ki\u1EC3m th\u1EED v\xE0 t\u1EA1o m\u1ED9t b\u1ED9 ki\u1EC3m \u0111\u1ECBnh ri\xEAng trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n. Khi b\u1EA1n h\xE0i l\xF2ng v\u1EDBi hi\u1EC7u su\u1EA5t c\u1EE7a c\xE1c m\xF4 h\xECnh c\u1EE7a m\xECnh tr\xEAn b\u1ED9 ki\u1EC3m \u0111\u1ECBnh, b\u1EA1n c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n ki\u1EC3m tra l\u1EA7n cu\u1ED1i \u0111\u1ED1i v\u1EDBi b\u1ED9 ki\u1EC3m th\u1EED. Quy tr\xECnh n\xE0y gi\xFAp gi\u1EA3m thi\u1EC3u r\u1EE7i ro r\u1EB1ng b\u1EA1n s\u1EBD trang b\u1ECB qu\xE1 m\u1EE9c cho b\u1ED9 ki\u1EC3m th\u1EED v\xE0 tri\u1EC3n khai m\u1ED9t m\xF4 h\xECnh kh\xF4ng th\xE0nh c\xF4ng tr\xEAn d\u1EEF li\u1EC7u trong th\u1EBF gi\u1EDBi th\u1EF1c."),Ap=o(),Y=h("p"),Gb=a("\u{1F917} Datasets cung c\u1EA5p m\u1ED9t h\xE0m "),Ui=h("code"),Ub=a("Dataset.train_test_split()"),Jb=a(" d\u1EF1a tr\xEAn t\xEDnh n\u0103ng n\u1ED5i ti\u1EBFng t\u1EEB "),Ji=h("code"),Kb=a("scikit-learn"),Yb=a(". H\xE3y c\xF9ng d\xF9ng n\xF3 \u0111\u1EC3 chia t\u1EADp hu\u1EA5n luy\u1EC7n th\xE0nh c\xE1c t\u1EADp "),Ki=h("code"),Xb=a("train"),Wb=a(" v\xE0 "),Yi=h("code"),Qb=a("validation"),Zb=a(" (ta \u0111\u1EB7t tham s\u1ED1 "),Xi=h("code"),t1=a("seed"),n1=a(" cho m\u1EE5c \u0111\xEDnh t\xE1i t\u1EA1o):"),Hp=o(),u(ja.$$.fragment),Sp=o(),u(Da.$$.fragment),Ip=o(),Yn=h("p"),e1=a("Tuy\u1EC7t v\u1EDDi, ta hi\u1EC7n \u0111\xE3 chu\u1EA9n b\u1ECB m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u s\u1EB5n s\xE0ng \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\u1ED9t s\u1ED1 m\xF4 h\xECnh! Trong "),Ls=h("a"),a1=a("ph\u1EA7n 5"),s1=a(", ch\xFAng t\xF4i s\u1EBD ch\u1EC9 cho b\u1EA1n c\xE1ch t\u1EA3i t\u1EADp d\u1EEF li\u1EC7u l\xEAn Hugging Face Hub, nh\u01B0ng b\xE2y gi\u1EDD h\xE3y quen v\u1EDBi ph\xE2n t\xEDch c\u1EE7a ch\xFAng t\xF4i b\u1EB1ng c\xE1ch xem x\xE9t m\u1ED9t s\u1ED1 c\xE1ch b\u1EA1n c\xF3 th\u1EC3 l\u01B0u t\u1EADp d\u1EEF li\u1EC7u tr\xEAn m\xE1y c\u1EE5c b\u1ED9 c\u1EE7a m\xECnh."),Mp=o(),_n=h("h2"),Xn=h("a"),Wi=h("span"),u(Ta.$$.fragment),h1=o(),Qi=h("span"),c1=a("L\u01B0u m\u1ED9t b\u1ED9 d\u1EEF li\u1EC7u"),Vp=o(),u(qa.$$.fragment),Bp=o(),Rs=h("p"),l1=a("M\u1EB7c d\xF9 \u{1F917} Datasets s\u1EBD l\u01B0u v\xE0o b\u1ED9 nh\u1EDB cache m\u1ECDi t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 t\u1EA3i xu\u1ED1ng v\xE0 c\xE1c ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n tr\xEAn n\xF3, nh\u01B0ng \u0111\xF4i khi b\u1EA1n s\u1EBD mu\u1ED1n l\u01B0u t\u1EADp d\u1EEF li\u1EC7u v\xE0o \u0111\u0129a (v\xED d\u1EE5: trong tr\u01B0\u1EDDng h\u1EE3p b\u1ED9 nh\u1EDB cache b\u1ECB x\xF3a). Nh\u01B0 th\u1EC3 hi\u1EC7n trong b\u1EA3ng b\xEAn d\u01B0\u1EDBi, \u{1F917} Datasets cung c\u1EA5p ba ch\u1EE9c n\u0103ng ch\xEDnh \u0111\u1EC3 l\u01B0u t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n \u1EDF c\xE1c \u0111\u1ECBnh d\u1EA1ng kh\xE1c nhau:"),Lp=o(),Wn=h("table"),Zi=h("thead"),Ca=h("tr"),Fs=h("th"),i1=a("\u0110\u1ECBnh d\u1EA1ng d\u1EEF li\u1EC7u"),r1=o(),Gs=h("th"),o1=a("H\xE0m"),p1=o(),bn=h("tbody"),Oa=h("tr"),Us=h("td"),d1=a("Arrow"),g1=o(),Js=h("td"),tr=h("code"),u1=a("Dataset.save_to_disk()"),m1=o(),Pa=h("tr"),Ks=h("td"),f1=a("CSV"),v1=o(),Ys=h("td"),nr=h("code"),_1=a("Dataset.to_csv()"),b1=o(),za=h("tr"),Xs=h("td"),$1=a("JSON"),k1=o(),Ws=h("td"),er=h("code"),y1=a("Dataset.to_json()"),Rp=o(),Qs=h("p"),E1=a("V\xED d\u1EE5, h\xE3y c\xF9ng l\u01B0u d\u1EEF li\u1EC7u s\u1EA1ch c\u1EE7a ch\xFAng ta v\u1EC1 \u0111\u1ECBnh d\u1EA1ng Arrow:"),Fp=o(),u(Na.$$.fragment),Gp=o(),Zs=h("p"),x1=a("N\xF3 s\u1EBD t\u1EA1o ra m\u1ED9t kho l\u01B0u tr\u1EEF v\u1EDBi c\u1EA5u tr\xFAc nh\u01B0 sau:"),Up=o(),u(Aa.$$.fragment),Jp=o(),ut=h("p"),w1=a("n\u01A1i ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y r\u1EB1ng m\u1ED7i ph\u1EA7n t\xE1ch ra \u0111\u01B0\u1EE3c li\xEAn k\u1EBFt v\u1EDBi b\u1EA3ng "),ar=h("em"),j1=a("dataset.arrow"),D1=a(" c\u1EE7a ri\xEAng n\xF3 v\xE0 m\u1ED9t s\u1ED1 si\xEAu d\u1EEF li\u1EC7u trong "),sr=h("em"),T1=a("dataset_info.json"),q1=a(" v\xE0 "),hr=h("em"),C1=a("state.json"),O1=a(". B\u1EA1n c\xF3 th\u1EC3 coi \u0111\u1ECBnh d\u1EA1ng Arrow nh\u01B0 m\u1ED9t b\u1EA3ng g\u1ED3m c\xE1c c\u1ED9t v\xE0 h\xE0ng \u01B0a th\xEDch \u0111\u01B0\u1EE3c t\u1ED1i \u01B0u h\xF3a \u0111\u1EC3 x\xE2y d\u1EF1ng c\xE1c \u1EE9ng d\u1EE5ng hi\u1EC7u su\u1EA5t cao x\u1EED l\xFD v\xE0 v\u1EADn chuy\u1EC3n c\xE1c t\u1EADp d\u1EEF li\u1EC7u l\u1EDBn."),Kp=o(),Qn=h("p"),P1=a("Sau khi t\u1EADp d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA3i n\xF3 b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),cr=h("code"),z1=a("load_from_disk()"),N1=a(" nh\u01B0 sau:"),Yp=o(),u(Ha.$$.fragment),Xp=o(),u(Sa.$$.fragment),Wp=o(),Zn=h("p"),A1=a("\u0110\u1ED1i v\u1EDBi \u0111\u1ECBnh d\u1EA1ng CSV v\xE0 JSON, ch\xFAng ta ph\u1EA3i l\u01B0u tr\u1EEF t\u1EEBng ph\u1EA7n th\xE0nh m\u1ED9t t\u1EC7p ri\xEAng bi\u1EC7t. M\u1ED9t c\xE1ch \u0111\u1EC3 l\xE0m \u0111i\u1EC1u n\xE0y l\xE0 l\u1EB7p l\u1EA1i c\xE1c kh\xF3a v\xE0 gi\xE1 tr\u1ECB trong \u0111\u1ED1i t\u01B0\u1EE3ng "),lr=h("code"),H1=a("DatasetDict"),S1=a(":"),Qp=o(),u(Ia.$$.fragment),Zp=o(),te=h("p"),I1=a("N\xF3 s\u1EBD l\u01B0u m\u1ED7i ph\u1EA7n d\u1EEF li\u1EC7u v\xE0o"),Ma=h("a"),M1=a("\u0111\u1ECBnh d\u1EA1ng JSON Lines"),V1=a(", n\u01A1i m\u1ED7i d\xF2ng trong b\u1ED9 d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF tr\xEAn m\u1ED9t d\xF2ng JSON. \u0110\xE2y l\xE0 m\u1ED9t v\xED d\u1EE5 v\u1EC1 h\xECnh h\xE0i cua n\xF3:"),td=o(),u(Va.$$.fragment),nd=o(),u(Ba.$$.fragment),ed=o(),ne=h("p"),B1=a("Ch\xFAng ta sau \u0111\xF3 c\xF3 th\u1EC3 s\u1EED d\u1EE5ng c\xE1c k\u1EF9 thu\u1EADt trong "),th=h("a"),L1=a("ph\u1EA7n 2"),R1=a(" \u0111\u1EC3 t\u1EA3i t\u1EC7p JSON nh\u01B0 sau:"),ad=o(),u(La.$$.fragment),sd=o(),nh=h("p"),F1=a("V\xE0 \u0111\xF3 l\xE0 n\xF3 cho chuy\u1EBFn du ngo\u1EA1n c\u1EE7a ch\xFAng ta v\u1EDBi s\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u s\u1EED d\u1EE5ng \u{1F917} Datasets! Gi\u1EDD ta \u0111\xE3 c\xF3 m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 \u0111\u01B0\u1EE3c l\xE0m s\u1EA1ch \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh, \u0111\xE2y l\xE0 m\u1ED9t v\xE0i \xFD t\u01B0\u1EDFng m\xE0 b\u1EA1n c\xF3 th\u1EC3 th\u1EED:"),hd=o(),ee=h("ol"),Ra=h("li"),G1=a("S\u1EED d\u1EE5ng c\xE1c k\u1EF9 thu\u1EADt t\u1EEB "),eh=h("a"),U1=a("Ch\u01B0\u01A1ng 3"),J1=a(" \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\u1ED9t b\u1ED9 ph\xE2n lo\u1EA1i c\xF3 th\u1EC3 d\u1EF1 \u0111o\xE1n t\xECnh tr\u1EA1ng b\u1EC7nh nh\xE2n d\u1EF1a tr\xEAn c\xE1c ph\u1EA3n h\u1ED3i v\u1EC1 thu\u1ED1c."),K1=o(),$n=h("li"),Y1=a("S\u1EED d\u1EE5ng pipeline "),ir=h("code"),X1=a("summarization"),W1=a(" t\u1EEB "),ah=h("a"),Q1=a("Ch\u01B0\u01A1ng 1"),Z1=a(" \u0111\u1EC3 t\u1EA1o c\xE1c b\u1EA3n t\xF3m t\u1EAFt c\xE1c b\xE0i \u0111\xE1nh gi\xE1."),cd=o(),sh=h("p"),t$=a("Ti\u1EBFp theo, ch\xFAng ta s\u1EBD xem x\xE9t c\xE1ch \u{1F917} Datasets c\xF3 th\u1EC3 cho ph\xE9p b\u1EA1n l\xE0m vi\u1EC7c v\u1EDBi nh\u1EEFng t\u1EADp d\u1EEF li\u1EC7u kh\u1ED5ng l\u1ED3 m\xE0 kh\xF4ng l\xE0m h\u1ECFng m\xE1y t\xEDnh x\xE1ch tay c\u1EE7a b\u1EA1n!"),this.h()},l(t){const i=JE('[data-svelte="svelte-1phssyn"]',document.head);d=c(i,"META",{name:!0,content:!0}),i.forEach(e),q=p(t),k=c(t,"H1",{class:!0});var Fa=l(k);w=c(Fa,"A",{id:!0,class:!0,href:!0});var rr=l(w);D=c(rr,"SPAN",{});var or=l(D);m(y.$$.fragment,or),or.forEach(e),rr.forEach(e),j=p(Fa),C=c(Fa,"SPAN",{});var pr=l(C);E=s(pr,"S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u"),pr.forEach(e),Fa.forEach(e),x=p(t),m(P.$$.fragment,t),T=p(t),O=c(t,"P",{});var dr=l(O);J=s(dr,"H\u1EA7u h\u1EBFt th\u1EDDi gian, d\u1EEF li\u1EC7u b\u1EA1n l\xE0m vi\u1EC7c s\u1EBD ch\u01B0a \u0111\u01B0\u1EE3c chu\u1EA9n b\u1ECB ho\xE0n h\u1EA3o cho c\xE1c m\xF4 h\xECnh hu\u1EA5n luy\u1EC7n. Trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD kh\xE1m ph\xE1 c\xE1c t\xEDnh n\u0103ng kh\xE1c nhau m\xE0 \u{1F917} Datasets cung c\u1EA5p \u0111\u1EC3 l\xE0m s\u1EA1ch c\xE1c t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n."),dr.forEach(e),A=p(t),m(z.$$.fragment,t),vt=p(t),B=c(t,"H2",{class:!0});var Ga=l(B);X=c(Ga,"A",{id:!0,class:!0,href:!0});var gr=l(X);st=c(gr,"SPAN",{});var ur=l(st);m(et.$$.fragment,ur),ur.forEach(e),gr.forEach(e),me=p(Ga),Kt=c(Ga,"SPAN",{});var a$=l(Kt);Yt=s(a$,"S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u c\u1EE7a ch\xFAng ta"),a$.forEach(e),Ga.forEach(e),kn=p(t),L=c(t,"P",{});var Bt=l(L);Xt=s(Bt,"T\u01B0\u01A1ng t\u1EF1 nh\u01B0 Pandas, \u{1F917} Datasets cung c\u1EA5p m\u1ED9t s\u1ED1 t\xEDnh n\u0103ng \u0111\u1EC3 thao t\xFAng n\u1ED9i dung c\u1EE7a "),N=c(Bt,"CODE",{});var s$=l(N);Ka=s(s$,"Dataset"),s$.forEach(e),Ya=s(Bt," v\xE0 "),yn=c(Bt,"CODE",{});var h$=l(yn);Xa=s(h$,"DatasetDict"),h$.forEach(e),Wa=s(Bt,". Ch\xFAng ta \u0111\xE3 g\u1EB7p ph\u01B0\u01A1ng th\u1EE9c "),En=c(Bt,"CODE",{});var c$=l(En);Qa=s(c$,"Dataset.map()"),c$.forEach(e),Za=s(Bt," trong "),ts=c(Bt,"A",{href:!0});var l$=l(ts);Rd=s(l$,"Ch\u01B0\u01A1ng 3"),l$.forEach(e),Fd=s(Bt," v\xE0 trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD kh\xE1m ph\xE1 m\u1ED9t s\u1ED1 h\xE0m kh\xE1c theo \xFD c\u1EE7a ch\xFAng ta."),Bt.forEach(e),mr=p(t),$t=c(t,"P",{});var hh=l($t);Gd=s(hh,"\u0110\u1ED1i v\u1EDBi v\xED d\u1EE5 n\xE0y, ch\xFAng t\xF4i s\u1EBD s\u1EED d\u1EE5ng "),fe=c(hh,"A",{href:!0,rel:!0});var i$=l(fe);Ud=s(i$,"B\u1ED9 d\u1EEF li\u1EC7u \u0111\xE1nh gi\xE1 thu\u1ED1c"),i$.forEach(e),Jd=s(hh," \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF tr\xEAn "),ve=c(hh,"A",{href:!0,rel:!0});var r$=l(ve);Kd=s(r$,"Kho l\u01B0u tr\u1EEF H\u1ECDc m\xE1y UC Irvine"),r$.forEach(e),Yd=s(hh,", ch\u1EE9a c\xE1c \u0111\xE1nh gi\xE1 c\u1EE7a b\u1EC7nh nh\xE2n v\u1EC1 c\xE1c lo\u1EA1i thu\u1ED1c kh\xE1c nhau, c\xF9ng v\u1EDBi t\xECnh tr\u1EA1ng \u0111ang \u0111\u01B0\u1EE3c \u0111i\u1EC1u tr\u1ECB v\xE0 x\u1EBFp h\u1EA1ng 10 sao v\u1EC1 m\u1EE9c \u0111\u1ED9 h\xE0i l\xF2ng c\u1EE7a b\u1EC7nh nh\xE2n."),hh.forEach(e),fr=p(t),kt=c(t,"P",{});var ch=l(kt);Xd=s(ch,"Tr\u01B0\u1EDBc ti\xEAn, ch\xFAng ta c\u1EA7n t\u1EA3i xu\u1ED1ng v\xE0 gi\u1EA3i n\xE9n d\u1EEF li\u1EC7u, c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n b\u1EB1ng l\u1EC7nh "),Lh=c(ch,"CODE",{});var o$=l(Lh);Wd=s(o$,"wget"),o$.forEach(e),Qd=s(ch," v\xE0  "),Rh=c(ch,"CODE",{});var p$=l(Rh);Zd=s(p$,"unzip"),p$.forEach(e),tg=s(ch,":"),ch.forEach(e),vr=p(t),m(_e.$$.fragment,t),_r=p(t),ht=c(t,"P",{});var ae=l(ht);ng=s(ae,"V\xEC TSV ch\u1EC9 l\xE0 m\u1ED9t bi\u1EBFn th\u1EC3 c\u1EE7a CSV s\u1EED d\u1EE5ng d\u1EA5u tab thay v\xEC d\u1EA5u ph\u1EA9y l\xE0m d\u1EA5u ph\xE2n c\xE1ch, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA3i c\xE1c t\u1EC7p n\xE0y b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng t\u1EADp l\u1EC7nh t\u1EA3i "),Fh=c(ae,"CODE",{});var d$=l(Fh);eg=s(d$,"csv"),d$.forEach(e),ag=s(ae," v\xE0 ch\u1EC9 \u0111\u1ECBnh \u0111\u1ED1i s\u1ED1 "),Gh=c(ae,"CODE",{});var g$=l(Gh);sg=s(g$,"delimiter"),g$.forEach(e),hg=s(ae," trong h\xE0m "),Uh=c(ae,"CODE",{});var u$=l(Uh);cg=s(u$,"load_dataset()"),u$.forEach(e),lg=s(ae," nh\u01B0 sau:"),ae.forEach(e),br=p(t),m(be.$$.fragment,t),$r=p(t),yt=c(t,"P",{});var lh=l(yt);ig=s(lh,"M\u1ED9t th\u1EF1c ti\u1EC5n khi th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 lo\u1EA1i ph\xE2n t\xEDch d\u1EEF li\u1EC7u n\xE0o l\xE0 l\u1EA5y m\u1ED9t m\u1EABu ng\u1EABu nhi\xEAn nh\u1ECF \u0111\u1EC3 c\xF3 th\u1EC3 c\u1EA3m nh\u1EADn nhanh v\u1EC1 lo\u1EA1i d\u1EEF li\u1EC7u b\u1EA1n \u0111ang l\xE0m vi\u1EC7c. Trong \u{1F917} Datasets, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA1o m\u1ED9t m\u1EABu ng\u1EABu nhi\xEAn b\u1EB1ng c\xE1ch x\xE2u chu\u1ED7i c\xE1c h\xE0m "),Jh=c(lh,"CODE",{});var m$=l(Jh);rg=s(m$,"Dataset.shuffle()"),m$.forEach(e),og=s(lh," v\xE0 "),Kh=c(lh,"CODE",{});var f$=l(Kh);pg=s(f$,"Dataset.select()"),f$.forEach(e),dg=s(lh," v\u1EDBi nhau:"),lh.forEach(e),kr=p(t),m($e.$$.fragment,t),yr=p(t),m(ke.$$.fragment,t),Er=p(t),ct=c(t,"P",{});var se=l(ct);gg=s(se,"L\u01B0u \xFD r\u1EB1ng ch\xFAng ta \u0111\xE3 s\u1EEDa seed trong "),Yh=c(se,"CODE",{});var v$=l(Yh);ug=s(v$,"Dataset.shuffle()"),v$.forEach(e),mg=s(se," cho m\u1EE5c \u0111\xEDch t\xE1i t\u1EA1o.  "),Xh=c(se,"CODE",{});var _$=l(Xh);fg=s(_$,"Dataset.select()"),_$.forEach(e),vg=s(se," mong \u0111\u1EE3i m\u1ED9t ch\u1EC9 s\u1ED1 c\xF3 th\u1EC3 l\u1EB7p l\u1EA1i, v\xEC v\u1EADy ch\xFAng ta truy\u1EC1n v\xE0o kho\u1EA3ng "),Wh=c(se,"CODE",{});var b$=l(Wh);_g=s(b$,"range(1000)"),b$.forEach(e),bg=s(se," \u0111\u1EC3 l\u1EA5y 1,000 m\u1EABu \u0111\u1EA7u ti\xEAn t\u1EEB t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 x\xE1o tr\u1ED9n. T\u1EEB m\u1EABu n\xE0y, ta \u0111\xE3 c\xF3 th\u1EC3 th\u1EA5y m\u1ED9t s\u1ED1 \u0111i\u1EC1u k\u1EF3 qu\u1EB7c trong t\u1EADp d\u1EEF li\u1EC7u:"),se.forEach(e),xr=p(t),Et=c(t,"UL",{});var ih=l(Et);ye=c(ih,"LI",{});var id=l(ye);$g=s(id,"C\u1ED9t "),Qh=c(id,"CODE",{});var $$=l(Qh);kg=s($$,"Unnamed: 0"),$$.forEach(e),yg=s(id,"  tr\xF4ng \u0111\xE1ng ng\u1EDD gi\u1ED1ng nh\u01B0 m\u1ED9t ID \u1EA9n danh cho m\u1ED7i b\u1EC7nh nh\xE2n."),id.forEach(e),Eg=p(ih),Ee=c(ih,"LI",{});var rd=l(Ee);xg=s(rd,"C\u1ED9t "),Zh=c(rd,"CODE",{});var k$=l(Zh);wg=s(k$,"condition"),k$.forEach(e),jg=s(rd," bao g\u1ED3m s\u1EF1 k\u1EBFt h\u1EE3p gi\u1EEFa c\xE1c nh\xE3n ch\u1EEF hoa v\xE0 ch\u1EEF th\u01B0\u1EDDng."),rd.forEach(e),Dg=p(ih),Wt=c(ih,"LI",{});var rh=l(Wt);Tg=s(rh,"C\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \u0111\u1ED9 d\xE0i kh\xE1c nhau v\xE0 ch\u1EE9a h\u1ED7n h\u1EE3p c\xE1c d\u1EA5u ph\xE2n t\xE1ch d\xF2ng Python ("),tc=c(rh,"CODE",{});var y$=l(tc);qg=s(y$,"\\r\\n"),y$.forEach(e),Cg=s(rh,") c\u0169ng nh\u01B0 c\xE1c m\xE3 k\xFD t\u1EF1 HTML nh\u01B0 "),nc=c(rh,"CODE",{});var E$=l(nc);Og=s(E$,"&\\#039;"),E$.forEach(e),Pg=s(rh,"."),rh.forEach(e),ih.forEach(e),wr=p(t),xt=c(t,"P",{});var oh=l(xt);zg=s(oh,"H\xE3y xem c\xE1ch ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u{1F917} Datasets \u0111\u1EC3 gi\u1EA3i quy\u1EBFt t\u1EEBng v\u1EA5n \u0111\u1EC1 n\xE0y. \u0110\u1EC3 ki\u1EC3m tra gi\u1EA3 thuy\u1EBFt ID b\u1EC7nh nh\xE2n cho c\u1ED9t "),ec=c(oh,"CODE",{});var x$=l(ec);Ng=s(x$,"Unnamed: 0"),x$.forEach(e),Ag=s(oh,", ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m  "),ac=c(oh,"CODE",{});var w$=l(ac);Hg=s(w$,"Dataset.unique()"),w$.forEach(e),Sg=s(oh," \u0111\u1EC3 x\xE1c minh r\u1EB1ng s\u1ED1 l\u01B0\u1EE3ng ID kh\u1EDBp v\u1EDBi s\u1ED1 h\xE0ng trong m\u1ED7i l\u1EA7n t\xE1ch:"),oh.forEach(e),jr=p(t),m(xe.$$.fragment,t),Dr=p(t),wt=c(t,"P",{});var ph=l(wt);Ig=s(ph,"\u0110i\u1EC1u n\xE0y d\u01B0\u1EDDng nh\u01B0 x\xE1c nh\u1EADn gi\u1EA3 thuy\u1EBFt c\u1EE7a ch\xFAng t\xF4i, v\xEC v\u1EADy h\xE3y d\u1ECDn d\u1EB9p t\u1EADp d\u1EEF li\u1EC7u m\u1ED9t ch\xFAt b\u1EB1ng c\xE1ch \u0111\u1ED5i t\xEAn c\u1ED9t "),sc=c(ph,"CODE",{});var j$=l(sc);Mg=s(j$,"Unname: 0"),j$.forEach(e),Vg=s(ph," th\xE0nh m\u1ED9t c\xE1i g\xEC \u0111\xF3 d\u1EC5 hi\u1EC3u h\u01A1n m\u1ED9t ch\xFAt. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m "),hc=c(ph,"CODE",{});var D$=l(hc);Bg=s(D$,"DatasetDict.rename_column()"),D$.forEach(e),Lg=s(ph," \u0111\u1EC3 \u0111\u1ED5i t\xEAn c\u1ED9t tr\xEAn c\u1EA3 hai t\u1EADp con trong m\u1ED9t l\u1EA7n:"),ph.forEach(e),Tr=p(t),m(we.$$.fragment,t),qr=p(t),m(je.$$.fragment,t),Cr=p(t),m(xn.$$.fragment,t),Or=p(t),W=c(t,"P",{});var Lt=l(W);Rg=s(Lt,"Ti\u1EBFp theo, h\xE3y chu\u1EA9n h\xF3a t\u1EA5t c\u1EA3 c\xE1c nh\xE3n "),cc=c(Lt,"CODE",{});var T$=l(cc);Fg=s(T$,"condition"),T$.forEach(e),Gg=s(Lt," b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),lc=c(Lt,"CODE",{});var q$=l(lc);Ug=s(q$,"Dataset.map()"),q$.forEach(e),Jg=s(Lt,". Nh\u01B0 ch\xFAng ta \u0111\xE3 l\xE0m v\u1EDBi tokenize trong "),ns=c(Lt,"A",{href:!0});var C$=l(ns);Kg=s(C$,"Ch\u01B0\u01A1ng 3"),C$.forEach(e),Yg=s(Lt,", ch\xFAng ta c\xF3 th\u1EC3 x\xE1c \u0111\u1ECBnh m\u1ED9t h\xE0m \u0111\u01A1n gi\u1EA3n c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c \xE1p d\u1EE5ng tr\xEAn t\u1EA5t c\u1EA3 c\xE1c h\xE0ng c\u1EE7a m\u1ED7i t\u1EADp trong "),ic=c(Lt,"CODE",{});var O$=l(ic);Xg=s(O$,"drug_dataset"),O$.forEach(e),Wg=s(Lt,":"),Lt.forEach(e),Pr=p(t),m(De.$$.fragment,t),zr=p(t),m(Te.$$.fragment,t),Nr=p(t),Q=c(t,"P",{});var Rt=l(Q);Qg=s(Rt,"\u1ED2 kh\xF4ng, ch\xFAng ta \u0111\xE3 g\u1EB7p s\u1EF1 c\u1ED1 v\u1EDBi ch\u1EE9c n\u0103ng n\u1ED1i c\u1EE7a m\xECnh! T\u1EEB l\u1ED7i, ch\xFAng ta c\xF3 th\u1EC3 suy ra r\u1EB1ng m\u1ED9t s\u1ED1 m\u1EE5c nh\u1EADp trong c\u1ED9t "),rc=c(Rt,"CODE",{});var P$=l(rc);Zg=s(P$,"condition"),P$.forEach(e),tu=s(Rt," l\xE0 "),oc=c(Rt,"CODE",{});var z$=l(oc);nu=s(z$,"None"),z$.forEach(e),eu=s(Rt,", kh\xF4ng th\u1EC3 vi\u1EBFt th\u01B0\u1EDDng v\xEC ch\xFAng kh\xF4ng ph\u1EA3i l\xE0 chu\u1ED7i. H\xE3y b\u1ECF c\xE1c h\xE0ng n\xE0y b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),pc=c(Rt,"CODE",{});var N$=l(pc);au=s(N$,"Dataset.filter()"),N$.forEach(e),su=s(Rt,", ho\u1EA1t \u0111\u1ED9ng theo c\xE1ch t\u01B0\u01A1ng t\u1EF1 nh\u01B0 "),dc=c(Rt,"CODE",{});var A$=l(dc);hu=s(A$,"Dataset.map()"),A$.forEach(e),cu=s(Rt," v\xE0 mong \u0111\u1EE3i m\u1ED9t h\xE0m nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t m\u1EABu v\u1EC1 t\u1EADp d\u1EEF li\u1EC7u. Thay v\xEC vi\u1EBFt m\u1ED9t h\xE0m r\xF5 r\xE0ng nh\u01B0:"),Rt.forEach(e),Ar=p(t),m(qe.$$.fragment,t),Hr=p(t),jt=c(t,"P",{});var dh=l(jt);lu=s(dh,"v\xE0 sau \u0111\xF3 ch\u1EA1y "),gc=c(dh,"CODE",{});var H$=l(gc);iu=s(H$,"drug_dataset.filter(filter_nones)"),H$.forEach(e),ru=s(dh,", ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y trong m\u1ED9t d\xF2ng b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng "),uc=c(dh,"EM",{});var S$=l(uc);ou=s(S$,"h\xE0m lambda"),S$.forEach(e),pu=s(dh,". Trong Python, c\xE1c h\xE0m lambda l\xE0 c\xE1c h\xE0m nh\u1ECF m\xE0 b\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a m\xE0 kh\xF4ng c\u1EA7n \u0111\u1EB7t t\xEAn r\xF5 r\xE0ng. Ch\xFAng c\xF3 d\u1EA1ng chung:"),dh.forEach(e),Sr=p(t),m(Ce.$$.fragment,t),Ir=p(t),Z=c(t,"P",{});var Ft=l(Z);du=s(Ft,"\u1EDF \u0111\xE2y "),mc=c(Ft,"CODE",{});var I$=l(mc);gu=s(I$,"lambda"),I$.forEach(e),uu=s(Ft," l\xE0 m\u1ED9t trong nh\u1EEFng "),Oe=c(Ft,"A",{href:!0,rel:!0});var M$=l(Oe);mu=s(M$,"t\u1EEB kh\xF3a"),M$.forEach(e),fu=s(Ft," \u0111\u1EB7c bi\u1EC7t c\u1EE7a Python, "),fc=c(Ft,"CODE",{});var V$=l(fc);vu=s(V$,"<arguments>"),V$.forEach(e),_u=s(Ft," l\xE0 danh s\xE1ch / t\u1EADp h\u1EE3p c\xE1c gi\xE1 tr\u1ECB \u0111\u01B0\u1EE3c ph\xE2n t\xE1ch b\u1EB1ng d\u1EA5u ph\u1EA9y x\xE1c \u0111\u1ECBnh c\xE1c \u0111\u1EA7u v\xE0o cho h\xE0m v\xE0 "),vc=c(Ft,"CODE",{});var B$=l(vc);bu=s(B$,"<expression>"),B$.forEach(e),$u=s(Ft,"  \u0111\u1EA1i di\u1EC7n cho c\xE1c ho\u1EA1t \u0111\u1ED9ng b\u1EA1n mu\u1ED1n th\u1EF1c hi\u1EC7n. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a m\u1ED9t h\xE0m lambda \u0111\u01A1n gi\u1EA3n b\xECnh ph\u01B0\u01A1ng m\u1ED9t s\u1ED1 nh\u01B0 sau:"),Ft.forEach(e),Mr=p(t),m(Pe.$$.fragment,t),Vr=p(t),es=c(t,"P",{});var L$=l(es);ku=s(L$,"\u0110\u1EC3 \xE1p d\u1EE5ng h\xE0m n\xE0y cho m\u1ED9t \u0111\u1EA7u v\xE0o, ch\xFAng ta c\u1EA7n \u0111\u1EB7t n\xF3 v\xE0 \u0111\u1EA7u v\xE0o trong d\u1EA5u ngo\u1EB7c \u0111\u01A1n:"),L$.forEach(e),Br=p(t),m(ze.$$.fragment,t),Lr=p(t),m(Ne.$$.fragment,t),Rr=p(t),as=c(t,"P",{});var R$=l(as);yu=s(R$,"T\u01B0\u01A1ng t\u1EF1, ch\xFAng ta c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a c\xE1c h\xE0m lambda v\u1EDBi nhi\u1EC1u tham s\u1ED1 b\u1EB1ng c\xE1ch ph\xE2n t\xE1ch ch\xFAng b\u1EB1ng d\u1EA5u ph\u1EA9y. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 t\xEDnh di\u1EC7n t\xEDch c\u1EE7a m\u1ED9t tam gi\xE1c nh\u01B0 sau:"),R$.forEach(e),Fr=p(t),m(Ae.$$.fragment,t),Gr=p(t),m(He.$$.fragment,t),Ur=p(t),Dt=c(t,"P",{});var gh=l(Dt);Eu=s(gh,"C\xE1c h\xE0m Lambda r\u1EA5t h\u1EEFu \xEDch khi b\u1EA1n mu\u1ED1n \u0111\u1ECBnh ngh\u0129a c\xE1c h\xE0m nh\u1ECF, s\u1EED d\u1EE5ng m\u1ED9t l\u1EA7n (\u0111\u1EC3 bi\u1EBFt th\xEAm th\xF4ng tin v\u1EC1 ch\xFAng, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n n\xEAn \u0111\u1ECDc "),Se=c(gh,"A",{href:!0,rel:!0});var F$=l(Se);xu=s(F$,"H\u01B0\u1EDBng d\u1EABn Python \u0111\xEDch th\u1EF1c"),F$.forEach(e),wu=s(gh," c\u1EE7a Andre Burgaud). Trong ng\u1EEF c\u1EA3nh \u{1F917} Datasets, ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng c\xE1c h\xE0m lambda \u0111\u1EC3 x\xE1c \u0111\u1ECBnh c\xE1c ho\u1EA1t \u0111\u1ED9ng n\u1ED1i v\xE0 l\u1ECDc \u0111\u01A1n gi\u1EA3n, v\xEC v\u1EADy h\xE3y s\u1EED d\u1EE5ng th\u1EE7 thu\u1EADt n\xE0y \u0111\u1EC3 lo\u1EA1i b\u1ECF c\xE1c ph\u1EA7n "),_c=c(gh,"CODE",{});var G$=l(_c);ju=s(G$,"None"),G$.forEach(e),Du=s(gh," trong t\u1EADp d\u1EEF li\u1EC7u:"),gh.forEach(e),Jr=p(t),m(Ie.$$.fragment,t),Kr=p(t),Tt=c(t,"P",{});var uh=l(Tt);Tu=s(uh,"V\u1EDBi "),bc=c(uh,"CODE",{});var U$=l(bc);qu=s(U$,"None"),U$.forEach(e),Cu=s(uh," \u0111\xE3 b\u1ECB x\xF3a, ch\xFAng ta  c\xF3 th\u1EC3 chu\u1EA9n h\xF3a c\u1ED9t "),$c=c(uh,"CODE",{});var J$=l($c);Ou=s(J$,"condition"),J$.forEach(e),Pu=s(uh,":"),uh.forEach(e),Yr=p(t),m(Me.$$.fragment,t),Xr=p(t),m(Ve.$$.fragment,t),Wr=p(t),ss=c(t,"P",{});var K$=l(ss);zu=s(K$,"N\xF3 ho\u1EA1t \u0111\u1ED9ng! V\u1EADy l\xE0 ch\xFAng ta \u0111\xE3 l\xE0m s\u1EA1ch c\xE1c nh\xE3n, gi\u1EDD ch\xFAng ta h\xE3y xem x\xE9t vi\u1EC7c l\xE0m s\u1EA1ch c\xE1c b\xE0i \u0111\xE1nh gi\xE1."),K$.forEach(e),Qr=p(t),Qt=c(t,"H2",{class:!0});var od=l(Qt);wn=c(od,"A",{id:!0,class:!0,href:!0});var Y$=l(wn);kc=c(Y$,"SPAN",{});var X$=l(kc);m(Be.$$.fragment,X$),X$.forEach(e),Y$.forEach(e),Nu=p(od),yc=c(od,"SPAN",{});var W$=l(yc);Au=s(W$,"T\u1EA1o ra c\xE1c c\u1ED9t m\u1EDBi"),W$.forEach(e),od.forEach(e),Zr=p(t),hs=c(t,"P",{});var Q$=l(hs);Hu=s(Q$,"B\u1EA5t c\u1EE9 khi n\xE0o b\u1EA1n x\u1EED l\xFD c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a kh\xE1ch h\xE0ng, m\u1ED9t ph\u01B0\u01A1ng ph\xE1p hay \u0111\xF3 l\xE0 ki\u1EC3m tra s\u1ED1 l\u01B0\u1EE3ng t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1. B\xE0i \u0111\xE1nh gi\xE1 c\xF3 th\u1EC3 ch\u1EC9 l\xE0 m\u1ED9t t\u1EEB duy nh\u1EA5t nh\u01B0 \u201CTuy\u1EC7t v\u1EDDi!\u201D ho\u1EB7c m\u1ED9t b\xE0i lu\u1EADn \u0111\u1EA7y \u0111\u1EE7 v\u1EDBi h\xE0ng ngh\xECn t\u1EEB, v\xE0 t\xF9y thu\u1ED9c v\xE0o tr\u01B0\u1EDDng h\u1EE3p s\u1EED d\u1EE5ng, b\u1EA1n s\u1EBD c\u1EA7n x\u1EED l\xFD nh\u1EEFng th\xE1i c\u1EF1c n\xE0y theo c\xE1ch kh\xE1c nhau. \u0110\u1EC3 t\xEDnh to\xE1n s\u1ED1 l\u01B0\u1EE3ng t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1, ch\xFAng t\xF4i s\u1EBD s\u1EED d\u1EE5ng ph\u01B0\u01A1ng ph\xE1p ph\u1ECFng \u0111o\xE1n s\u01A1 b\u1ED9 d\u1EF1a tr\xEAn vi\u1EC7c t\xE1ch t\u1EEBng v\u0103n b\u1EA3n theo kho\u1EA3ng tr\u1EAFng."),Q$.forEach(e),to=p(t),cs=c(t,"P",{});var Z$=l(cs);Su=s(Z$,"H\xE3y \u0111\u1ECBnh ngh\u0129a m\u1ED9t h\xE0m \u0111\u01A1n gi\u1EA3n \u0111\u1EBFm s\u1ED1 t\u1EEB trong m\u1ED7i b\xE0i \u0111\xE1nh gi\xE1:"),Z$.forEach(e),no=p(t),m(Le.$$.fragment,t),eo=p(t),K=c(t,"P",{});var mt=l(K);Iu=s(mt,"Kh\xF4ng gi\u1ED1ng nh\u01B0 h\xE0m "),Ec=c(mt,"CODE",{});var tk=l(Ec);Mu=s(tk,"lowercase_condition()"),tk.forEach(e),Vu=s(mt,", "),xc=c(mt,"CODE",{});var nk=l(xc);Bu=s(nk,"compute_review_length()"),nk.forEach(e),Lu=s(mt," tr\u1EA3 v\u1EC1 m\u1ED9t t\u1EEB \u0111i\u1EC3n c\xF3 kh\xF3a kh\xF4ng t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t trong c\xE1c t\xEAn c\u1ED9t trong t\u1EADp d\u1EEF li\u1EC7u. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, khi "),wc=c(mt,"CODE",{});var ek=l(wc);Ru=s(ek,"compute_review_length()"),ek.forEach(e),Fu=s(mt," \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o "),jc=c(mt,"CODE",{});var ak=l(jc);Gu=s(ak,"Dataset.map()"),ak.forEach(e),Uu=s(mt,", n\xF3 s\u1EBD \u0111\u01B0\u1EE3c \xE1p d\u1EE5ng cho t\u1EA5t c\u1EA3 c\xE1c h\xE0ng trong t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EC3 t\u1EA1o c\u1ED9t m\u1EDBi "),Dc=c(mt,"CODE",{});var sk=l(Dc);Ju=s(sk,"review_length"),sk.forEach(e),Ku=s(mt,":"),mt.forEach(e),ao=p(t),m(Re.$$.fragment,t),so=p(t),m(Fe.$$.fragment,t),ho=p(t),qt=c(t,"P",{});var mh=l(qt);Yu=s(mh,"Nh\u01B0 mong \u0111\u1EE3i, ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y c\u1ED9t "),Tc=c(mh,"CODE",{});var hk=l(Tc);Xu=s(hk,"review_length"),hk.forEach(e),Wu=s(mh," \u0111\xE3 \u0111\u01B0\u1EE3c th\xEAm v\xE0o t\u1EADp hu\u1EA5n luy\u1EC7n c\u1EE7a ch\xFAng ta. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EAFp x\u1EBFp c\u1ED9t m\u1EDBi n\xE0y v\u1EDBi "),qc=c(mh,"CODE",{});var ck=l(qc);Qu=s(ck,"Dataset.sort()"),ck.forEach(e),Zu=s(mh," \u0111\u1EC3 xem c\xE1c gi\xE1 tr\u1ECB c\u1EF1c \u0111\u1EA1i tr\xF4ng nh\u01B0 th\u1EBF n\xE0o:"),mh.forEach(e),co=p(t),m(Ge.$$.fragment,t),lo=p(t),m(Ue.$$.fragment,t),io=p(t),ls=c(t,"P",{});var lk=l(ls);tm=s(lk,"Nh\u01B0 ta \u0111\xE3 nghi v\u1EA5n, m\u1ED9t s\u1ED1 \u0111\xE1nh gi\xE1 ch\u1EC9 ch\u1EE9a m\u1ED9t t\u1EEB duy nh\u1EA5t, m\u1EB7c d\xF9 c\xF3 th\u1EC3 \u1ED5n \u0111\u1EC3 ph\xE2n t\xEDch s\u1EAFc th\xE1i, nh\u01B0ng s\u1EBD kh\xF4ng c\xF3 nhi\u1EC1u th\xF4ng tin n\u1EBFu ch\xFAng t\xF4i mu\u1ED1n d\u1EF1 \u0111o\xE1n t\xECnh tr\u1EA1ng b\u1EC7nh."),lk.forEach(e),ro=p(t),m(jn.$$.fragment,t),oo=p(t),Ct=c(t,"P",{});var fh=l(Ct);nm=s(fh,"H\xE3y s\u1EED d\u1EE5ng h\xE0m "),Cc=c(fh,"CODE",{});var ik=l(Cc);em=s(ik,"Dataset.filter()"),ik.forEach(e),am=s(fh," \u0111\u1EC3 x\xF3a c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \xEDt h\u01A1n 30 t\u1EEB. T\u01B0\u01A1ng t\u1EF1 nh\u01B0 nh\u1EEFng g\xEC ch\xFAng ta \u0111\xE3 l\xE0m v\u1EDBi c\u1ED9t "),Oc=c(fh,"CODE",{});var rk=l(Oc);sm=s(rk,"condition"),rk.forEach(e),hm=s(fh,", ch\xFAng ta c\xF3 th\u1EC3 l\u1ECDc ra c\xE1c b\xE0i \u0111\xE1nh gi\xE1 r\u1EA5t ng\u1EAFn b\u1EB1ng c\xE1ch y\xEAu c\u1EA7u c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\xF3 \u0111\u1ED9 d\xE0i tr\xEAn ng\u01B0\u1EE1ng n\xE0y:"),fh.forEach(e),po=p(t),m(Je.$$.fragment,t),go=p(t),m(Ke.$$.fragment,t),uo=p(t),is=c(t,"P",{});var ok=l(is);cm=s(ok,"Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y, \u0111i\u1EC1u n\xE0y \u0111\xE3 lo\u1EA1i b\u1ECF kho\u1EA3ng 15% b\xE0i \u0111\xE1nh gi\xE1 kh\u1ECFi b\u1ED9 hu\u1EA5n luy\u1EC7n v\xE0 ki\u1EC3m th\u1EED ban \u0111\u1EA7u."),ok.forEach(e),mo=p(t),m(Dn.$$.fragment,t),fo=p(t),Tn=c(t,"P",{});var pd=l(Tn);lm=s(pd,"\u0110i\u1EC1u cu\u1ED1i c\xF9ng ch\xFAng ta c\u1EA7n gi\u1EA3i quy\u1EBFt l\xE0 s\u1EF1 hi\u1EC7n di\u1EC7n c\u1EE7a k\xFD t\u1EF1 HTML trong c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a ch\xFAng ta. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\xF4-\u0111un "),Pc=c(pd,"CODE",{});var pk=l(Pc);im=s(pk,"html"),pk.forEach(e),rm=s(pd," c\u1EE7a Python \u0111\u1EC3 lo\u1EA1i b\u1ECF qua c\xE1c k\xFD t\u1EF1 n\xE0y, nh\u01B0 sau:"),pd.forEach(e),vo=p(t),m(Ye.$$.fragment,t),_o=p(t),m(Xe.$$.fragment,t),bo=p(t),qn=c(t,"P",{});var dd=l(qn);om=s(dd,"Ta s\u1EBD s\u1EED d\u1EE5ng "),zc=c(dd,"CODE",{});var dk=l(zc);pm=s(dk,"Dataset.map()"),dk.forEach(e),dm=s(dd," \u0111\u1EC3 h\u1EE7y t\u1EA5t c\u1EA3 c\xE1c k\xFD t\u1EF1 HTML trong kho t\xE0i li\u1EC7u c\u1EE7a m\xECnh:"),dd.forEach(e),$o=p(t),m(We.$$.fragment,t),ko=p(t),Cn=c(t,"P",{});var gd=l(Cn);gm=s(gd,"Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y, ph\u01B0\u01A1ng th\u1EE9c "),Nc=c(gd,"CODE",{});var gk=l(Nc);um=s(gk,"Dataset.map()"),gk.forEach(e),mm=s(gd," kh\xE1 h\u1EEFu \xEDch \u0111\u1EC3 x\u1EED l\xFD d\u1EEF li\u1EC7u - v\xE0 ch\xFAng ta th\u1EADm ch\xED c\xF2n ch\u01B0a r\xF5 t\u1EA5t m\u1ECDi th\u1EE9 m\xE0 n\xF3 c\xF3 th\u1EC3 l\xE0m!"),gd.forEach(e),yo=p(t),Zt=c(t,"H2",{class:!0});var ud=l(Zt);On=c(ud,"A",{id:!0,class:!0,href:!0});var uk=l(On);Ac=c(uk,"SPAN",{});var mk=l(Ac);m(Qe.$$.fragment,mk),mk.forEach(e),uk.forEach(e),fm=p(ud),rs=c(ud,"SPAN",{});var n$=l(rs);vm=s(n$,"Si\xEAu s\u1EE9c m\u1EA1nh c\u1EE7a h\xE0m "),Hc=c(n$,"CODE",{});var fk=l(Hc);_m=s(fk,"map()"),fk.forEach(e),n$.forEach(e),ud.forEach(e),Eo=p(t),lt=c(t,"P",{});var he=l(lt);bm=s(he,"Ph\u01B0\u01A1ng th\u1EE9c "),Sc=c(he,"CODE",{});var vk=l(Sc);$m=s(vk,"Dataset.map ()"),vk.forEach(e),km=s(he," nh\u1EADn tham s\u1ED1 "),Ic=c(he,"CODE",{});var _k=l(Ic);ym=s(_k,"batched"),_k.forEach(e),Em=s(he,", n\u1EBFu \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh "),Mc=c(he,"CODE",{});var bk=l(Mc);xm=s(bk,"True"),bk.forEach(e),wm=s(he,", n\xF3 s\u1EBD g\u1EEDi m\u1ED9t lo\u1EA1t c\xE1c m\u1EABu \u0111\u1EBFn h\xE0m map c\xF9ng m\u1ED9t l\xFAc (ta c\xF3 th\u1EC3 c\u1EA5u h\xECnh k\xEDch th\u01B0\u1EDBc l\xF4 nh\u01B0ng m\u1EB7c \u0111\u1ECBnh l\xE0 1,000). V\xED d\u1EE5: h\xE0m map tr\u01B0\u1EDBc \u0111\xF3 lo\u1EA1i b\u1ECF t\u1EA5t c\u1EA3 HTML \u0111\xE3 m\u1EA5t m\u1ED9t ch\xFAt th\u1EDDi gian \u0111\u1EC3 ch\u1EA1y (b\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECDc th\u1EDDi gian th\u1EF1c hi\u1EC7n t\u1EEB c\xE1c thanh ti\u1EBFn tr\xECnh). Ch\xFAng ta c\xF3 th\u1EC3 t\u0103ng t\u1ED1c \u0111\u1ED9 n\xE0y b\u1EB1ng c\xE1ch x\u1EED l\xFD m\u1ED9t s\u1ED1 ph\u1EA7n t\u1EED c\xF9ng l\xFAc th\xF4ng qua s\u1EED d\u1EE5ng bao h\xE0m."),he.forEach(e),xo=p(t),tt=c(t,"P",{});var Gt=l(tt);jm=s(Gt,"Khi b\u1EA1n ch\u1EC9 \u0111\u1ECBnh "),Vc=c(Gt,"CODE",{});var $k=l(Vc);Dm=s($k,"batched=True"),$k.forEach(e),Tm=s(Gt,", h\xE0m s\u1EBD nh\u1EADn m\u1ED9t t\u1EEB \u0111i\u1EC3n v\u1EDBi c\xE1c tr\u01B0\u1EDDng c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, nh\u01B0ng m\u1ED7i gi\xE1 tr\u1ECB b\xE2y gi\u1EDD l\xE0 m\u1ED9t "),Bc=c(Gt,"EM",{});var kk=l(Bc);qm=s(kk,"danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB"),kk.forEach(e),Cm=s(Gt," v\xE0 kh\xF4ng ch\u1EC9 l\xE0 m\u1ED9t gi\xE1 tr\u1ECB duy nh\u1EA5t. Gi\xE1 tr\u1ECB tr\u1EA3 v\u1EC1 c\u1EE7a "),Lc=c(Gt,"CODE",{});var yk=l(Lc);Om=s(yk,"Dataset.map()"),yk.forEach(e),Pm=s(Gt," ph\u1EA3i gi\u1ED1ng nhau: m\u1ED9t t\u1EEB \u0111i\u1EC3n v\u1EDBi c\xE1c tr\u01B0\u1EDDng ta mu\u1ED1n c\u1EADp nh\u1EADt ho\u1EB7c th\xEAm v\xE0o t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\xE0 m\u1ED9t danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB. V\xED d\u1EE5: \u0111\xE2y l\xE0 m\u1ED9t c\xE1ch kh\xE1c \u0111\u1EC3 h\u1EE7y t\u1EA5t c\u1EA3 c\xE1c k\xFD t\u1EF1 HTML, nh\u01B0ng s\u1EED d\u1EE5ng "),Rc=c(Gt,"CODE",{});var Ek=l(Rc);zm=s(Ek,"batched=True"),Ek.forEach(e),Nm=s(Gt,":"),Gt.forEach(e),wo=p(t),m(Ze.$$.fragment,t),jo=p(t),Ot=c(t,"P",{});var vh=l(Ot);Am=s(vh,"N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y \u0111o\u1EA1n m\xE3 n\xE0y tr\xEAn notebook, b\u1EA1n s\u1EBD th\u1EA5y r\u1EB1ng l\u1EC7nh n\xE0y th\u1EF1c thi nhanh h\u01A1n l\u1EC7nh tr\u01B0\u1EDBc \u0111\xF3. V\xE0 \u0111\xF3 kh\xF4ng ph\u1EA3i l\xE0 do c\xE1c b\xE0i \u0111\xE1nh gi\xE1 c\u1EE7a ch\xFAng t\xF4i \u0111\xE3 \u0111\u01B0\u1EE3c lo\u1EA1i \u0111i HTML - n\u1EBFu b\u1EA1n th\u1EF1c hi\u1EC7n l\u1EA1i h\u01B0\u1EDBng d\u1EABn t\u1EEB ph\u1EA7n tr\u01B0\u1EDBc (kh\xF4ng c\xF3 "),Fc=c(vh,"CODE",{});var xk=l(Fc);Hm=s(xk,"batch = True"),xk.forEach(e),Sm=s(vh,"), n\xF3 s\u1EBD m\u1EA5t c\xF9ng m\u1ED9t kho\u1EA3ng th\u1EDDi gian nh\u01B0 tr\u01B0\u1EDBc. \u0110i\u1EC1u n\xE0y l\xE0 do vi\u1EC7c bao h\xE0m th\u01B0\u1EDDng nhanh h\u01A1n vi\u1EC7c th\u1EF1c thi c\xF9ng m\u1ED9t \u0111o\u1EA1n m\xE3 trong v\xF2ng l\u1EB7p "),Gc=c(vh,"CODE",{});var wk=l(Gc);Im=s(wk,"for"),wk.forEach(e),Mm=s(vh," v\xE0 ch\xFAng ta c\u0169ng \u0111\u1EA1t \u0111\u01B0\u1EE3c m\u1ED9t s\u1ED1 hi\u1EC7u su\u1EA5t b\u1EB1ng c\xE1ch truy c\u1EADp nhi\u1EC1u ph\u1EA7n t\u1EED c\xF9ng m\u1ED9t l\xFAc thay v\xEC t\u1EEBng ph\u1EA7n t\u1EED m\u1ED9t."),vh.forEach(e),Do=p(t),it=c(t,"P",{});var ce=l(it);Vm=s(ce,"S\u1EED d\u1EE5ng "),Uc=c(ce,"CODE",{});var jk=l(Uc);Bm=s(jk,"Dataset.map()"),jk.forEach(e),Lm=s(ce," v\u1EDBi "),Jc=c(ce,"CODE",{});var Dk=l(Jc);Rm=s(Dk,"batched=True"),Dk.forEach(e),Fm=s(ce," s\u1EBD l\xE0 \u0111i\u1EC1u c\u1EA7n thi\u1EBFt \u0111\u1EC3 m\u1EDF kh\xF3a t\u1ED1c \u0111\u1ED9 c\u1EE7a c\xE1c tr\xECnh tokenize \u201Cnhanh\u201D m\xE0 ch\xFAng ta s\u1EBD g\u1EB7p trong "),os=c(ce,"A",{href:!0});var Tk=l(os);Gm=s(Tk,"Ch\u01B0\u01A1ng 6"),Tk.forEach(e),Um=s(ce,", c\xF3 th\u1EC3 nhanh ch\xF3ng tokenize c\xE1c danh s\xE1ch l\u1EDBn c\xE1c v\u0103n b\u1EA3n. V\xED d\u1EE5: \u0111\u1EC3 tokenize t\u1EA5t c\u1EA3 c\xE1c \u0111\xE1nh gi\xE1 thu\u1ED1c b\u1EB1ng tr\xECnh tokenize nhanh, ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\u1ED9t h\xE0m nh\u01B0 sau:"),ce.forEach(e),To=p(t),m(ta.$$.fragment,t),qo=p(t),rt=c(t,"P",{});var le=l(rt);Jm=s(le,"Nh\u01B0 b\u1EA1n \u0111\xE3 th\u1EA5y trong "),ps=c(le,"A",{href:!0});var qk=l(ps);Km=s(qk,"Ch\u01B0\u01A1ng 3"),qk.forEach(e),Ym=s(le,", ch\xFAng ta c\xF3 th\u1EC3 truy\u1EC1n v\xE0o m\u1ED9t ho\u1EB7c nhi\u1EC1u m\u1EABu cho tokenizer, v\xEC v\u1EADy ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng h\xE0m n\xE0y v\u1EDBi "),Kc=c(le,"CODE",{});var Ck=l(Kc);Xm=s(Ck,"batched=True"),Ck.forEach(e),Wm=s(le," ho\u1EB7c kh\xF4ng. H\xE3y c\u0169ng coi \u0111\xE2y l\xE0 m\u1ED9t c\u01A1 h\u1ED9i \u0111\u1EC3 so s\xE1nh hi\u1EC7u n\u0103ng c\u1EE7a hai tu\u1EF3 ch\u1ECDn n\xE0y. Trong m\u1ED9t notebook, b\u1EA1n c\xF3 th\u1EC3 b\u1EA5m gi\u1EDD ch\u1EC9 v\u1EDBi m\u1ED9t d\xF2ng l\u1EC7nh "),Yc=c(le,"CODE",{});var Ok=l(Yc);Qm=s(Ok,"%time"),Ok.forEach(e),Zm=s(le," tr\u01B0\u1EDBc d\xF2ng m\xE3 b\u1EA1n mu\u1ED1n t\xECnh th\u1EDDi gian:"),le.forEach(e),Co=p(t),m(na.$$.fragment,t),Oo=p(t),Pn=c(t,"P",{});var md=l(Pn);tf=s(md,"B\u1EA1n c\u0169ng c\xF3 th\u1EC3 t\xEDnh th\u1EDDi gian cho to\xE0n b\u1ED9 \xF4 b\u1EB1ng c\xE1ch \u0111\u1EB7t "),Xc=c(md,"CODE",{});var Pk=l(Xc);nf=s(Pk,"%%time"),Pk.forEach(e),ef=s(md," \u1EDF \u0111\u1EA7u c\u1EE7a \xF4 m\xE3. Tr\xEAn ph\u1EA7n c\u1EE9ng m\xE0 ch\xFAng ta th\u1EF1c hi\u1EC7n, n\xF3 hi\u1EC3n th\u1ECB 10.8 gi\xE2y cho l\u1EC7nh n\xE0y (\u0111\xF3 l\xE0 s\u1ED1 \u0111\u01B0\u1EE3c vi\u1EBFt sau \u201CWall time\u201D)."),md.forEach(e),Po=p(t),m(zn.$$.fragment,t),zo=p(t),ds=c(t,"P",{});var zk=l(ds);af=s(zk,"D\u01B0\u1EDBi \u0111\xE2y l\xE0 k\u1EBFt qu\u1EA3 thu \u0111\u01B0\u1EE3c khi c\xF3 v\xE0 kh\xF4ng c\xF3 t\xEDnh n\u0103ng ph\xE2n l\xF4, v\u1EDBi tokenizer nhanh v\xE0 ch\u1EADm:"),zk.forEach(e),No=p(t),Nn=c(t,"TABLE",{});var fd=l(Nn);Wc=c(fd,"THEAD",{});var Nk=l(Wc);tn=c(Nk,"TR",{});var _h=l(tn);gs=c(_h,"TH",{align:!0});var Ak=l(gs);sf=s(Ak,"Tu\u1EF3 ch\u1ECDn"),Ak.forEach(e),hf=p(_h),us=c(_h,"TH",{align:!0});var Hk=l(us);cf=s(Hk,"Tokenizer nhanh"),Hk.forEach(e),lf=p(_h),ms=c(_h,"TH",{align:!0});var Sk=l(ms);rf=s(Sk,"Tokenizer ch\u1EADm"),Sk.forEach(e),_h.forEach(e),Nk.forEach(e),of=p(fd),ea=c(fd,"TBODY",{});var vd=l(ea);nn=c(vd,"TR",{});var bh=l(nn);fs=c(bh,"TD",{align:!0});var Ik=l(fs);Qc=c(Ik,"CODE",{});var Mk=l(Qc);pf=s(Mk,"batched=True"),Mk.forEach(e),Ik.forEach(e),df=p(bh),vs=c(bh,"TD",{align:!0});var Vk=l(vs);gf=s(Vk,"10.8s"),Vk.forEach(e),uf=p(bh),_s=c(bh,"TD",{align:!0});var Bk=l(_s);mf=s(Bk,"4min41s"),Bk.forEach(e),bh.forEach(e),ff=p(vd),en=c(vd,"TR",{});var $h=l(en);bs=c($h,"TD",{align:!0});var Lk=l(bs);Zc=c(Lk,"CODE",{});var Rk=l(Zc);vf=s(Rk,"batched=False"),Rk.forEach(e),Lk.forEach(e),_f=p($h),$s=c($h,"TD",{align:!0});var Fk=l($s);bf=s(Fk,"59.2s"),Fk.forEach(e),$f=p($h),ks=c($h,"TD",{align:!0});var Gk=l(ks);kf=s(Gk,"5min3s"),Gk.forEach(e),$h.forEach(e),vd.forEach(e),fd.forEach(e),Ao=p(t),Pt=c(t,"P",{});var kh=l(Pt);yf=s(kh,"\u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 vi\u1EC7c s\u1EED d\u1EE5ng m\u1ED9t tokenizer nhanh v\u1EDBi t\xF9y ch\u1ECDn "),tl=c(kh,"CODE",{});var Uk=l(tl);Ef=s(Uk,"batched=True"),Uk.forEach(e),xf=s(kh," s\u1EBD nhanh h\u01A1n 30 l\u1EA7n so v\u1EDBi phi\xEAn b\u1EA3n ch\u1EADm m\xE0 kh\xF4ng c\xF3 l\xF4 - \u0111i\u1EC1u n\xE0y th\u1EF1c s\u1EF1 tuy\u1EC7t v\u1EDDi! \u0110\xF3 l\xE0 l\xFD do ch\xEDnh t\u1EA1i sao tokenizer nhanh l\xE0 m\u1EB7c \u0111\u1ECBnh khi s\u1EED d\u1EE5ng "),nl=c(kh,"CODE",{});var Jk=l(nl);wf=s(Jk,"AutoTokenizer"),Jk.forEach(e),jf=s(kh," (v\xE0 t\u1EA1i sao ch\xFAng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 \u201Cnhanh\u201D). Ch\xFAng c\xF3 th\u1EC3 \u0111\u1EA1t \u0111\u01B0\u1EE3c t\u1ED1c \u0111\u1ED9 nh\u01B0 v\u1EADy b\u1EDFi v\xEC ph\xEDa sau, \u0111o\u1EA1n m\xE3 token h\xF3a \u0111\u01B0\u1EE3c th\u1EF1c thi b\u1EB1ng Rust, \u0111\xE2y l\xE0 m\u1ED9t ng\xF4n ng\u1EEF gi\xFAp d\u1EC5 d\xE0ng th\u1EF1c hi\u1EC7n \u0111o\u1EA1n m\xE3 song song."),kh.forEach(e),Ho=p(t),ys=c(t,"P",{});var Kk=l(ys);Df=s(Kk,"Song song h\xF3a c\u0169ng l\xE0 l\xFD do gi\u1EA3i th\xEDch cho t\u1ED1c \u0111\u1ED9 t\u0103ng g\u1EA7n g\u1EA5p 6 l\u1EA7n m\xE0 tr\xECnh tokenize nhanh \u0111\u1EA1t \u0111\u01B0\u1EE3c v\u1EDBi vi\u1EC7c ph\xE2n l\xF4: b\u1EA1n kh\xF4ng th\u1EC3 song song m\u1ED9t thao t\xE1c tokenize \u0111\u01A1n l\u1EBB, nh\u01B0ng khi b\u1EA1n mu\u1ED1n tokenize nhi\u1EC1u v\u0103n b\u1EA3n c\xF9ng m\u1ED9t l\xFAc, b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 c\u1EA7n chia nh\u1ECF vi\u1EC7c th\u1EF1c thi tr\xEAn nhi\u1EC1u quy tr\xECnh, m\u1ED7i ng\u01B0\u1EDDi ch\u1ECBu tr\xE1ch nhi\u1EC7m v\u1EC1 c\xE1c v\u0103n b\u1EA3n c\u1EE7a ri\xEAng m\xECnh."),Kk.forEach(e),So=p(t),_t=c(t,"P",{});var Ua=l(_t);el=c(Ua,"CODE",{});var Yk=l(el);Tf=s(Yk,"Dataset.map()"),Yk.forEach(e),qf=s(Ua," c\u0169ng t\u1EF1 c\xF3 m\u1ED9t s\u1ED1 kh\u1EA3 n\u0103ng t\xEDnh to\xE1n song song. V\xEC ch\xFAng kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi Rust, n\xEAn ch\xFAng s\u1EBD kh\xF4ng \u0111\u1EC3 m\u1ED9t tr\xECnh tokenizer ch\u1EADm b\u1EAFt k\u1ECBp v\u1EDBi m\u1ED9t tokenizer nhanh, nh\u01B0ng ch\xFAng v\u1EABn c\xF3 th\u1EC3 h\u1EEFu \xEDch (\u0111\u1EB7c bi\u1EC7t n\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng m\u1ED9t tokenizer kh\xF4ng c\xF3 phi\xEAn b\u1EA3n nhanh). \u0110\u1EC3 b\u1EADt x\u1EED l\xFD \u0111a lu\u1ED3ng, h\xE3y s\u1EED d\u1EE5ng tham s\u1ED1 "),al=c(Ua,"CODE",{});var Xk=l(al);Cf=s(Xk,"num_proc"),Xk.forEach(e),Of=s(Ua," v\xE0 ch\u1EC9 \u0111\u1ECBnh s\u1ED1 l\u01B0\u1EE3ng quy tr\xECnh s\u1EBD s\u1EED d\u1EE5ng trong l\u1EC7nh g\u1ECDi c\u1EE7a b\u1EA1n t\u1EDBi "),sl=c(Ua,"CODE",{});var Wk=l(sl);Pf=s(Wk,"Dataset.map()"),Wk.forEach(e),zf=s(Ua,":"),Ua.forEach(e),Io=p(t),m(aa.$$.fragment,t),Mo=p(t),Es=c(t,"P",{});var Qk=l(Es);Nf=s(Qk,"B\u1EA1n c\xF3 th\u1EC3 th\u1EED nghi\u1EC7m m\u1ED9t ch\xFAt v\u1EDBi th\u1EDDi gian \u0111\u1EC3 x\xE1c \u0111\u1ECBnh s\u1ED1 l\u01B0\u1EE3ng quy tr\xECnh t\u1ED1i \u01B0u \u0111\u1EC3 s\u1EED d\u1EE5ng; trong tr\u01B0\u1EDDng h\u1EE3p c\u1EE7a ch\xFAng ta, 8 d\u01B0\u1EDDng nh\u01B0 t\u1EA1o ra t\u1ED1c \u0111\u1ED9 t\u0103ng t\u1ED1t nh\u1EA5t. D\u01B0\u1EDBi \u0111\xE2y l\xE0 nh\u1EEFng con s\u1ED1 ch\xFAng t\xF4i nh\u1EADn \u0111\u01B0\u1EE3c khi c\xF3 v\xE0 kh\xF4ng c\xF3 x\u1EED l\xFD \u0111a lu\u1ED3ng:"),Qk.forEach(e),Vo=p(t),An=c(t,"TABLE",{});var _d=l(An);hl=c(_d,"THEAD",{});var Zk=l(hl);an=c(Zk,"TR",{});var yh=l(an);xs=c(yh,"TH",{align:!0});var ty=l(xs);Af=s(ty,"Tu\u1EF3 ch\u1ECDn"),ty.forEach(e),Hf=p(yh),ws=c(yh,"TH",{align:!0});var ny=l(ws);Sf=s(ny,"Tokenizer nhanh"),ny.forEach(e),If=p(yh),js=c(yh,"TH",{align:!0});var ey=l(js);Mf=s(ey,"Tokenizer ch\u1EADm"),ey.forEach(e),yh.forEach(e),Zk.forEach(e),Vf=p(_d),bt=c(_d,"TBODY",{});var ie=l(bt);sn=c(ie,"TR",{});var Eh=l(sn);Ds=c(Eh,"TD",{align:!0});var ay=l(Ds);cl=c(ay,"CODE",{});var sy=l(cl);Bf=s(sy,"batched=True"),sy.forEach(e),ay.forEach(e),Lf=p(Eh),Ts=c(Eh,"TD",{align:!0});var hy=l(Ts);Rf=s(hy,"10.8s"),hy.forEach(e),Ff=p(Eh),qs=c(Eh,"TD",{align:!0});var cy=l(qs);Gf=s(cy,"4min41s"),cy.forEach(e),Eh.forEach(e),Uf=p(ie),hn=c(ie,"TR",{});var xh=l(hn);Cs=c(xh,"TD",{align:!0});var ly=l(Cs);ll=c(ly,"CODE",{});var iy=l(ll);Jf=s(iy,"batched=False"),iy.forEach(e),ly.forEach(e),Kf=p(xh),Os=c(xh,"TD",{align:!0});var ry=l(Os);Yf=s(ry,"59.2s"),ry.forEach(e),Xf=p(xh),Ps=c(xh,"TD",{align:!0});var oy=l(Ps);Wf=s(oy,"5min3s"),oy.forEach(e),xh.forEach(e),Qf=p(ie),cn=c(ie,"TR",{});var wh=l(cn);Hn=c(wh,"TD",{align:!0});var bd=l(Hn);il=c(bd,"CODE",{});var py=l(il);Zf=s(py,"batched=True"),py.forEach(e),tv=s(bd,", "),rl=c(bd,"CODE",{});var dy=l(rl);nv=s(dy,"num_proc=8"),dy.forEach(e),bd.forEach(e),ev=p(wh),zs=c(wh,"TD",{align:!0});var gy=l(zs);av=s(gy,"6.52s"),gy.forEach(e),sv=p(wh),Ns=c(wh,"TD",{align:!0});var uy=l(Ns);hv=s(uy,"41.3s"),uy.forEach(e),wh.forEach(e),cv=p(ie),ln=c(ie,"TR",{});var jh=l(ln);Sn=c(jh,"TD",{align:!0});var $d=l(Sn);ol=c($d,"CODE",{});var my=l(ol);lv=s(my,"batched=False"),my.forEach(e),iv=s($d,", "),pl=c($d,"CODE",{});var fy=l(pl);rv=s(fy,"num_proc=8"),fy.forEach(e),$d.forEach(e),ov=p(jh),As=c(jh,"TD",{align:!0});var vy=l(As);pv=s(vy,"9.49s"),vy.forEach(e),dv=p(jh),Hs=c(jh,"TD",{align:!0});var _y=l(Hs);gv=s(_y,"45.2s"),_y.forEach(e),jh.forEach(e),ie.forEach(e),_d.forEach(e),Bo=p(t),ot=c(t,"P",{});var re=l(ot);uv=s(re,"\u0110\xF3 l\xE0 nh\u1EEFng k\u1EBFt qu\u1EA3 h\u1EE3p l\xFD h\u01A1n nhi\u1EC1u \u0111\u1ED1i v\u1EDBi tokenizer ch\u1EADm, nh\u01B0ng hi\u1EC7u su\u1EA5t c\u1EE7a tokenizer nhanh c\u0169ng \u0111\xE3 \u0111\u01B0\u1EE3c c\u1EA3i thi\u1EC7n \u0111\xE1ng k\u1EC3. Tuy nhi\xEAn, l\u01B0u \xFD r\u1EB1ng \u0111i\u1EC1u \u0111\xF3 kh\xF4ng ph\u1EA3i l\xFAc n\xE0o c\u0169ng \u0111\xFAng - \u0111\u1ED1i v\u1EDBi c\xE1c gi\xE1 tr\u1ECB c\u1EE7a "),dl=c(re,"CODE",{});var by=l(dl);mv=s(by,"num_proc"),by.forEach(e),fv=s(re," kh\xE1c 8, c\xE1c th\u1EED nghi\u1EC7m c\u1EE7a ch\xFAng t\xF4i cho th\u1EA5y r\u1EB1ng s\u1EED d\u1EE5ng "),gl=c(re,"CODE",{});var $y=l(gl);vv=s($y,"batched=True"),$y.forEach(e),_v=s(re," m\xE0 kh\xF4ng c\xF3 t\xF9y ch\u1ECDn n\xE0y s\u1EBD nhanh h\u01A1n. N\xF3i chung, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n kh\xF4ng n\xEAn s\u1EED d\u1EE5ng x\u1EED l\xFD \u0111a lu\u1ED3ng Python cho c\xE1c tr\xECnh tokenize nhanh v\u1EDBi "),ul=c(re,"CODE",{});var ky=l(ul);bv=s(ky,"batched=True"),ky.forEach(e),$v=s(re,"."),re.forEach(e),Lo=p(t),m(In.$$.fragment,t),Ro=p(t),pt=c(t,"P",{});var oe=l(pt);kv=s(oe,"T\u1EA5t c\u1EA3 c\xE1c ch\u1EE9c n\u0103ng n\xE0y \u0111\u01B0\u1EE3c c\xF4 \u0111\u1ECDng trong m\u1ED9t ph\u01B0\u01A1ng ph\xE1p \u0111\xE3 kh\xE1 tuy\u1EC7t v\u1EDDi, nh\u01B0ng c\xF2n nhi\u1EC1u h\u01A1n th\u1EBF n\u1EEFa! V\u1EDBi "),ml=c(oe,"CODE",{});var yy=l(ml);yv=s(yy,"Dataset.map()"),yy.forEach(e),Ev=s(oe," v\xE0 "),fl=c(oe,"CODE",{});var Ey=l(fl);xv=s(Ey,"batched=True"),Ey.forEach(e),wv=s(oe,", b\u1EA1n c\xF3 th\u1EC3 thay \u0111\u1ED5i s\u1ED1 l\u01B0\u1EE3ng ph\u1EA7n t\u1EED trong t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh. \u0110i\u1EC1u n\xE0y c\u1EF1c k\u1EF3 h\u1EEFu \xEDch trong nhi\u1EC1u tr\u01B0\u1EDDng h\u1EE3p m\xE0 b\u1EA1n mu\u1ED1n t\u1EA1o m\u1ED9t s\u1ED1 \u0111\u1EB7c tr\u01B0ng hu\u1EA5n luy\u1EC7n t\u1EEB m\u1ED9t m\u1EABu v\xE0 ch\xFAng ta s\u1EBD c\u1EA7n th\u1EF1c hi\u1EC7n \u0111i\u1EC1u n\xE0y nh\u01B0 m\u1ED9t ph\u1EA7n c\u1EE7a qu\xE1 tr\xECnh ti\u1EC1n x\u1EED l\xFD cho m\u1ED9t s\u1ED1 t\xE1c v\u1EE5 NLP s\u1EBD th\u1EF1c hi\u1EC7n trong "),Ss=c(oe,"A",{href:!0});var xy=l(Ss);jv=s(xy,"Ch\u01B0\u01A1ng 7"),xy.forEach(e),Dv=s(oe,"."),oe.forEach(e),Fo=p(t),m(Mn.$$.fragment,t),Go=p(t),zt=c(t,"P",{});var Dh=l(zt);Tv=s(Dh,"Ch\xFAng ta h\xE3y xem n\xF3 ho\u1EA1t \u0111\u1ED9ng nh\u01B0 th\u1EBF n\xE0o! \u1EDE \u0111\xE2y, ta s\u1EBD tokenize c\xE1c m\u1EABu c\u1EE7a m\xECnh v\xE0 c\u1EAFt ch\xFAng v\u1EC1 \u0111\u1ED9 d\xE0i t\u1ED1i \u0111a l\xE0 128, nh\u01B0ng ta s\u1EBD y\xEAu c\u1EA7u tr\xECnh tokenize tr\u1EA3 v\u1EC1 "),vl=c(Dh,"EM",{});var wy=l(vl);qv=s(wy,"t\u1EA5t c\u1EA3"),wy.forEach(e),Cv=s(Dh," c\xE1c \u0111o\u1EA1n v\u0103n b\u1EA3n thay v\xEC ch\u1EC9 \u0111o\u1EA1n v\u0103n b\u1EA3n \u0111\u1EA7u ti\xEAn. \u0110i\u1EC1u n\xE0y c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n v\u1EDBi "),_l=c(Dh,"CODE",{});var jy=l(_l);Ov=s(jy,"return_overflowing_tokens=True"),jy.forEach(e),Pv=s(Dh,":"),Dh.forEach(e),Uo=p(t),m(sa.$$.fragment,t),Jo=p(t),Vn=c(t,"P",{});var kd=l(Vn);zv=s(kd,"H\xE3y ki\u1EC3m tra \u0111i\u1EC1u n\xE0y tr\xEAn m\u1ED9t m\u1EABu tr\u01B0\u1EDBc khi s\u1EED d\u1EE5ng "),bl=c(kd,"CODE",{});var Dy=l(bl);Nv=s(Dy,"Dataset.map()"),Dy.forEach(e),Av=s(kd," tr\xEAn to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u:"),kd.forEach(e),Ko=p(t),m(ha.$$.fragment,t),Yo=p(t),m(ca.$$.fragment,t),Xo=p(t),Is=c(t,"P",{});var Ty=l(Is);Hv=s(Ty,"V\xEC v\u1EADy, m\u1EABu \u0111\u1EA7u ti\xEAn trong t\u1EADp hu\u1EA5n luy\u1EC7n \u0111\xE3 tr\u1EDF th\xE0nh hai \u0111\u1EB7c tr\u01B0ng v\xEC n\xF3 \u0111\xE3 \u0111\u01B0\u1EE3c tokenize nhi\u1EC1u h\u01A1n s\u1ED1 l\u01B0\u1EE3ng token t\u1ED1i \u0111a m\xE0 ch\xFAng t\xF4i \u0111\xE3 ch\u1EC9 \u0111\u1ECBnh: c\xE1i \u0111\u1EA7u ti\xEAn c\xF3 \u0111\u1ED9 d\xE0i 128 v\xE0 c\xE1i th\u1EE9 hai c\xF3 \u0111\u1ED9 d\xE0i 49. B\xE2y gi\u1EDD h\xE3y l\xE0m \u0111i\u1EC1u n\xE0y cho t\u1EA5t c\u1EA3 c\xE1c ph\u1EA7n t\u1EED c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u!"),Ty.forEach(e),Wo=p(t),m(la.$$.fragment,t),Qo=p(t),m(ia.$$.fragment,t),Zo=p(t),Nt=c(t,"P",{});var Th=l(Nt);Sv=s(Th,"\xD4i kh\xF4ng! N\xF3 \u0111\xE3 kh\xF4ng ho\u1EA1t \u0111\u1ED9ng! T\u1EA1i sao kh\xF4ng? Nh\xECn v\xE0o th\xF4ng b\xE1o l\u1ED7i s\u1EBD cho ch\xFAng ta manh m\u1ED1i: c\xF3 s\u1EF1 kh\xF4ng kh\u1EDBp v\u1EC1 \u0111\u1ED9 d\xE0i c\u1EE7a m\u1ED9t trong c\xE1c c\u1ED9t, m\u1ED9t c\u1ED9t c\xF3 \u0111\u1ED9 d\xE0i 1,463 v\xE0 c\u1ED9t c\xF2n l\u1EA1i c\xF3 \u0111\u1ED9 d\xE0i 1,000. N\u1EBFu b\u1EA1n \u0111\xE3 xem "),ra=c(Th,"A",{href:!0,rel:!0});var qy=l(ra);Iv=s(qy,"t\xE0i li\u1EC7u"),qy.forEach(e),Mv=s(Th," v\u1EC1 "),$l=c(Th,"CODE",{});var Cy=l($l);Vv=s(Cy,"Dataset.map()"),Cy.forEach(e),Bv=s(Th,", b\u1EA1n c\xF3 th\u1EC3 nh\u1EDB r\u1EB1ng \u0111\xF3 l\xE0 s\u1ED1 c\xE1c m\u1EABu \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o h\xE0m m\xE0 ch\xFAng ta \u0111ang \xE1nh x\u1EA1; \u1EDF \u0111\xE2y 1,000 m\u1EABu \u0111\xF3 \u0111\xE3 cung c\u1EA5p 1,463 \u0111\u1EB7c tr\u01B0ng m\u1EDBi, d\u1EABn \u0111\u1EBFn l\u1ED7i h\xECnh d\u1EA1ng."),Th.forEach(e),tp=p(t),nt=c(t,"P",{});var Ut=l(nt);Lv=s(Ut,"V\u1EA5n \u0111\u1EC1 l\xE0 ch\xFAng ta \u0111ang c\u1ED1 g\u1EAFng k\u1EBFt h\u1EE3p hai t\u1EADp d\u1EEF li\u1EC7u kh\xE1c nhau v\u1EDBi c\xE1c k\xEDch th\u01B0\u1EDBc kh\xE1c nhau: c\u1ED9t "),kl=c(Ut,"CODE",{});var Oy=l(kl);Rv=s(Oy,"drug_dataset"),Oy.forEach(e),Fv=s(Ut," s\u1EBD c\xF3 m\u1ED9t s\u1ED1 m\u1EABu nh\u1EA5t \u0111\u1ECBnh (l\u1ED7i ph\xEDa ch\xFAng ta l\xE0 1,000), nh\u01B0ng "),yl=c(Ut,"CODE",{});var Py=l(yl);Gv=s(Py,"tokenized_dataset"),Py.forEach(e),Uv=s(Ut,"  m\xE0 ch\xFAng ta \u0111ang x\xE2y d\u1EF1ng s\u1EBD c\xF3 nhi\u1EC1u h\u01A1n (1,463 trong th\xF4ng b\xE1o l\u1ED7i). \u0110i\u1EC1u n\xE0y kh\xF4ng ho\u1EA1t \u0111\u1ED9ng \u0111\u1ED1i v\u1EDBi "),El=c(Ut,"CODE",{});var zy=l(El);Jv=s(zy,"Dataset"),zy.forEach(e),Kv=s(Ut,", v\xEC v\u1EADy ch\xFAng ta c\u1EA7n x\xF3a c\xE1c c\u1ED9t kh\u1ECFi t\u1EADp d\u1EEF li\u1EC7u c\u0169 ho\u1EB7c l\xE0m cho ch\xFAng c\xF3 c\xF9ng k\xEDch th\u01B0\u1EDBc v\u1EDBi ch\xFAng trong t\u1EADp d\u1EEF li\u1EC7u m\u1EDBi. Ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n \u0111i\u1EC1u \u0111\u1EA7u th\xF4ng qua tham s\u1ED1 "),xl=c(Ut,"CODE",{});var Ny=l(xl);Yv=s(Ny,"remove_columns"),Ny.forEach(e),Xv=s(Ut,":"),Ut.forEach(e),np=p(t),m(oa.$$.fragment,t),ep=p(t),Ms=c(t,"P",{});var Ay=l(Ms);Wv=s(Ay,"B\xE2y gi\u1EDD n\xF3 ho\u1EA1t \u0111\u1ED9ng m\xE0 kh\xF4ng c\xF3 l\u1ED7i. Ch\xFAng ta c\xF3 th\u1EC3 ki\u1EC3m tra xem t\u1EADp d\u1EEF li\u1EC7u m\u1EDBi c\u1EE7a m\xECnh c\xF3 nhi\u1EC1u ph\u1EA7n t\u1EED h\u01A1n t\u1EADp d\u1EEF li\u1EC7u g\u1ED1c hay kh\xF4ng b\u1EB1ng c\xE1ch so s\xE1nh \u0111\u1ED9 d\xE0i:"),Ay.forEach(e),ap=p(t),m(pa.$$.fragment,t),sp=p(t),m(da.$$.fragment,t),hp=p(t),At=c(t,"P",{});var qh=l(At);Qv=s(qh,"Ch\xFAng t\xF4i \u0111\xE3 \u0111\u1EC1 c\u1EADp r\u1EB1ng ch\xFAng ta c\u0169ng c\xF3 th\u1EC3 gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 chi\u1EC1u d\xE0i kh\xF4ng kh\u1EDBp b\u1EB1ng c\xE1ch l\xE0m cho c\xE1c c\u1ED9t c\u0169 c\xF3 c\xF9ng k\xEDch th\u01B0\u1EDBc v\u1EDBi c\xE1c c\u1ED9t m\u1EDBi. \u0110\u1EC3 th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y, ch\xFAng ta s\u1EBD c\u1EA7n tr\u01B0\u1EDDng "),wl=c(qh,"CODE",{});var Hy=l(wl);Zv=s(Hy,"overflow_to_sample_mapping"),Hy.forEach(e),t_=s(qh," m\xE0 tokenizer tr\u1EA3 v\u1EC1 khi ch\xFAng ta \u0111\u1EB7t "),jl=c(qh,"CODE",{});var Sy=l(jl);n_=s(Sy,"return_overflowing_tokens=True"),Sy.forEach(e),e_=s(qh,". N\xF3 cung c\u1EA5p cho ch\xFAng ta m\u1ED9t \xE1nh x\u1EA1 t\u1EEB m\u1ED9t ch\u1EC9 m\u1EE5c \u0111\u1EB7c tr\u01B0ng m\u1EDBi \u0111\u1EBFn ch\u1EC9 m\u1EE5c c\u1EE7a m\u1EABu m\xE0 n\xF3 b\u1EAFt ngu\u1ED3n t\u1EEB \u0111\xF3. S\u1EED d\u1EE5ng \u0111i\u1EC1u n\xE0y, ch\xFAng ta c\xF3 th\u1EC3 li\xEAn k\u1EBFt m\u1ED7i kh\xF3a c\xF3 trong t\u1EADp d\u1EEF li\u1EC7u ban \u0111\u1EA7u v\u1EDBi m\u1ED9t danh s\xE1ch c\xE1c gi\xE1 tr\u1ECB c\xF3 k\xEDch th\u01B0\u1EDBc ph\xF9 h\u1EE3p b\u1EB1ng c\xE1ch l\u1EB7p l\u1EA1i c\xE1c gi\xE1 tr\u1ECB c\u1EE7a m\u1ED7i v\xED d\u1EE5 nhi\u1EC1u l\u1EA7n khi n\xF3 t\u1EA1o ra c\xE1c \u0111\u1EB7c tr\u01B0ng m\u1EDBi:"),qh.forEach(e),cp=p(t),m(ga.$$.fragment,t),lp=p(t),Bn=c(t,"P",{});var yd=l(Bn);a_=s(yd,"Ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y n\xF3 ho\u1EA1t \u0111\u1ED9ng v\u1EDBi "),Dl=c(yd,"CODE",{});var Iy=l(Dl);s_=s(Iy,"Dataset.map()"),Iy.forEach(e),h_=s(yd," m\xE0 ch\xFAng ta kh\xF4ng c\u1EA7n x\xF3a c\xE1c c\u1ED9t c\u0169:"),yd.forEach(e),ip=p(t),m(ua.$$.fragment,t),rp=p(t),m(ma.$$.fragment,t),op=p(t),Vs=c(t,"P",{});var My=l(Vs);c_=s(My,"Ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c c\xF9ng s\u1ED1 \u0111\u1EB7c tr\u01B0ng hu\u1EA5n luy\u1EC7n nh\u01B0 tr\u01B0\u1EDBc \u0111\xF3, nh\u01B0ng \u1EDF \u0111\xE2y ta \u0111\xE3 gi\u1EEF l\u1EA1i t\u1EA5t c\u1EA3 c\xE1c tr\u01B0\u1EDDng c\u0169. N\u1EBFu b\u1EA1n c\u1EA7n ch\xFAng \u0111\u1EC3 h\u1EADu x\u1EED l\xFD sau khi \xE1p d\u1EE5ng m\xF4 h\xECnh c\u1EE7a m\xECnh, b\u1EA1n c\xF3 th\u1EC3 mu\u1ED1n s\u1EED d\u1EE5ng ph\u01B0\u01A1ng ph\xE1p n\xE0y."),My.forEach(e),pp=p(t),Ln=c(t,"P",{});var Ed=l(Ln);l_=s(Ed,`B\xE2y gi\u1EDD b\u1EA1n \u0111\xE3 th\u1EA5y c\xE1ch \u{1F917} Datasets c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 ti\u1EC1n x\u1EED l\xFD m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u theo nhi\u1EC1u c\xE1ch kh\xE1c nhau. M\u1EB7c d\xF9 c\xE1c ch\u1EE9c n\u0103ng x\u1EED l\xFD c\u1EE7a \u{1F917} Datasets s\u1EBD \u0111\xE1p \u1EE9ng h\u1EA7u h\u1EBFt c\xE1c nhu c\u1EA7u hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh c\u1EE7a b\u1EA1n,
c\xF3 th\u1EC3 \u0111\xF4i khi b\u1EA1n c\u1EA7n chuy\u1EC3n sang Pandas \u0111\u1EC3 truy c\u1EADp c\xE1c t\xEDnh n\u0103ng m\u1EA1nh m\u1EBD h\u01A1n, ch\u1EB3ng h\u1EA1n nh\u01B0  `),Tl=c(Ed,"CODE",{});var Vy=l(Tl);i_=s(Vy,"DataFrame.groupby()"),Vy.forEach(e),r_=s(Ed," ho\u1EB7c c\xE1c API c\u1EA5p cao \u0111\u1EC3 tr\u1EF1c quan h\xF3a. May m\u1EAFn thay, \u{1F917} Datasets \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF \u0111\u1EC3 c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c th\u01B0 vi\u1EC7n nh\u01B0 Pandas, NumPy, PyTorch, TensorFlow v\xE0 JAX. Ch\xFAng ta h\xE3y xem c\xE1ch n\xE0y ho\u1EA1t \u0111\u1ED9ng nh\u01B0 th\u1EBF n\xE0o."),Ed.forEach(e),dp=p(t),rn=c(t,"H2",{class:!0});var xd=l(rn);Rn=c(xd,"A",{id:!0,class:!0,href:!0});var By=l(Rn);ql=c(By,"SPAN",{});var Ly=l(ql);m(fa.$$.fragment,Ly),Ly.forEach(e),By.forEach(e),o_=p(xd),on=c(xd,"SPAN",{});var Ch=l(on);p_=s(Ch,"T\u1EEB "),Cl=c(Ch,"CODE",{});var Ry=l(Cl);d_=s(Ry,"Dataset"),Ry.forEach(e),g_=s(Ch," t\u1EDBi "),Ol=c(Ch,"CODE",{});var Fy=l(Ol);u_=s(Fy,"DataFrame"),Fy.forEach(e),m_=s(Ch," v\xE0 ng\u01B0\u1EE3c l\u1EA1i"),Ch.forEach(e),xd.forEach(e),gp=p(t),m(va.$$.fragment,t),up=p(t),dt=c(t,"P",{});var pe=l(dt);f_=s(pe,"\u0110\u1EC3 cho ph\xE9p chuy\u1EC3n \u0111\u1ED5i gi\u1EEFa c\xE1c th\u01B0 vi\u1EC7n b\xEAn th\u1EE9 ba kh\xE1c nhau, \u{1F917} Datasets cung c\u1EA5p h\xE0m "),Pl=c(pe,"CODE",{});var Gy=l(Pl);v_=s(Gy,"Dataset.set_format()"),Gy.forEach(e),__=s(pe,". H\xE0m n\xE0y ch\u1EC9 thay \u0111\u1ED5i "),zl=c(pe,"EM",{});var Uy=l(zl);b_=s(Uy,"\u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra"),Uy.forEach(e),$_=s(pe," c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, v\xEC v\u1EADy b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng chuy\u1EC3n sang \u0111\u1ECBnh d\u1EA1ng kh\xE1c m\xE0 kh\xF4ng \u1EA3nh h\u01B0\u1EDFng \u0111\u1EBFn "),Nl=c(pe,"EM",{});var Jy=l(Nl);k_=s(Jy,"\u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra"),Jy.forEach(e),y_=s(pe," b\xEAn d\u01B0\u1EDBi, \u0111\xF3 l\xE0 Apache Arrow. Vi\u1EC7c \u0111\u1ECBnh d\u1EA1ng \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n t\u1EA1i ch\u1ED7. \u0110\u1EC3 ch\u1EE9ng minh, h\xE3y chuy\u1EC3n \u0111\u1ED5i t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a ch\xFAng t\xF4i th\xE0nh Pandas:"),pe.forEach(e),mp=p(t),m(_a.$$.fragment,t),fp=p(t),Fn=c(t,"P",{});var wd=l(Fn);E_=s(wd,"Gi\u1EDD khi ch\xFAng ta truy c\u1EADp c\xE1c ph\u1EA7n t\u1EED c\u1EE7a t\u1EADp d\u1EEF li\u1EC7u, ta nh\u1EADn \u0111\u01B0\u1EE3c "),Al=c(wd,"CODE",{});var Ky=l(Al);x_=s(Ky,"pandas.DataFrame"),Ky.forEach(e),w_=s(wd," thay v\xEC t\u1EEB \u0111i\u1EC3n:"),wd.forEach(e),vp=p(t),m(ba.$$.fragment,t),_p=p(t),Ht=c(t,"TABLE",{border:!0,class:!0});var jd=l(Ht);Hl=c(jd,"THEAD",{});var Yy=l(Hl);H=c(Yy,"TR",{style:!0});var R=l(H);bp=c(R,"TH",{}),l(bp).forEach(e),j_=p(R),Sl=c(R,"TH",{});var Xy=l(Sl);D_=s(Xy,"patient_id"),Xy.forEach(e),T_=p(R),Il=c(R,"TH",{});var Wy=l(Il);q_=s(Wy,"drugName"),Wy.forEach(e),C_=p(R),Ml=c(R,"TH",{});var Qy=l(Ml);O_=s(Qy,"condition"),Qy.forEach(e),P_=p(R),Vl=c(R,"TH",{});var Zy=l(Vl);z_=s(Zy,"review"),Zy.forEach(e),N_=p(R),Bl=c(R,"TH",{});var t7=l(Bl);A_=s(t7,"rating"),t7.forEach(e),H_=p(R),Ll=c(R,"TH",{});var n7=l(Ll);S_=s(n7,"date"),n7.forEach(e),I_=p(R),Rl=c(R,"TH",{});var e7=l(Rl);M_=s(e7,"usefulCount"),e7.forEach(e),V_=p(R),Fl=c(R,"TH",{});var a7=l(Fl);B_=s(a7,"review_length"),a7.forEach(e),R.forEach(e),Yy.forEach(e),L_=p(jd),pn=c(jd,"TBODY",{});var Oh=l(pn);S=c(Oh,"TR",{});var F=l(S);Gl=c(F,"TH",{});var s7=l(Gl);R_=s(s7,"0"),s7.forEach(e),F_=p(F),Ul=c(F,"TD",{});var h7=l(Ul);G_=s(h7,"95260"),h7.forEach(e),U_=p(F),Jl=c(F,"TD",{});var c7=l(Jl);J_=s(c7,"Guanfacine"),c7.forEach(e),K_=p(F),Kl=c(F,"TD",{});var l7=l(Kl);Y_=s(l7,"adhd"),l7.forEach(e),X_=p(F),Yl=c(F,"TD",{});var i7=l(Yl);W_=s(i7,'"My son is halfway through his fourth week of Intuniv..."'),i7.forEach(e),Q_=p(F),Xl=c(F,"TD",{});var r7=l(Xl);Z_=s(r7,"8.0"),r7.forEach(e),t2=p(F),Wl=c(F,"TD",{});var o7=l(Wl);n2=s(o7,"April 27, 2010"),o7.forEach(e),e2=p(F),Ql=c(F,"TD",{});var p7=l(Ql);a2=s(p7,"192"),p7.forEach(e),s2=p(F),Zl=c(F,"TD",{});var d7=l(Zl);h2=s(d7,"141"),d7.forEach(e),F.forEach(e),c2=p(Oh),I=c(Oh,"TR",{});var G=l(I);ti=c(G,"TH",{});var g7=l(ti);l2=s(g7,"1"),g7.forEach(e),i2=p(G),ni=c(G,"TD",{});var u7=l(ni);r2=s(u7,"92703"),u7.forEach(e),o2=p(G),ei=c(G,"TD",{});var m7=l(ei);p2=s(m7,"Lybrel"),m7.forEach(e),d2=p(G),ai=c(G,"TD",{});var f7=l(ai);g2=s(f7,"birth control"),f7.forEach(e),u2=p(G),si=c(G,"TD",{});var v7=l(si);m2=s(v7,'"I used to take another oral contraceptive, which had 21 pill cycle, and was very happy- very light periods, max 5 days, no other side effects..."'),v7.forEach(e),f2=p(G),hi=c(G,"TD",{});var _7=l(hi);v2=s(_7,"5.0"),_7.forEach(e),_2=p(G),ci=c(G,"TD",{});var b7=l(ci);b2=s(b7,"December 14, 2009"),b7.forEach(e),$2=p(G),li=c(G,"TD",{});var $7=l(li);k2=s($7,"17"),$7.forEach(e),y2=p(G),ii=c(G,"TD",{});var k7=l(ii);E2=s(k7,"134"),k7.forEach(e),G.forEach(e),x2=p(Oh),M=c(Oh,"TR",{});var U=l(M);ri=c(U,"TH",{});var y7=l(ri);w2=s(y7,"2"),y7.forEach(e),j2=p(U),oi=c(U,"TD",{});var E7=l(oi);D2=s(E7,"138000"),E7.forEach(e),T2=p(U),pi=c(U,"TD",{});var x7=l(pi);q2=s(x7,"Ortho Evra"),x7.forEach(e),C2=p(U),di=c(U,"TD",{});var w7=l(di);O2=s(w7,"birth control"),w7.forEach(e),P2=p(U),gi=c(U,"TD",{});var j7=l(gi);z2=s(j7,'"This is my first time using any form of birth control..."'),j7.forEach(e),N2=p(U),ui=c(U,"TD",{});var D7=l(ui);A2=s(D7,"8.0"),D7.forEach(e),H2=p(U),mi=c(U,"TD",{});var T7=l(mi);S2=s(T7,"November 3, 2015"),T7.forEach(e),I2=p(U),fi=c(U,"TD",{});var q7=l(fi);M2=s(q7,"10"),q7.forEach(e),V2=p(U),vi=c(U,"TD",{});var C7=l(vi);B2=s(C7,"89"),C7.forEach(e),U.forEach(e),Oh.forEach(e),jd.forEach(e),$p=p(t),St=c(t,"P",{});var Ph=l(St);L2=s(Ph,"H\xE3y t\u1EA1o ra m\u1ED9t "),_i=c(Ph,"CODE",{});var O7=l(_i);R2=s(O7,"pandas.DataFrame"),O7.forEach(e),F2=s(Ph," cho to\xE0n b\u1ED9 t\u1EADp hu\u1EA5n luy\u1EC7n b\u1EB1ng c\xE1ch ch\u1ECDn t\u1EA5t c\u1EA3 c\xE1c ph\u1EA7n t\u1EED trong "),bi=c(Ph,"CODE",{});var P7=l(bi);G2=s(P7,'drug_dataset["train"]'),P7.forEach(e),U2=s(Ph,":"),Ph.forEach(e),kp=p(t),m($a.$$.fragment,t),yp=p(t),m(Gn.$$.fragment,t),Ep=p(t),Un=c(t,"P",{});var Dd=l(Un);J2=s(Dd,"T\u1EEB \u0111\xE2y, ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng t\u1EA5t c\u1EA3 c\xE1c ch\u1EE9c n\u0103ng c\u1EE7a Pandas m\xE0 ta mu\u1ED1n. V\xED d\u1EE5, ch\xFAng ta c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n chu\u1ED7i l\u1EA1 m\u1EAFt \u0111\u1EC3 t\xEDnh to\xE1n ph\xE2n ph\u1ED1i l\u1EDBp gi\u1EEFa c\xE1c "),$i=c(Dd,"CODE",{});var z7=l($i);K2=s(z7,"condition"),z7.forEach(e),Y2=s(Dd,":"),Dd.forEach(e),xp=p(t),m(ka.$$.fragment,t),wp=p(t),It=c(t,"TABLE",{border:!0,class:!0});var Td=l(It);ki=c(Td,"THEAD",{});var N7=l(ki);Mt=c(N7,"TR",{style:!0});var zh=l(Mt);jp=c(zh,"TH",{}),l(jp).forEach(e),X2=p(zh),yi=c(zh,"TH",{});var A7=l(yi);W2=s(A7,"condition"),A7.forEach(e),Q2=p(zh),Ei=c(zh,"TH",{});var H7=l(Ei);Z2=s(H7,"frequency"),H7.forEach(e),zh.forEach(e),N7.forEach(e),tb=p(Td),at=c(Td,"TBODY",{});var Jt=l(at);dn=c(Jt,"TR",{});var Nh=l(dn);xi=c(Nh,"TH",{});var S7=l(xi);nb=s(S7,"0"),S7.forEach(e),eb=p(Nh),wi=c(Nh,"TD",{});var I7=l(wi);ab=s(I7,"birth control"),I7.forEach(e),sb=p(Nh),ji=c(Nh,"TD",{});var M7=l(ji);hb=s(M7,"27655"),M7.forEach(e),Nh.forEach(e),cb=p(Jt),gn=c(Jt,"TR",{});var Ah=l(gn);Di=c(Ah,"TH",{});var V7=l(Di);lb=s(V7,"1"),V7.forEach(e),ib=p(Ah),Ti=c(Ah,"TD",{});var B7=l(Ti);rb=s(B7,"depression"),B7.forEach(e),ob=p(Ah),qi=c(Ah,"TD",{});var L7=l(qi);pb=s(L7,"8023"),L7.forEach(e),Ah.forEach(e),db=p(Jt),un=c(Jt,"TR",{});var Hh=l(un);Ci=c(Hh,"TH",{});var R7=l(Ci);gb=s(R7,"2"),R7.forEach(e),ub=p(Hh),Oi=c(Hh,"TD",{});var F7=l(Oi);mb=s(F7,"acne"),F7.forEach(e),fb=p(Hh),Pi=c(Hh,"TD",{});var G7=l(Pi);vb=s(G7,"5209"),G7.forEach(e),Hh.forEach(e),_b=p(Jt),mn=c(Jt,"TR",{});var Sh=l(mn);zi=c(Sh,"TH",{});var U7=l(zi);bb=s(U7,"3"),U7.forEach(e),$b=p(Sh),Ni=c(Sh,"TD",{});var J7=l(Ni);kb=s(J7,"anxiety"),J7.forEach(e),yb=p(Sh),Ai=c(Sh,"TD",{});var K7=l(Ai);Eb=s(K7,"4991"),K7.forEach(e),Sh.forEach(e),xb=p(Jt),fn=c(Jt,"TR",{});var Ih=l(fn);Hi=c(Ih,"TH",{});var Y7=l(Hi);wb=s(Y7,"4"),Y7.forEach(e),jb=p(Ih),Si=c(Ih,"TD",{});var X7=l(Si);Db=s(X7,"pain"),X7.forEach(e),Tb=p(Ih),Ii=c(Ih,"TD",{});var W7=l(Ii);qb=s(W7,"4744"),W7.forEach(e),Ih.forEach(e),Jt.forEach(e),Td.forEach(e),Dp=p(t),Vt=c(t,"P",{});var Mh=l(Vt);Cb=s(Mh,"V\xE0 khi ch\xFAng ta ho\xE0n th\xE0nh ph\xE2n t\xEDch Pandas c\u1EE7a m\xECnh, ch\xFAng ta lu\xF4n c\xF3 th\u1EC3 t\u1EA1o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng "),Mi=c(Mh,"CODE",{});var Q7=l(Mi);Ob=s(Q7,"Dataset"),Q7.forEach(e),Pb=s(Mh," m\u1EDBi b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),Vi=c(Mh,"CODE",{});var Z7=l(Vi);zb=s(Z7,"Dataset.from_pandas()"),Z7.forEach(e),Nb=s(Mh," nh\u01B0 sau:"),Mh.forEach(e),Tp=p(t),m(ya.$$.fragment,t),qp=p(t),m(Ea.$$.fragment,t),Cp=p(t),m(Jn.$$.fragment,t),Op=p(t),gt=c(t,"P",{});var de=l(gt);Ab=s(de,"Ph\u1EA7n n\xE0y k\u1EBFt th\xFAc chuy\u1EBFn tham quan c\u1EE7a ch\xFAng ta v\u1EC1 c\xE1c k\u1EF9 thu\u1EADt ti\u1EC1n x\u1EED l\xFD kh\xE1c nhau c\xF3 s\u1EB5n trong \u{1F917} Datasets. \u0110\u1EC3 ho\xE0n thi\u1EC7n ph\u1EA7n n\xE0y, h\xE3y t\u1EA1o m\u1ED9t t\u1EC7p ki\u1EC3m \u0111\u1ECBnh \u0111\u1EC3 chu\u1EA9n b\u1ECB t\u1EADp d\u1EEF li\u1EC7u cho vi\u1EC7c hu\u1EA5n luy\u1EC7n m\u1ED9t tr\xECnh ph\xE2n lo\u1EA1i. Tr\u01B0\u1EDBc khi l\xE0m nh\u01B0 v\u1EADy, ch\xFAng ta s\u1EBD \u0111\u1EB7t l\u1EA1i \u0111\u1ECBnh d\u1EA1ng \u0111\u1EA7u ra c\u1EE7a "),Bi=c(de,"CODE",{});var tE=l(Bi);Hb=s(tE,"drug_dataset"),tE.forEach(e),Sb=s(de," t\u1EEB "),Li=c(de,"CODE",{});var nE=l(Li);Ib=s(nE,'"pandas"'),nE.forEach(e),Mb=s(de," th\xE0nh "),Ri=c(de,"CODE",{});var eE=l(Ri);Vb=s(eE,'"arrow"'),eE.forEach(e),Bb=s(de,":"),de.forEach(e),Pp=p(t),m(xa.$$.fragment,t),zp=p(t),vn=c(t,"H2",{class:!0});var qd=l(vn);Kn=c(qd,"A",{id:!0,class:!0,href:!0});var aE=l(Kn);Fi=c(aE,"SPAN",{});var sE=l(Fi);m(wa.$$.fragment,sE),sE.forEach(e),aE.forEach(e),Lb=p(qd),Gi=c(qd,"SPAN",{});var hE=l(Gi);Rb=s(hE,"T\u1EA1o ra m\u1ED9t t\u1EC7p ki\u1EC3m \u0111\u1ECBnh"),hE.forEach(e),qd.forEach(e),Np=p(t),Bs=c(t,"P",{});var cE=l(Bs);Fb=s(cE,"M\u1EB7c d\xF9 ch\xFAng ta c\xF3 m\u1ED9t b\u1ED9 d\u1EEF li\u1EC7u ki\u1EC3m th\u1EED c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u0111\u1EC3 \u0111\xE1nh gi\xE1, nh\u01B0ng b\u1EA1n n\xEAn gi\u1EEF nguy\xEAn b\u1ED9 ki\u1EC3m th\u1EED v\xE0 t\u1EA1o m\u1ED9t b\u1ED9 ki\u1EC3m \u0111\u1ECBnh ri\xEAng trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n. Khi b\u1EA1n h\xE0i l\xF2ng v\u1EDBi hi\u1EC7u su\u1EA5t c\u1EE7a c\xE1c m\xF4 h\xECnh c\u1EE7a m\xECnh tr\xEAn b\u1ED9 ki\u1EC3m \u0111\u1ECBnh, b\u1EA1n c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n ki\u1EC3m tra l\u1EA7n cu\u1ED1i \u0111\u1ED1i v\u1EDBi b\u1ED9 ki\u1EC3m th\u1EED. Quy tr\xECnh n\xE0y gi\xFAp gi\u1EA3m thi\u1EC3u r\u1EE7i ro r\u1EB1ng b\u1EA1n s\u1EBD trang b\u1ECB qu\xE1 m\u1EE9c cho b\u1ED9 ki\u1EC3m th\u1EED v\xE0 tri\u1EC3n khai m\u1ED9t m\xF4 h\xECnh kh\xF4ng th\xE0nh c\xF4ng tr\xEAn d\u1EEF li\u1EC7u trong th\u1EBF gi\u1EDBi th\u1EF1c."),cE.forEach(e),Ap=p(t),Y=c(t,"P",{});var ft=l(Y);Gb=s(ft,"\u{1F917} Datasets cung c\u1EA5p m\u1ED9t h\xE0m "),Ui=c(ft,"CODE",{});var lE=l(Ui);Ub=s(lE,"Dataset.train_test_split()"),lE.forEach(e),Jb=s(ft," d\u1EF1a tr\xEAn t\xEDnh n\u0103ng n\u1ED5i ti\u1EBFng t\u1EEB "),Ji=c(ft,"CODE",{});var iE=l(Ji);Kb=s(iE,"scikit-learn"),iE.forEach(e),Yb=s(ft,". H\xE3y c\xF9ng d\xF9ng n\xF3 \u0111\u1EC3 chia t\u1EADp hu\u1EA5n luy\u1EC7n th\xE0nh c\xE1c t\u1EADp "),Ki=c(ft,"CODE",{});var rE=l(Ki);Xb=s(rE,"train"),rE.forEach(e),Wb=s(ft," v\xE0 "),Yi=c(ft,"CODE",{});var oE=l(Yi);Qb=s(oE,"validation"),oE.forEach(e),Zb=s(ft," (ta \u0111\u1EB7t tham s\u1ED1 "),Xi=c(ft,"CODE",{});var pE=l(Xi);t1=s(pE,"seed"),pE.forEach(e),n1=s(ft," cho m\u1EE5c \u0111\xEDnh t\xE1i t\u1EA1o):"),ft.forEach(e),Hp=p(t),m(ja.$$.fragment,t),Sp=p(t),m(Da.$$.fragment,t),Ip=p(t),Yn=c(t,"P",{});var Cd=l(Yn);e1=s(Cd,"Tuy\u1EC7t v\u1EDDi, ta hi\u1EC7n \u0111\xE3 chu\u1EA9n b\u1ECB m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u s\u1EB5n s\xE0ng \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\u1ED9t s\u1ED1 m\xF4 h\xECnh! Trong "),Ls=c(Cd,"A",{href:!0});var dE=l(Ls);a1=s(dE,"ph\u1EA7n 5"),dE.forEach(e),s1=s(Cd,", ch\xFAng t\xF4i s\u1EBD ch\u1EC9 cho b\u1EA1n c\xE1ch t\u1EA3i t\u1EADp d\u1EEF li\u1EC7u l\xEAn Hugging Face Hub, nh\u01B0ng b\xE2y gi\u1EDD h\xE3y quen v\u1EDBi ph\xE2n t\xEDch c\u1EE7a ch\xFAng t\xF4i b\u1EB1ng c\xE1ch xem x\xE9t m\u1ED9t s\u1ED1 c\xE1ch b\u1EA1n c\xF3 th\u1EC3 l\u01B0u t\u1EADp d\u1EEF li\u1EC7u tr\xEAn m\xE1y c\u1EE5c b\u1ED9 c\u1EE7a m\xECnh."),Cd.forEach(e),Mp=p(t),_n=c(t,"H2",{class:!0});var Od=l(_n);Xn=c(Od,"A",{id:!0,class:!0,href:!0});var gE=l(Xn);Wi=c(gE,"SPAN",{});var uE=l(Wi);m(Ta.$$.fragment,uE),uE.forEach(e),gE.forEach(e),h1=p(Od),Qi=c(Od,"SPAN",{});var mE=l(Qi);c1=s(mE,"L\u01B0u m\u1ED9t b\u1ED9 d\u1EEF li\u1EC7u"),mE.forEach(e),Od.forEach(e),Vp=p(t),m(qa.$$.fragment,t),Bp=p(t),Rs=c(t,"P",{});var fE=l(Rs);l1=s(fE,"M\u1EB7c d\xF9 \u{1F917} Datasets s\u1EBD l\u01B0u v\xE0o b\u1ED9 nh\u1EDB cache m\u1ECDi t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 t\u1EA3i xu\u1ED1ng v\xE0 c\xE1c ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c th\u1EF1c hi\u1EC7n tr\xEAn n\xF3, nh\u01B0ng \u0111\xF4i khi b\u1EA1n s\u1EBD mu\u1ED1n l\u01B0u t\u1EADp d\u1EEF li\u1EC7u v\xE0o \u0111\u0129a (v\xED d\u1EE5: trong tr\u01B0\u1EDDng h\u1EE3p b\u1ED9 nh\u1EDB cache b\u1ECB x\xF3a). Nh\u01B0 th\u1EC3 hi\u1EC7n trong b\u1EA3ng b\xEAn d\u01B0\u1EDBi, \u{1F917} Datasets cung c\u1EA5p ba ch\u1EE9c n\u0103ng ch\xEDnh \u0111\u1EC3 l\u01B0u t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n \u1EDF c\xE1c \u0111\u1ECBnh d\u1EA1ng kh\xE1c nhau:"),fE.forEach(e),Lp=p(t),Wn=c(t,"TABLE",{});var Pd=l(Wn);Zi=c(Pd,"THEAD",{});var vE=l(Zi);Ca=c(vE,"TR",{});var zd=l(Ca);Fs=c(zd,"TH",{align:!0});var _E=l(Fs);i1=s(_E,"\u0110\u1ECBnh d\u1EA1ng d\u1EEF li\u1EC7u"),_E.forEach(e),r1=p(zd),Gs=c(zd,"TH",{align:!0});var bE=l(Gs);o1=s(bE,"H\xE0m"),bE.forEach(e),zd.forEach(e),vE.forEach(e),p1=p(Pd),bn=c(Pd,"TBODY",{});var Vh=l(bn);Oa=c(Vh,"TR",{});var Nd=l(Oa);Us=c(Nd,"TD",{align:!0});var $E=l(Us);d1=s($E,"Arrow"),$E.forEach(e),g1=p(Nd),Js=c(Nd,"TD",{align:!0});var kE=l(Js);tr=c(kE,"CODE",{});var yE=l(tr);u1=s(yE,"Dataset.save_to_disk()"),yE.forEach(e),kE.forEach(e),Nd.forEach(e),m1=p(Vh),Pa=c(Vh,"TR",{});var Ad=l(Pa);Ks=c(Ad,"TD",{align:!0});var EE=l(Ks);f1=s(EE,"CSV"),EE.forEach(e),v1=p(Ad),Ys=c(Ad,"TD",{align:!0});var xE=l(Ys);nr=c(xE,"CODE",{});var wE=l(nr);_1=s(wE,"Dataset.to_csv()"),wE.forEach(e),xE.forEach(e),Ad.forEach(e),b1=p(Vh),za=c(Vh,"TR",{});var Hd=l(za);Xs=c(Hd,"TD",{align:!0});var jE=l(Xs);$1=s(jE,"JSON"),jE.forEach(e),k1=p(Hd),Ws=c(Hd,"TD",{align:!0});var DE=l(Ws);er=c(DE,"CODE",{});var TE=l(er);y1=s(TE,"Dataset.to_json()"),TE.forEach(e),DE.forEach(e),Hd.forEach(e),Vh.forEach(e),Pd.forEach(e),Rp=p(t),Qs=c(t,"P",{});var qE=l(Qs);E1=s(qE,"V\xED d\u1EE5, h\xE3y c\xF9ng l\u01B0u d\u1EEF li\u1EC7u s\u1EA1ch c\u1EE7a ch\xFAng ta v\u1EC1 \u0111\u1ECBnh d\u1EA1ng Arrow:"),qE.forEach(e),Fp=p(t),m(Na.$$.fragment,t),Gp=p(t),Zs=c(t,"P",{});var CE=l(Zs);x1=s(CE,"N\xF3 s\u1EBD t\u1EA1o ra m\u1ED9t kho l\u01B0u tr\u1EEF v\u1EDBi c\u1EA5u tr\xFAc nh\u01B0 sau:"),CE.forEach(e),Up=p(t),m(Aa.$$.fragment,t),Jp=p(t),ut=c(t,"P",{});var ge=l(ut);w1=s(ge,"n\u01A1i ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y r\u1EB1ng m\u1ED7i ph\u1EA7n t\xE1ch ra \u0111\u01B0\u1EE3c li\xEAn k\u1EBFt v\u1EDBi b\u1EA3ng "),ar=c(ge,"EM",{});var OE=l(ar);j1=s(OE,"dataset.arrow"),OE.forEach(e),D1=s(ge," c\u1EE7a ri\xEAng n\xF3 v\xE0 m\u1ED9t s\u1ED1 si\xEAu d\u1EEF li\u1EC7u trong "),sr=c(ge,"EM",{});var PE=l(sr);T1=s(PE,"dataset_info.json"),PE.forEach(e),q1=s(ge," v\xE0 "),hr=c(ge,"EM",{});var zE=l(hr);C1=s(zE,"state.json"),zE.forEach(e),O1=s(ge,". B\u1EA1n c\xF3 th\u1EC3 coi \u0111\u1ECBnh d\u1EA1ng Arrow nh\u01B0 m\u1ED9t b\u1EA3ng g\u1ED3m c\xE1c c\u1ED9t v\xE0 h\xE0ng \u01B0a th\xEDch \u0111\u01B0\u1EE3c t\u1ED1i \u01B0u h\xF3a \u0111\u1EC3 x\xE2y d\u1EF1ng c\xE1c \u1EE9ng d\u1EE5ng hi\u1EC7u su\u1EA5t cao x\u1EED l\xFD v\xE0 v\u1EADn chuy\u1EC3n c\xE1c t\u1EADp d\u1EEF li\u1EC7u l\u1EDBn."),ge.forEach(e),Kp=p(t),Qn=c(t,"P",{});var Sd=l(Qn);P1=s(Sd,"Sau khi t\u1EADp d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u, ch\xFAng ta c\xF3 th\u1EC3 t\u1EA3i n\xF3 b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),cr=c(Sd,"CODE",{});var NE=l(cr);z1=s(NE,"load_from_disk()"),NE.forEach(e),N1=s(Sd," nh\u01B0 sau:"),Sd.forEach(e),Yp=p(t),m(Ha.$$.fragment,t),Xp=p(t),m(Sa.$$.fragment,t),Wp=p(t),Zn=c(t,"P",{});var Id=l(Zn);A1=s(Id,"\u0110\u1ED1i v\u1EDBi \u0111\u1ECBnh d\u1EA1ng CSV v\xE0 JSON, ch\xFAng ta ph\u1EA3i l\u01B0u tr\u1EEF t\u1EEBng ph\u1EA7n th\xE0nh m\u1ED9t t\u1EC7p ri\xEAng bi\u1EC7t. M\u1ED9t c\xE1ch \u0111\u1EC3 l\xE0m \u0111i\u1EC1u n\xE0y l\xE0 l\u1EB7p l\u1EA1i c\xE1c kh\xF3a v\xE0 gi\xE1 tr\u1ECB trong \u0111\u1ED1i t\u01B0\u1EE3ng "),lr=c(Id,"CODE",{});var AE=l(lr);H1=s(AE,"DatasetDict"),AE.forEach(e),S1=s(Id,":"),Id.forEach(e),Qp=p(t),m(Ia.$$.fragment,t),Zp=p(t),te=c(t,"P",{});var Md=l(te);I1=s(Md,"N\xF3 s\u1EBD l\u01B0u m\u1ED7i ph\u1EA7n d\u1EEF li\u1EC7u v\xE0o"),Ma=c(Md,"A",{href:!0,rel:!0});var HE=l(Ma);M1=s(HE,"\u0111\u1ECBnh d\u1EA1ng JSON Lines"),HE.forEach(e),V1=s(Md,", n\u01A1i m\u1ED7i d\xF2ng trong b\u1ED9 d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF tr\xEAn m\u1ED9t d\xF2ng JSON. \u0110\xE2y l\xE0 m\u1ED9t v\xED d\u1EE5 v\u1EC1 h\xECnh h\xE0i cua n\xF3:"),Md.forEach(e),td=p(t),m(Va.$$.fragment,t),nd=p(t),m(Ba.$$.fragment,t),ed=p(t),ne=c(t,"P",{});var Vd=l(ne);B1=s(Vd,"Ch\xFAng ta sau \u0111\xF3 c\xF3 th\u1EC3 s\u1EED d\u1EE5ng c\xE1c k\u1EF9 thu\u1EADt trong "),th=c(Vd,"A",{href:!0});var SE=l(th);L1=s(SE,"ph\u1EA7n 2"),SE.forEach(e),R1=s(Vd," \u0111\u1EC3 t\u1EA3i t\u1EC7p JSON nh\u01B0 sau:"),Vd.forEach(e),ad=p(t),m(La.$$.fragment,t),sd=p(t),nh=c(t,"P",{});var IE=l(nh);F1=s(IE,"V\xE0 \u0111\xF3 l\xE0 n\xF3 cho chuy\u1EBFn du ngo\u1EA1n c\u1EE7a ch\xFAng ta v\u1EDBi s\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u s\u1EED d\u1EE5ng \u{1F917} Datasets! Gi\u1EDD ta \u0111\xE3 c\xF3 m\u1ED9t t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 \u0111\u01B0\u1EE3c l\xE0m s\u1EA1ch \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh, \u0111\xE2y l\xE0 m\u1ED9t v\xE0i \xFD t\u01B0\u1EDFng m\xE0 b\u1EA1n c\xF3 th\u1EC3 th\u1EED:"),IE.forEach(e),hd=p(t),ee=c(t,"OL",{});var Bd=l(ee);Ra=c(Bd,"LI",{});var Ld=l(Ra);G1=s(Ld,"S\u1EED d\u1EE5ng c\xE1c k\u1EF9 thu\u1EADt t\u1EEB "),eh=c(Ld,"A",{href:!0});var ME=l(eh);U1=s(ME,"Ch\u01B0\u01A1ng 3"),ME.forEach(e),J1=s(Ld," \u0111\u1EC3 hu\u1EA5n luy\u1EC7n m\u1ED9t b\u1ED9 ph\xE2n lo\u1EA1i c\xF3 th\u1EC3 d\u1EF1 \u0111o\xE1n t\xECnh tr\u1EA1ng b\u1EC7nh nh\xE2n d\u1EF1a tr\xEAn c\xE1c ph\u1EA3n h\u1ED3i v\u1EC1 thu\u1ED1c."),Ld.forEach(e),K1=p(Bd),$n=c(Bd,"LI",{});var Bh=l($n);Y1=s(Bh,"S\u1EED d\u1EE5ng pipeline "),ir=c(Bh,"CODE",{});var VE=l(ir);X1=s(VE,"summarization"),VE.forEach(e),W1=s(Bh," t\u1EEB "),ah=c(Bh,"A",{href:!0});var BE=l(ah);Q1=s(BE,"Ch\u01B0\u01A1ng 1"),BE.forEach(e),Z1=s(Bh," \u0111\u1EC3 t\u1EA1o c\xE1c b\u1EA3n t\xF3m t\u1EAFt c\xE1c b\xE0i \u0111\xE1nh gi\xE1."),Bh.forEach(e),Bd.forEach(e),cd=p(t),sh=c(t,"P",{});var LE=l(sh);t$=s(LE,"Ti\u1EBFp theo, ch\xFAng ta s\u1EBD xem x\xE9t c\xE1ch \u{1F917} Datasets c\xF3 th\u1EC3 cho ph\xE9p b\u1EA1n l\xE0m vi\u1EC7c v\u1EDBi nh\u1EEFng t\u1EADp d\u1EEF li\u1EC7u kh\u1ED5ng l\u1ED3 m\xE0 kh\xF4ng l\xE0m h\u1ECFng m\xE1y t\xEDnh x\xE1ch tay c\u1EE7a b\u1EA1n!"),LE.forEach(e),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(hx)),g(w,"id","sp-xp-d-liu"),g(w,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(w,"href","#sp-xp-d-liu"),g(k,"class","relative group"),g(X,"id","sp-xp-d-liu-ca-chng-ta"),g(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(X,"href","#sp-xp-d-liu-ca-chng-ta"),g(B,"class","relative group"),g(ts,"href","/course/chapter3"),g(fe,"href","https://archive.ics.uci.edu/ml/datasets/Drug+Review+Dataset+%28Drugs.com%29"),g(fe,"rel","nofollow"),g(ve,"href","https://archive.ics.uci.edu/ml/index.php"),g(ve,"rel","nofollow"),g(ns,"href","/course/chapter3"),g(Oe,"href","https://docs.python.org/3/reference/lexical_analysis.html#keywords"),g(Oe,"rel","nofollow"),g(Se,"href","https://realpython.com/python-lambda/"),g(Se,"rel","nofollow"),g(wn,"id","to-ra-cc-ct-mi"),g(wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(wn,"href","#to-ra-cc-ct-mi"),g(Qt,"class","relative group"),g(On,"id","siu-sc-mnh-ca-hm-map"),g(On,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(On,"href","#siu-sc-mnh-ca-hm-map"),g(Zt,"class","relative group"),g(os,"href","/course/chap6"),g(ps,"href","/course/chapter3"),g(gs,"align","center"),g(us,"align","center"),g(ms,"align","center"),g(fs,"align","center"),g(vs,"align","center"),g(_s,"align","center"),g(bs,"align","center"),g($s,"align","center"),g(ks,"align","center"),g(xs,"align","center"),g(ws,"align","center"),g(js,"align","center"),g(Ds,"align","center"),g(Ts,"align","center"),g(qs,"align","center"),g(Cs,"align","center"),g(Os,"align","center"),g(Ps,"align","center"),g(Hn,"align","center"),g(zs,"align","center"),g(Ns,"align","center"),g(Sn,"align","center"),g(As,"align","center"),g(Hs,"align","center"),g(Ss,"href","/course/chapter7"),g(ra,"href","https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.map"),g(ra,"rel","nofollow"),g(Rn,"id","t-dataset-ti-dataframe-v-ngc-li"),g(Rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Rn,"href","#t-dataset-ti-dataframe-v-ngc-li"),g(rn,"class","relative group"),RE(H,"text-align","right"),g(Ht,"border","1"),g(Ht,"class","dataframe"),RE(Mt,"text-align","right"),g(It,"border","1"),g(It,"class","dataframe"),g(Kn,"id","to-ra-mt-tp-kim-nh"),g(Kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Kn,"href","#to-ra-mt-tp-kim-nh"),g(vn,"class","relative group"),g(Ls,"href","/course/chapter5/5"),g(Xn,"id","lu-mt-b-d-liu"),g(Xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Xn,"href","#lu-mt-b-d-liu"),g(_n,"class","relative group"),g(Fs,"align","center"),g(Gs,"align","center"),g(Us,"align","center"),g(Js,"align","center"),g(Ks,"align","center"),g(Ys,"align","center"),g(Xs,"align","center"),g(Ws,"align","center"),g(Ma,"href","https://jsonlines.org"),g(Ma,"rel","nofollow"),g(th,"href","/course/chapter5/2"),g(eh,"href","/course/chapter3"),g(ah,"href","/course/chapter1")},m(t,i){n(document.head,d),r(t,q,i),r(t,k,i),n(k,w),n(w,D),f(y,D,null),n(k,j),n(k,C),n(C,E),r(t,x,i),f(P,t,i),r(t,T,i),r(t,O,i),n(O,J),r(t,A,i),f(z,t,i),r(t,vt,i),r(t,B,i),n(B,X),n(X,st),f(et,st,null),n(B,me),n(B,Kt),n(Kt,Yt),r(t,kn,i),r(t,L,i),n(L,Xt),n(L,N),n(N,Ka),n(L,Ya),n(L,yn),n(yn,Xa),n(L,Wa),n(L,En),n(En,Qa),n(L,Za),n(L,ts),n(ts,Rd),n(L,Fd),r(t,mr,i),r(t,$t,i),n($t,Gd),n($t,fe),n(fe,Ud),n($t,Jd),n($t,ve),n(ve,Kd),n($t,Yd),r(t,fr,i),r(t,kt,i),n(kt,Xd),n(kt,Lh),n(Lh,Wd),n(kt,Qd),n(kt,Rh),n(Rh,Zd),n(kt,tg),r(t,vr,i),f(_e,t,i),r(t,_r,i),r(t,ht,i),n(ht,ng),n(ht,Fh),n(Fh,eg),n(ht,ag),n(ht,Gh),n(Gh,sg),n(ht,hg),n(ht,Uh),n(Uh,cg),n(ht,lg),r(t,br,i),f(be,t,i),r(t,$r,i),r(t,yt,i),n(yt,ig),n(yt,Jh),n(Jh,rg),n(yt,og),n(yt,Kh),n(Kh,pg),n(yt,dg),r(t,kr,i),f($e,t,i),r(t,yr,i),f(ke,t,i),r(t,Er,i),r(t,ct,i),n(ct,gg),n(ct,Yh),n(Yh,ug),n(ct,mg),n(ct,Xh),n(Xh,fg),n(ct,vg),n(ct,Wh),n(Wh,_g),n(ct,bg),r(t,xr,i),r(t,Et,i),n(Et,ye),n(ye,$g),n(ye,Qh),n(Qh,kg),n(ye,yg),n(Et,Eg),n(Et,Ee),n(Ee,xg),n(Ee,Zh),n(Zh,wg),n(Ee,jg),n(Et,Dg),n(Et,Wt),n(Wt,Tg),n(Wt,tc),n(tc,qg),n(Wt,Cg),n(Wt,nc),n(nc,Og),n(Wt,Pg),r(t,wr,i),r(t,xt,i),n(xt,zg),n(xt,ec),n(ec,Ng),n(xt,Ag),n(xt,ac),n(ac,Hg),n(xt,Sg),r(t,jr,i),f(xe,t,i),r(t,Dr,i),r(t,wt,i),n(wt,Ig),n(wt,sc),n(sc,Mg),n(wt,Vg),n(wt,hc),n(hc,Bg),n(wt,Lg),r(t,Tr,i),f(we,t,i),r(t,qr,i),f(je,t,i),r(t,Cr,i),f(xn,t,i),r(t,Or,i),r(t,W,i),n(W,Rg),n(W,cc),n(cc,Fg),n(W,Gg),n(W,lc),n(lc,Ug),n(W,Jg),n(W,ns),n(ns,Kg),n(W,Yg),n(W,ic),n(ic,Xg),n(W,Wg),r(t,Pr,i),f(De,t,i),r(t,zr,i),f(Te,t,i),r(t,Nr,i),r(t,Q,i),n(Q,Qg),n(Q,rc),n(rc,Zg),n(Q,tu),n(Q,oc),n(oc,nu),n(Q,eu),n(Q,pc),n(pc,au),n(Q,su),n(Q,dc),n(dc,hu),n(Q,cu),r(t,Ar,i),f(qe,t,i),r(t,Hr,i),r(t,jt,i),n(jt,lu),n(jt,gc),n(gc,iu),n(jt,ru),n(jt,uc),n(uc,ou),n(jt,pu),r(t,Sr,i),f(Ce,t,i),r(t,Ir,i),r(t,Z,i),n(Z,du),n(Z,mc),n(mc,gu),n(Z,uu),n(Z,Oe),n(Oe,mu),n(Z,fu),n(Z,fc),n(fc,vu),n(Z,_u),n(Z,vc),n(vc,bu),n(Z,$u),r(t,Mr,i),f(Pe,t,i),r(t,Vr,i),r(t,es,i),n(es,ku),r(t,Br,i),f(ze,t,i),r(t,Lr,i),f(Ne,t,i),r(t,Rr,i),r(t,as,i),n(as,yu),r(t,Fr,i),f(Ae,t,i),r(t,Gr,i),f(He,t,i),r(t,Ur,i),r(t,Dt,i),n(Dt,Eu),n(Dt,Se),n(Se,xu),n(Dt,wu),n(Dt,_c),n(_c,ju),n(Dt,Du),r(t,Jr,i),f(Ie,t,i),r(t,Kr,i),r(t,Tt,i),n(Tt,Tu),n(Tt,bc),n(bc,qu),n(Tt,Cu),n(Tt,$c),n($c,Ou),n(Tt,Pu),r(t,Yr,i),f(Me,t,i),r(t,Xr,i),f(Ve,t,i),r(t,Wr,i),r(t,ss,i),n(ss,zu),r(t,Qr,i),r(t,Qt,i),n(Qt,wn),n(wn,kc),f(Be,kc,null),n(Qt,Nu),n(Qt,yc),n(yc,Au),r(t,Zr,i),r(t,hs,i),n(hs,Hu),r(t,to,i),r(t,cs,i),n(cs,Su),r(t,no,i),f(Le,t,i),r(t,eo,i),r(t,K,i),n(K,Iu),n(K,Ec),n(Ec,Mu),n(K,Vu),n(K,xc),n(xc,Bu),n(K,Lu),n(K,wc),n(wc,Ru),n(K,Fu),n(K,jc),n(jc,Gu),n(K,Uu),n(K,Dc),n(Dc,Ju),n(K,Ku),r(t,ao,i),f(Re,t,i),r(t,so,i),f(Fe,t,i),r(t,ho,i),r(t,qt,i),n(qt,Yu),n(qt,Tc),n(Tc,Xu),n(qt,Wu),n(qt,qc),n(qc,Qu),n(qt,Zu),r(t,co,i),f(Ge,t,i),r(t,lo,i),f(Ue,t,i),r(t,io,i),r(t,ls,i),n(ls,tm),r(t,ro,i),f(jn,t,i),r(t,oo,i),r(t,Ct,i),n(Ct,nm),n(Ct,Cc),n(Cc,em),n(Ct,am),n(Ct,Oc),n(Oc,sm),n(Ct,hm),r(t,po,i),f(Je,t,i),r(t,go,i),f(Ke,t,i),r(t,uo,i),r(t,is,i),n(is,cm),r(t,mo,i),f(Dn,t,i),r(t,fo,i),r(t,Tn,i),n(Tn,lm),n(Tn,Pc),n(Pc,im),n(Tn,rm),r(t,vo,i),f(Ye,t,i),r(t,_o,i),f(Xe,t,i),r(t,bo,i),r(t,qn,i),n(qn,om),n(qn,zc),n(zc,pm),n(qn,dm),r(t,$o,i),f(We,t,i),r(t,ko,i),r(t,Cn,i),n(Cn,gm),n(Cn,Nc),n(Nc,um),n(Cn,mm),r(t,yo,i),r(t,Zt,i),n(Zt,On),n(On,Ac),f(Qe,Ac,null),n(Zt,fm),n(Zt,rs),n(rs,vm),n(rs,Hc),n(Hc,_m),r(t,Eo,i),r(t,lt,i),n(lt,bm),n(lt,Sc),n(Sc,$m),n(lt,km),n(lt,Ic),n(Ic,ym),n(lt,Em),n(lt,Mc),n(Mc,xm),n(lt,wm),r(t,xo,i),r(t,tt,i),n(tt,jm),n(tt,Vc),n(Vc,Dm),n(tt,Tm),n(tt,Bc),n(Bc,qm),n(tt,Cm),n(tt,Lc),n(Lc,Om),n(tt,Pm),n(tt,Rc),n(Rc,zm),n(tt,Nm),r(t,wo,i),f(Ze,t,i),r(t,jo,i),r(t,Ot,i),n(Ot,Am),n(Ot,Fc),n(Fc,Hm),n(Ot,Sm),n(Ot,Gc),n(Gc,Im),n(Ot,Mm),r(t,Do,i),r(t,it,i),n(it,Vm),n(it,Uc),n(Uc,Bm),n(it,Lm),n(it,Jc),n(Jc,Rm),n(it,Fm),n(it,os),n(os,Gm),n(it,Um),r(t,To,i),f(ta,t,i),r(t,qo,i),r(t,rt,i),n(rt,Jm),n(rt,ps),n(ps,Km),n(rt,Ym),n(rt,Kc),n(Kc,Xm),n(rt,Wm),n(rt,Yc),n(Yc,Qm),n(rt,Zm),r(t,Co,i),f(na,t,i),r(t,Oo,i),r(t,Pn,i),n(Pn,tf),n(Pn,Xc),n(Xc,nf),n(Pn,ef),r(t,Po,i),f(zn,t,i),r(t,zo,i),r(t,ds,i),n(ds,af),r(t,No,i),r(t,Nn,i),n(Nn,Wc),n(Wc,tn),n(tn,gs),n(gs,sf),n(tn,hf),n(tn,us),n(us,cf),n(tn,lf),n(tn,ms),n(ms,rf),n(Nn,of),n(Nn,ea),n(ea,nn),n(nn,fs),n(fs,Qc),n(Qc,pf),n(nn,df),n(nn,vs),n(vs,gf),n(nn,uf),n(nn,_s),n(_s,mf),n(ea,ff),n(ea,en),n(en,bs),n(bs,Zc),n(Zc,vf),n(en,_f),n(en,$s),n($s,bf),n(en,$f),n(en,ks),n(ks,kf),r(t,Ao,i),r(t,Pt,i),n(Pt,yf),n(Pt,tl),n(tl,Ef),n(Pt,xf),n(Pt,nl),n(nl,wf),n(Pt,jf),r(t,Ho,i),r(t,ys,i),n(ys,Df),r(t,So,i),r(t,_t,i),n(_t,el),n(el,Tf),n(_t,qf),n(_t,al),n(al,Cf),n(_t,Of),n(_t,sl),n(sl,Pf),n(_t,zf),r(t,Io,i),f(aa,t,i),r(t,Mo,i),r(t,Es,i),n(Es,Nf),r(t,Vo,i),r(t,An,i),n(An,hl),n(hl,an),n(an,xs),n(xs,Af),n(an,Hf),n(an,ws),n(ws,Sf),n(an,If),n(an,js),n(js,Mf),n(An,Vf),n(An,bt),n(bt,sn),n(sn,Ds),n(Ds,cl),n(cl,Bf),n(sn,Lf),n(sn,Ts),n(Ts,Rf),n(sn,Ff),n(sn,qs),n(qs,Gf),n(bt,Uf),n(bt,hn),n(hn,Cs),n(Cs,ll),n(ll,Jf),n(hn,Kf),n(hn,Os),n(Os,Yf),n(hn,Xf),n(hn,Ps),n(Ps,Wf),n(bt,Qf),n(bt,cn),n(cn,Hn),n(Hn,il),n(il,Zf),n(Hn,tv),n(Hn,rl),n(rl,nv),n(cn,ev),n(cn,zs),n(zs,av),n(cn,sv),n(cn,Ns),n(Ns,hv),n(bt,cv),n(bt,ln),n(ln,Sn),n(Sn,ol),n(ol,lv),n(Sn,iv),n(Sn,pl),n(pl,rv),n(ln,ov),n(ln,As),n(As,pv),n(ln,dv),n(ln,Hs),n(Hs,gv),r(t,Bo,i),r(t,ot,i),n(ot,uv),n(ot,dl),n(dl,mv),n(ot,fv),n(ot,gl),n(gl,vv),n(ot,_v),n(ot,ul),n(ul,bv),n(ot,$v),r(t,Lo,i),f(In,t,i),r(t,Ro,i),r(t,pt,i),n(pt,kv),n(pt,ml),n(ml,yv),n(pt,Ev),n(pt,fl),n(fl,xv),n(pt,wv),n(pt,Ss),n(Ss,jv),n(pt,Dv),r(t,Fo,i),f(Mn,t,i),r(t,Go,i),r(t,zt,i),n(zt,Tv),n(zt,vl),n(vl,qv),n(zt,Cv),n(zt,_l),n(_l,Ov),n(zt,Pv),r(t,Uo,i),f(sa,t,i),r(t,Jo,i),r(t,Vn,i),n(Vn,zv),n(Vn,bl),n(bl,Nv),n(Vn,Av),r(t,Ko,i),f(ha,t,i),r(t,Yo,i),f(ca,t,i),r(t,Xo,i),r(t,Is,i),n(Is,Hv),r(t,Wo,i),f(la,t,i),r(t,Qo,i),f(ia,t,i),r(t,Zo,i),r(t,Nt,i),n(Nt,Sv),n(Nt,ra),n(ra,Iv),n(Nt,Mv),n(Nt,$l),n($l,Vv),n(Nt,Bv),r(t,tp,i),r(t,nt,i),n(nt,Lv),n(nt,kl),n(kl,Rv),n(nt,Fv),n(nt,yl),n(yl,Gv),n(nt,Uv),n(nt,El),n(El,Jv),n(nt,Kv),n(nt,xl),n(xl,Yv),n(nt,Xv),r(t,np,i),f(oa,t,i),r(t,ep,i),r(t,Ms,i),n(Ms,Wv),r(t,ap,i),f(pa,t,i),r(t,sp,i),f(da,t,i),r(t,hp,i),r(t,At,i),n(At,Qv),n(At,wl),n(wl,Zv),n(At,t_),n(At,jl),n(jl,n_),n(At,e_),r(t,cp,i),f(ga,t,i),r(t,lp,i),r(t,Bn,i),n(Bn,a_),n(Bn,Dl),n(Dl,s_),n(Bn,h_),r(t,ip,i),f(ua,t,i),r(t,rp,i),f(ma,t,i),r(t,op,i),r(t,Vs,i),n(Vs,c_),r(t,pp,i),r(t,Ln,i),n(Ln,l_),n(Ln,Tl),n(Tl,i_),n(Ln,r_),r(t,dp,i),r(t,rn,i),n(rn,Rn),n(Rn,ql),f(fa,ql,null),n(rn,o_),n(rn,on),n(on,p_),n(on,Cl),n(Cl,d_),n(on,g_),n(on,Ol),n(Ol,u_),n(on,m_),r(t,gp,i),f(va,t,i),r(t,up,i),r(t,dt,i),n(dt,f_),n(dt,Pl),n(Pl,v_),n(dt,__),n(dt,zl),n(zl,b_),n(dt,$_),n(dt,Nl),n(Nl,k_),n(dt,y_),r(t,mp,i),f(_a,t,i),r(t,fp,i),r(t,Fn,i),n(Fn,E_),n(Fn,Al),n(Al,x_),n(Fn,w_),r(t,vp,i),f(ba,t,i),r(t,_p,i),r(t,Ht,i),n(Ht,Hl),n(Hl,H),n(H,bp),n(H,j_),n(H,Sl),n(Sl,D_),n(H,T_),n(H,Il),n(Il,q_),n(H,C_),n(H,Ml),n(Ml,O_),n(H,P_),n(H,Vl),n(Vl,z_),n(H,N_),n(H,Bl),n(Bl,A_),n(H,H_),n(H,Ll),n(Ll,S_),n(H,I_),n(H,Rl),n(Rl,M_),n(H,V_),n(H,Fl),n(Fl,B_),n(Ht,L_),n(Ht,pn),n(pn,S),n(S,Gl),n(Gl,R_),n(S,F_),n(S,Ul),n(Ul,G_),n(S,U_),n(S,Jl),n(Jl,J_),n(S,K_),n(S,Kl),n(Kl,Y_),n(S,X_),n(S,Yl),n(Yl,W_),n(S,Q_),n(S,Xl),n(Xl,Z_),n(S,t2),n(S,Wl),n(Wl,n2),n(S,e2),n(S,Ql),n(Ql,a2),n(S,s2),n(S,Zl),n(Zl,h2),n(pn,c2),n(pn,I),n(I,ti),n(ti,l2),n(I,i2),n(I,ni),n(ni,r2),n(I,o2),n(I,ei),n(ei,p2),n(I,d2),n(I,ai),n(ai,g2),n(I,u2),n(I,si),n(si,m2),n(I,f2),n(I,hi),n(hi,v2),n(I,_2),n(I,ci),n(ci,b2),n(I,$2),n(I,li),n(li,k2),n(I,y2),n(I,ii),n(ii,E2),n(pn,x2),n(pn,M),n(M,ri),n(ri,w2),n(M,j2),n(M,oi),n(oi,D2),n(M,T2),n(M,pi),n(pi,q2),n(M,C2),n(M,di),n(di,O2),n(M,P2),n(M,gi),n(gi,z2),n(M,N2),n(M,ui),n(ui,A2),n(M,H2),n(M,mi),n(mi,S2),n(M,I2),n(M,fi),n(fi,M2),n(M,V2),n(M,vi),n(vi,B2),r(t,$p,i),r(t,St,i),n(St,L2),n(St,_i),n(_i,R2),n(St,F2),n(St,bi),n(bi,G2),n(St,U2),r(t,kp,i),f($a,t,i),r(t,yp,i),f(Gn,t,i),r(t,Ep,i),r(t,Un,i),n(Un,J2),n(Un,$i),n($i,K2),n(Un,Y2),r(t,xp,i),f(ka,t,i),r(t,wp,i),r(t,It,i),n(It,ki),n(ki,Mt),n(Mt,jp),n(Mt,X2),n(Mt,yi),n(yi,W2),n(Mt,Q2),n(Mt,Ei),n(Ei,Z2),n(It,tb),n(It,at),n(at,dn),n(dn,xi),n(xi,nb),n(dn,eb),n(dn,wi),n(wi,ab),n(dn,sb),n(dn,ji),n(ji,hb),n(at,cb),n(at,gn),n(gn,Di),n(Di,lb),n(gn,ib),n(gn,Ti),n(Ti,rb),n(gn,ob),n(gn,qi),n(qi,pb),n(at,db),n(at,un),n(un,Ci),n(Ci,gb),n(un,ub),n(un,Oi),n(Oi,mb),n(un,fb),n(un,Pi),n(Pi,vb),n(at,_b),n(at,mn),n(mn,zi),n(zi,bb),n(mn,$b),n(mn,Ni),n(Ni,kb),n(mn,yb),n(mn,Ai),n(Ai,Eb),n(at,xb),n(at,fn),n(fn,Hi),n(Hi,wb),n(fn,jb),n(fn,Si),n(Si,Db),n(fn,Tb),n(fn,Ii),n(Ii,qb),r(t,Dp,i),r(t,Vt,i),n(Vt,Cb),n(Vt,Mi),n(Mi,Ob),n(Vt,Pb),n(Vt,Vi),n(Vi,zb),n(Vt,Nb),r(t,Tp,i),f(ya,t,i),r(t,qp,i),f(Ea,t,i),r(t,Cp,i),f(Jn,t,i),r(t,Op,i),r(t,gt,i),n(gt,Ab),n(gt,Bi),n(Bi,Hb),n(gt,Sb),n(gt,Li),n(Li,Ib),n(gt,Mb),n(gt,Ri),n(Ri,Vb),n(gt,Bb),r(t,Pp,i),f(xa,t,i),r(t,zp,i),r(t,vn,i),n(vn,Kn),n(Kn,Fi),f(wa,Fi,null),n(vn,Lb),n(vn,Gi),n(Gi,Rb),r(t,Np,i),r(t,Bs,i),n(Bs,Fb),r(t,Ap,i),r(t,Y,i),n(Y,Gb),n(Y,Ui),n(Ui,Ub),n(Y,Jb),n(Y,Ji),n(Ji,Kb),n(Y,Yb),n(Y,Ki),n(Ki,Xb),n(Y,Wb),n(Y,Yi),n(Yi,Qb),n(Y,Zb),n(Y,Xi),n(Xi,t1),n(Y,n1),r(t,Hp,i),f(ja,t,i),r(t,Sp,i),f(Da,t,i),r(t,Ip,i),r(t,Yn,i),n(Yn,e1),n(Yn,Ls),n(Ls,a1),n(Yn,s1),r(t,Mp,i),r(t,_n,i),n(_n,Xn),n(Xn,Wi),f(Ta,Wi,null),n(_n,h1),n(_n,Qi),n(Qi,c1),r(t,Vp,i),f(qa,t,i),r(t,Bp,i),r(t,Rs,i),n(Rs,l1),r(t,Lp,i),r(t,Wn,i),n(Wn,Zi),n(Zi,Ca),n(Ca,Fs),n(Fs,i1),n(Ca,r1),n(Ca,Gs),n(Gs,o1),n(Wn,p1),n(Wn,bn),n(bn,Oa),n(Oa,Us),n(Us,d1),n(Oa,g1),n(Oa,Js),n(Js,tr),n(tr,u1),n(bn,m1),n(bn,Pa),n(Pa,Ks),n(Ks,f1),n(Pa,v1),n(Pa,Ys),n(Ys,nr),n(nr,_1),n(bn,b1),n(bn,za),n(za,Xs),n(Xs,$1),n(za,k1),n(za,Ws),n(Ws,er),n(er,y1),r(t,Rp,i),r(t,Qs,i),n(Qs,E1),r(t,Fp,i),f(Na,t,i),r(t,Gp,i),r(t,Zs,i),n(Zs,x1),r(t,Up,i),f(Aa,t,i),r(t,Jp,i),r(t,ut,i),n(ut,w1),n(ut,ar),n(ar,j1),n(ut,D1),n(ut,sr),n(sr,T1),n(ut,q1),n(ut,hr),n(hr,C1),n(ut,O1),r(t,Kp,i),r(t,Qn,i),n(Qn,P1),n(Qn,cr),n(cr,z1),n(Qn,N1),r(t,Yp,i),f(Ha,t,i),r(t,Xp,i),f(Sa,t,i),r(t,Wp,i),r(t,Zn,i),n(Zn,A1),n(Zn,lr),n(lr,H1),n(Zn,S1),r(t,Qp,i),f(Ia,t,i),r(t,Zp,i),r(t,te,i),n(te,I1),n(te,Ma),n(Ma,M1),n(te,V1),r(t,td,i),f(Va,t,i),r(t,nd,i),f(Ba,t,i),r(t,ed,i),r(t,ne,i),n(ne,B1),n(ne,th),n(th,L1),n(ne,R1),r(t,ad,i),f(La,t,i),r(t,sd,i),r(t,nh,i),n(nh,F1),r(t,hd,i),r(t,ee,i),n(ee,Ra),n(Ra,G1),n(Ra,eh),n(eh,U1),n(Ra,J1),n(ee,K1),n(ee,$n),n($n,Y1),n($n,ir),n(ir,X1),n($n,W1),n($n,ah),n(ah,Q1),n($n,Z1),r(t,cd,i),r(t,sh,i),n(sh,t$),ld=!0},p(t,[i]){const Fa={};i&2&&(Fa.$$scope={dirty:i,ctx:t}),xn.$set(Fa);const rr={};i&2&&(rr.$$scope={dirty:i,ctx:t}),jn.$set(rr);const or={};i&2&&(or.$$scope={dirty:i,ctx:t}),Dn.$set(or);const pr={};i&2&&(pr.$$scope={dirty:i,ctx:t}),zn.$set(pr);const dr={};i&2&&(dr.$$scope={dirty:i,ctx:t}),In.$set(dr);const Ga={};i&2&&(Ga.$$scope={dirty:i,ctx:t}),Mn.$set(Ga);const gr={};i&2&&(gr.$$scope={dirty:i,ctx:t}),Gn.$set(gr);const ur={};i&2&&(ur.$$scope={dirty:i,ctx:t}),Jn.$set(ur)},i(t){ld||(v(y.$$.fragment,t),v(P.$$.fragment,t),v(z.$$.fragment,t),v(et.$$.fragment,t),v(_e.$$.fragment,t),v(be.$$.fragment,t),v($e.$$.fragment,t),v(ke.$$.fragment,t),v(xe.$$.fragment,t),v(we.$$.fragment,t),v(je.$$.fragment,t),v(xn.$$.fragment,t),v(De.$$.fragment,t),v(Te.$$.fragment,t),v(qe.$$.fragment,t),v(Ce.$$.fragment,t),v(Pe.$$.fragment,t),v(ze.$$.fragment,t),v(Ne.$$.fragment,t),v(Ae.$$.fragment,t),v(He.$$.fragment,t),v(Ie.$$.fragment,t),v(Me.$$.fragment,t),v(Ve.$$.fragment,t),v(Be.$$.fragment,t),v(Le.$$.fragment,t),v(Re.$$.fragment,t),v(Fe.$$.fragment,t),v(Ge.$$.fragment,t),v(Ue.$$.fragment,t),v(jn.$$.fragment,t),v(Je.$$.fragment,t),v(Ke.$$.fragment,t),v(Dn.$$.fragment,t),v(Ye.$$.fragment,t),v(Xe.$$.fragment,t),v(We.$$.fragment,t),v(Qe.$$.fragment,t),v(Ze.$$.fragment,t),v(ta.$$.fragment,t),v(na.$$.fragment,t),v(zn.$$.fragment,t),v(aa.$$.fragment,t),v(In.$$.fragment,t),v(Mn.$$.fragment,t),v(sa.$$.fragment,t),v(ha.$$.fragment,t),v(ca.$$.fragment,t),v(la.$$.fragment,t),v(ia.$$.fragment,t),v(oa.$$.fragment,t),v(pa.$$.fragment,t),v(da.$$.fragment,t),v(ga.$$.fragment,t),v(ua.$$.fragment,t),v(ma.$$.fragment,t),v(fa.$$.fragment,t),v(va.$$.fragment,t),v(_a.$$.fragment,t),v(ba.$$.fragment,t),v($a.$$.fragment,t),v(Gn.$$.fragment,t),v(ka.$$.fragment,t),v(ya.$$.fragment,t),v(Ea.$$.fragment,t),v(Jn.$$.fragment,t),v(xa.$$.fragment,t),v(wa.$$.fragment,t),v(ja.$$.fragment,t),v(Da.$$.fragment,t),v(Ta.$$.fragment,t),v(qa.$$.fragment,t),v(Na.$$.fragment,t),v(Aa.$$.fragment,t),v(Ha.$$.fragment,t),v(Sa.$$.fragment,t),v(Ia.$$.fragment,t),v(Va.$$.fragment,t),v(Ba.$$.fragment,t),v(La.$$.fragment,t),ld=!0)},o(t){_(y.$$.fragment,t),_(P.$$.fragment,t),_(z.$$.fragment,t),_(et.$$.fragment,t),_(_e.$$.fragment,t),_(be.$$.fragment,t),_($e.$$.fragment,t),_(ke.$$.fragment,t),_(xe.$$.fragment,t),_(we.$$.fragment,t),_(je.$$.fragment,t),_(xn.$$.fragment,t),_(De.$$.fragment,t),_(Te.$$.fragment,t),_(qe.$$.fragment,t),_(Ce.$$.fragment,t),_(Pe.$$.fragment,t),_(ze.$$.fragment,t),_(Ne.$$.fragment,t),_(Ae.$$.fragment,t),_(He.$$.fragment,t),_(Ie.$$.fragment,t),_(Me.$$.fragment,t),_(Ve.$$.fragment,t),_(Be.$$.fragment,t),_(Le.$$.fragment,t),_(Re.$$.fragment,t),_(Fe.$$.fragment,t),_(Ge.$$.fragment,t),_(Ue.$$.fragment,t),_(jn.$$.fragment,t),_(Je.$$.fragment,t),_(Ke.$$.fragment,t),_(Dn.$$.fragment,t),_(Ye.$$.fragment,t),_(Xe.$$.fragment,t),_(We.$$.fragment,t),_(Qe.$$.fragment,t),_(Ze.$$.fragment,t),_(ta.$$.fragment,t),_(na.$$.fragment,t),_(zn.$$.fragment,t),_(aa.$$.fragment,t),_(In.$$.fragment,t),_(Mn.$$.fragment,t),_(sa.$$.fragment,t),_(ha.$$.fragment,t),_(ca.$$.fragment,t),_(la.$$.fragment,t),_(ia.$$.fragment,t),_(oa.$$.fragment,t),_(pa.$$.fragment,t),_(da.$$.fragment,t),_(ga.$$.fragment,t),_(ua.$$.fragment,t),_(ma.$$.fragment,t),_(fa.$$.fragment,t),_(va.$$.fragment,t),_(_a.$$.fragment,t),_(ba.$$.fragment,t),_($a.$$.fragment,t),_(Gn.$$.fragment,t),_(ka.$$.fragment,t),_(ya.$$.fragment,t),_(Ea.$$.fragment,t),_(Jn.$$.fragment,t),_(xa.$$.fragment,t),_(wa.$$.fragment,t),_(ja.$$.fragment,t),_(Da.$$.fragment,t),_(Ta.$$.fragment,t),_(qa.$$.fragment,t),_(Na.$$.fragment,t),_(Aa.$$.fragment,t),_(Ha.$$.fragment,t),_(Sa.$$.fragment,t),_(Ia.$$.fragment,t),_(Va.$$.fragment,t),_(Ba.$$.fragment,t),_(La.$$.fragment,t),ld=!1},d(t){e(d),t&&e(q),t&&e(k),b(y),t&&e(x),b(P,t),t&&e(T),t&&e(O),t&&e(A),b(z,t),t&&e(vt),t&&e(B),b(et),t&&e(kn),t&&e(L),t&&e(mr),t&&e($t),t&&e(fr),t&&e(kt),t&&e(vr),b(_e,t),t&&e(_r),t&&e(ht),t&&e(br),b(be,t),t&&e($r),t&&e(yt),t&&e(kr),b($e,t),t&&e(yr),b(ke,t),t&&e(Er),t&&e(ct),t&&e(xr),t&&e(Et),t&&e(wr),t&&e(xt),t&&e(jr),b(xe,t),t&&e(Dr),t&&e(wt),t&&e(Tr),b(we,t),t&&e(qr),b(je,t),t&&e(Cr),b(xn,t),t&&e(Or),t&&e(W),t&&e(Pr),b(De,t),t&&e(zr),b(Te,t),t&&e(Nr),t&&e(Q),t&&e(Ar),b(qe,t),t&&e(Hr),t&&e(jt),t&&e(Sr),b(Ce,t),t&&e(Ir),t&&e(Z),t&&e(Mr),b(Pe,t),t&&e(Vr),t&&e(es),t&&e(Br),b(ze,t),t&&e(Lr),b(Ne,t),t&&e(Rr),t&&e(as),t&&e(Fr),b(Ae,t),t&&e(Gr),b(He,t),t&&e(Ur),t&&e(Dt),t&&e(Jr),b(Ie,t),t&&e(Kr),t&&e(Tt),t&&e(Yr),b(Me,t),t&&e(Xr),b(Ve,t),t&&e(Wr),t&&e(ss),t&&e(Qr),t&&e(Qt),b(Be),t&&e(Zr),t&&e(hs),t&&e(to),t&&e(cs),t&&e(no),b(Le,t),t&&e(eo),t&&e(K),t&&e(ao),b(Re,t),t&&e(so),b(Fe,t),t&&e(ho),t&&e(qt),t&&e(co),b(Ge,t),t&&e(lo),b(Ue,t),t&&e(io),t&&e(ls),t&&e(ro),b(jn,t),t&&e(oo),t&&e(Ct),t&&e(po),b(Je,t),t&&e(go),b(Ke,t),t&&e(uo),t&&e(is),t&&e(mo),b(Dn,t),t&&e(fo),t&&e(Tn),t&&e(vo),b(Ye,t),t&&e(_o),b(Xe,t),t&&e(bo),t&&e(qn),t&&e($o),b(We,t),t&&e(ko),t&&e(Cn),t&&e(yo),t&&e(Zt),b(Qe),t&&e(Eo),t&&e(lt),t&&e(xo),t&&e(tt),t&&e(wo),b(Ze,t),t&&e(jo),t&&e(Ot),t&&e(Do),t&&e(it),t&&e(To),b(ta,t),t&&e(qo),t&&e(rt),t&&e(Co),b(na,t),t&&e(Oo),t&&e(Pn),t&&e(Po),b(zn,t),t&&e(zo),t&&e(ds),t&&e(No),t&&e(Nn),t&&e(Ao),t&&e(Pt),t&&e(Ho),t&&e(ys),t&&e(So),t&&e(_t),t&&e(Io),b(aa,t),t&&e(Mo),t&&e(Es),t&&e(Vo),t&&e(An),t&&e(Bo),t&&e(ot),t&&e(Lo),b(In,t),t&&e(Ro),t&&e(pt),t&&e(Fo),b(Mn,t),t&&e(Go),t&&e(zt),t&&e(Uo),b(sa,t),t&&e(Jo),t&&e(Vn),t&&e(Ko),b(ha,t),t&&e(Yo),b(ca,t),t&&e(Xo),t&&e(Is),t&&e(Wo),b(la,t),t&&e(Qo),b(ia,t),t&&e(Zo),t&&e(Nt),t&&e(tp),t&&e(nt),t&&e(np),b(oa,t),t&&e(ep),t&&e(Ms),t&&e(ap),b(pa,t),t&&e(sp),b(da,t),t&&e(hp),t&&e(At),t&&e(cp),b(ga,t),t&&e(lp),t&&e(Bn),t&&e(ip),b(ua,t),t&&e(rp),b(ma,t),t&&e(op),t&&e(Vs),t&&e(pp),t&&e(Ln),t&&e(dp),t&&e(rn),b(fa),t&&e(gp),b(va,t),t&&e(up),t&&e(dt),t&&e(mp),b(_a,t),t&&e(fp),t&&e(Fn),t&&e(vp),b(ba,t),t&&e(_p),t&&e(Ht),t&&e($p),t&&e(St),t&&e(kp),b($a,t),t&&e(yp),b(Gn,t),t&&e(Ep),t&&e(Un),t&&e(xp),b(ka,t),t&&e(wp),t&&e(It),t&&e(Dp),t&&e(Vt),t&&e(Tp),b(ya,t),t&&e(qp),b(Ea,t),t&&e(Cp),b(Jn,t),t&&e(Op),t&&e(gt),t&&e(Pp),b(xa,t),t&&e(zp),t&&e(vn),b(wa),t&&e(Np),t&&e(Bs),t&&e(Ap),t&&e(Y),t&&e(Hp),b(ja,t),t&&e(Sp),b(Da,t),t&&e(Ip),t&&e(Yn),t&&e(Mp),t&&e(_n),b(Ta),t&&e(Vp),b(qa,t),t&&e(Bp),t&&e(Rs),t&&e(Lp),t&&e(Wn),t&&e(Rp),t&&e(Qs),t&&e(Fp),b(Na,t),t&&e(Gp),t&&e(Zs),t&&e(Up),b(Aa,t),t&&e(Jp),t&&e(ut),t&&e(Kp),t&&e(Qn),t&&e(Yp),b(Ha,t),t&&e(Xp),b(Sa,t),t&&e(Wp),t&&e(Zn),t&&e(Qp),b(Ia,t),t&&e(Zp),t&&e(te),t&&e(td),b(Va,t),t&&e(nd),b(Ba,t),t&&e(ed),t&&e(ne),t&&e(ad),b(La,t),t&&e(sd),t&&e(nh),t&&e(hd),t&&e(ee),t&&e(cd),t&&e(sh)}}}const hx={local:"sp-xp-d-liu",sections:[{local:"sp-xp-d-liu-ca-chng-ta",title:"S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u c\u1EE7a ch\xFAng ta"},{local:"to-ra-cc-ct-mi",title:"T\u1EA1o ra c\xE1c c\u1ED9t m\u1EDBi"},{local:"siu-sc-mnh-ca-hm-map",title:"Si\xEAu s\u1EE9c m\u1EA1nh c\u1EE7a h\xE0m `map()`"},{local:"t-dataset-ti-dataframe-v-ngc-li",title:"T\u1EEB `Dataset` t\u1EDBi `DataFrame` v\xE0 ng\u01B0\u1EE3c l\u1EA1i"},{local:"to-ra-mt-tp-kim-nh",title:"T\u1EA1o ra m\u1ED9t t\u1EC7p ki\u1EC3m \u0111\u1ECBnh"},{local:"lu-mt-b-d-liu",title:"L\u01B0u m\u1ED9t b\u1ED9 d\u1EEF li\u1EC7u"}],title:"S\u1EAFp x\u1EBFp d\u1EEF li\u1EC7u"};function cx(V){return KE(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ux extends FE{constructor(d){super();GE(this,d,cx,sx,UE,{})}}export{ux as default,hx as metadata};
