Spacy Dutch noun_phrases ส่งคืนรายการว่างโดยใช้ nl_core_news_sm

ฉันต้องการแยก noun_phrases ของข้อความภาษาดัตช์โดยใช้โมเดล nl_core_news_sm โดย spacy มันจะส่งคืนรายการว่าง ในทางกลับกันโมเดลภาษาอังกฤษที่เทียบเท่า en_core_web_sm จะให้รายการ noun_chunks (noun_phrases)

นี่เป็นพฤติกรรมปกติหรือไม่? กล่าวคือ moedel ภาษาดัตช์ไม่รวมตัวคั่น noun_phrases และโมเดลภาษาอังกฤษมีอะไรบ้าง หรือฉันกำลังทำอะไรผิด?

string='''In een wereld waarin je wordt overspoeld met informatie, is het prettig om een nieuwsbron te hebben met heldere stukken, die de ruimte laten om je eigen mening te vormen.'''
nlp = spacy.load('nl_core_news_sm')
print(dir(doc))
print(doc.noun_chunks)
list_chunks=[chunk for chunk in doc.noun_chunks]
for chunk in doc.noun_chunks:
    print(chunk.text)

ผลลัพธ์ที่นี่คือ list_chunks คือ [] และแน่นอนว่าไม่มีสิ่งใดถูกพิมพ์ในลูป

ฉันใช้ dir(doc) เพื่อเปรียบเทียบวิธีการที่มีอยู่เพื่อเปรียบเทียบกับโมเดลภาษาอังกฤษ พวกเขาก็เหมือน ๆ กัน.

nlp_en = spacy.load('en_core_web_sm')
string='''They normally organises a wide range of activities for kids in the summer holidays. Due to the virus, these have all been cancelled'''
doc2=nlp_en(string)
print(dir(doc2))
print(doc2.noun_chunks)
for chunk in doc2.noun_chunks:
    print(chunk.text)

ในภาษาอังกฤษมันใช้งานได้

มีความคิดบ้างไหม?

แก้ไขหมายเหตุ: ที่นี่ฉันเปรียบเทียบสามรุ่นภาษา: ป้อนคำอธิบายรูปภาพที่นี่


person JFerro    schedule 11.06.2020    source แหล่งที่มา
comment
คุณคิดออกได้ไหม? ฉันกำลังประสบปัญหาเดียวกัน ไม่มีทางที่จะดึง noun_chunks สำหรับข้อความภาษาดัตช์ได้   -  person I. Wanderer    schedule 08.08.2020


คำตอบ (1)


ฉันสามารถบอกคุณได้ว่า noun chuck tokenizer นั้นยังไม่ได้ถูกนำมาใช้ในโมเดลภาษาดัตช์นั้น มันไม่ใช่ข้อผิดพลาด มันก็จะต้องทำ ดังนั้นใครก็ตามที่อ่านข้อความนี้ โปรดตรวจสอบวันที่ของคำถามด้วย แน่นอนว่าพวกสเปซี่จะทำ แต่อาจต้องใช้เวลาสักพัก

person JFerro    schedule 09.08.2020