Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to store text file data into a dictionary in JavaScript? I have having an issue with that part. In the text file, there's an

  • How to store text file data into a dictionary in JavaScript? I have having an issue with that part. In the text file, there's an english term and the spanish translations of the word. The dictionary key needs to be the english term and the values are the different spanish translations. 

     

    Below is just some of the lines from the file. 

    ###########################################################################
    #Copyright 1999 The Internet Dictionary Project/Tyler Chambers
    #http://www.june29.com/IDP/
    #This file is free to use and modify.  Thank you for using the IDP.
    #
    #Approximately 5048 entries.  9/21/97
    #Approximately 5488 entries.  1/7/98
    #Approximately 5910 entries.  3/8/98
    #Approximately 7450 entries.  2/19/99
    ###########################################################################
    a    un, uno, una[Article]
    aardvark    cerdo hormiguero
    aardvark    oso hormiguero[Noun]
    aardvarks    cerdos hormigueros
    aardvarks    osos hormigueros
    ab    prefijo que indica separacio/n
    aback    hacia atras
    aback    hacia atras,take aback, desconcertar. En facha.
    aback    por sopresa, desprevenidamente, de improviso
    aback    atra/s[Adverb]
    abacterial    abacteriano, sin bacterias
    abacus    a/baco
    abacuses    a/bacos
    abaft    A popa (towards stern)/En popa (in stern)
    abaft    detra/s de[Adverb]
    abalone    abulo/n
    abalone    oreja de mar (molusco)[Noun]
    abalone    oreja de mar[Noun]
    abalones    abulones
    abalones    orejas de mar (moluscos)[Noun]
    abalones    orejas de mar[Noun]
    abandon    abandonar
    abandon    darse por vencido[Verb]
    abandon    dejar
    abandon    desamparar, desertar, renunciar, evacuar, repudiar
    abandon    renunciar a[Verb]
    abandon    abandono[Noun]
    abandoned    abandonado
    abandoned    dejado
    abandoned    desamparado
    abandoned    olvidado
    abandoned    abandonada,abandonado, abandonados, abandonadas[Verb]
    abandonee    abandonado
    abandonee    aislado
    abandonee    dejado
    abandonee    desamparado
    abandonee    money
    abandoner    abandonador
    abandoning    abandonando
    abandoning    abandono
    abandonment    abandono

Step by Step Solution

3.41 Rating (145 Votes )

There are 3 Steps involved in it

Step: 1

Answer To store the data from your text file into a dictionary in JavaScript you can read the file l... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Leadership Concepts And Practice

Authors: Peter G Northouse

5th Edition

1544351593, 978-1544351599

More Books

Students also viewed these Programming questions

Question

Find the primes p, q if n = pq = 121,361 and

Answered: 1 week ago