trie

  • Bus error 10 in Radix Tree C program 2018-03-13

    I'm writing a program which does operations on a Radix trie and I'm stuck at add() function, getting the Bus error 10. void addRec(struct tNode *p, char *w) { int matches = prefixMatch(p->word,w); bool insert = true; if ((p == root) || ((matches > 0

    Tags: trie, radix
  • Trying to build trie with classes in python - strange behavior 2014-07-24

    I'm trying to implement trie in python. I'm using dictionaries+classes instead of lists (I know it's not optimal, but I'm just trying to make it work at all). After debugging I found out that each layer has all letters in dictionary. I cannot underst

    Tags: python, class, trie
  • java - overriding iterator? 2014-04-23

    in all honesty, I've spent a few days looking at this and trying to figure it out, but have come up very short. The goal is to see if a trie node has a next, if so what it is. Where it's called by: public Iterator<String> iterator() { return ne

    Tags: java, iterator, iteration, trie
  • How can I speed up an AutocompleteTextView in Android?

    How can I speed up an AutocompleteTextView in Android? 2014-03-25

    Hi everyone I have an adapter which extends the ArrayAdapter class and overrides some Filterable methods. I am using this Adapter to perform some filtering while the user types inside an AutocompleteTextView. But I saw that if you type a bit fast the

    Tags: java, android, trie, autocompletetextview
  • implementing a patricia trie in java 2012-10-28

    I'm trying to rewrite a c++ patricia trie in java. The c++ code is from here full source code I'm a bit stuck. So here's my understanding: #define ZEROTAB_SIZE 256 head->key = (char*)calloc(ZEROTAB_SIZE, 1); we create an array of 256 bits for the

    Tags: java, trie, radix
  • Spell Checking Repeated Letters 2012-10-28

    I am writing a spell checker. I know all about Levenshtein distance, tries etc... My issue however is, to correct a word with repeated letters such as: haaaaapppppyyy to happy. What would be the best way to tackle this? So far I am thinking of using

    Tags: algorithm, spell checking, trie
  • How to store 50,000 English words so that it takes as little memory as possible 2012-04-30

    I have to store ~50,000 English words in memory and I'd like to know what would be the best data structure in term of memory footprint (and loading speed). Would it be a Trie? How would I serialize it into a file? Is there anything better than that?

    Tags: data structures, trie
  • LinkedList equivalence in J2ME 2012-04-16

    I found a java implementation of a trie and would like to have a similar one in J2ME. Here is the code. Node class import java.util.Collections; import java.util.LinkedList; import java.util.List; class Node { private final char ch; /** * Flag indica

    Tags: java me, trie
  • stackoverflowerror on recursive method with arraylist 2012-03-19

    I am see an Exception in thread "main" java.lang.StackOverflowError. I hope to know what is wrong with the code below. public void addWord(String word){ addWord(word,root,0); } private void addWord(String word,Node root,int pos) { for(Node c:root.chi

    Tags: algorithm, java, data structures, recursion, trie
  • Trie permutations not found 2012-03-15

    I'm running into a problem while using a Trie in Java for an anagram solver. The following code is for Android and does not give me any permutation results for the letters that are given and passed in. However, if I implement the same code in a Java

    Tags: java, android, dictionary, trie
  • How to search a tree for a specific node class 2012-03-15

    I've got a tree which is populated by Node objects. Each node has an ArrayList which stores its children nodes as there can be an unspecified amount of children, unlike in a binary tree. How can I traverse the tree to find a specific node if each nod

    Tags: .net, tree, data structures, trie
  • C++ Trie search performance 2012-03-01

    So I made a trie that holds quite a large amount of data, my search algorithm is quite fast but I wanted to see if anyone had any insight as to how I could make it any faster. bool search (string word) { int wordLength = word.length(); node *current

    Tags: performance, search, trie
  • Java Trie Optimization 2012-02-29

    I have been toying with a trie data structure for practice (there is not course work related). This class is used to store substrings of a string. For a string of length n there are n(n+1)/2 total substrings. In particular this implementation of a tr

    Tags: optimization, java, trie
  • SML - collecting words in a trie using continuations 2012-02-25

    I have a datatype trie = Node of char * (trie ref) list | Empty And I want to collect all the words in the trie, using these two mutually recursive functions: words_in_trie: trie -> (char list list -> 'a) -> 'a all_words: trie ref list ->

    Tags: recursion, sml, smlnj, trie, continuation
  • Algorithms for compression of set tries 2012-02-22

    I have a collection of sets that I'd like to place in a trie. Normal tries are made of strings of elements - that is, the order of the elements is important. Sets lack a defined order, so there's the possibility of greater compression. For example, g

    Tags: algorithm, language agnostic, compression, trie
  • Getting "node has no member" error in GCC (c99) for basic trie structure 2012-02-22

    I'm trying to implement a basic trie structure in plain old C, and I'm getting a "node has no member" error upon compilation. Here is my structure definition: typedef struct node { bool word; struct node *alpharray[26]; } node; My attempts to initial

    Tags: compilation, structure, trie
  • fscanf is somehow changing a node (in c) 2012-02-21

    I am new to c and have been stuck on this bug for hours. My code reads each word from a txt file and then stores the word in a node in a trie. I have narrowed the problem down to the area marked off by asterisks: at that point I have successfully add

    Tags: trie, fscanf
  • J2ME implementation of a Trie (Ternary Search Tree ) 2012-02-20

    I am currently working on a predictive text SMS system. I want to implement it using TST data structure and bi-gram (Predicting the next probable word based on current key sequence 12-keypad). Currently I have a corpus and have used the available app

    Tags: java me, ternary search tree, trie, n gram
  • Trie tree crashing in Android 2012-02-12

    I implemented a Trie tree in Java and it worked fine with a dictionary of about 80,000 words but when I implemented it in my Android app it started to Force Close. I tested it with a dictionary that has only a few words and it worked fine which makes

    Tags: java, android, trie
  • java string permutations 2012-02-11

    I'm writing an android app where you have a recursive function that takes a string and returns all the permutatins of that string and all it's substrings. This approach was time consuming especially with longer strings. I went on this site and asked

    Tags: java, tree, data, structure, trie

Copyright (C) dskims.com, All Rights Reserved.

processed in 4.868 (s). 9 q(s)