Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. LovecraftHP

    Help with shuffling data

    One last (and probably all too obvious) question. In: while ( len ) { random = int( rand() * len ) + 1 scrambled[++i] = sample[random] sample[random] = sample[len] len-- } why do you need the following line? sample[random] = sample[len] If anyone could please...
  2. LovecraftHP

    Batch processing?

    Thanks guys! Works perfectly now and saves me a lot of time. Thanks!
  3. LovecraftHP

    Help with shuffling data

    Thank you, futurelet. I do think that is exactly what I need. Thanks!
  4. LovecraftHP

    Batch processing?

    Hi guys! I'm new to Linux so excuse me if the answer to this should turn out to be too obvious. I am working with numbered files eg train1.txt, train2.txt etc. Is there a way to execute a command on these files and make the number variable? What I mean is something like: for (x=1;x<=10;x++) do...
  5. LovecraftHP

    Help with shuffling data

    Anyone? Please?
  6. LovecraftHP

    Help with shuffling data

    One last question, guys and gals. I've almost got this program finished. As already mentioned above it's supposed to first randomize the data and then produce 10 different files each containing a different 10% of the randomized data. Up to this point the program works. But then it also has to...
  7. LovecraftHP

    Help with shuffling data

    Thank you very much, everybody. PHV, I think that is exactly what I needed! :) Always learning a little bit more by looking at somebody else's take on a problem. Thanks!
  8. LovecraftHP

    Help with shuffling data

    Hi guys! I'm working on a little program to randomly shuffle my data (for use in tenfold cross-validation experiments). My data file has 4332 records, so I thought I'd first fill an array with numbers from 1 to 4332 (each number being in there once) and then later use these numbers as indices...
  9. LovecraftHP

    Problem with coda

    Love the signature :) Hehe Thanks, but you were completely right: the original code was indeed too mixed up. I cleaned it all up and figured it out myself. Apart from throwing out and rearranging a lot of code, the simple answer was: r=substr(b[x],(y+z),2) Been looking way too long for...
  10. LovecraftHP

    Problem with coda

    Hi, Been working on a program that among others should be able to split up verbs in a onset-nucleus-coda structure (with the help of this forum, thanks guys). Almost finished now, except for a couple of bugs. Sample code: BEGIN { FS="," ; fs="[" ; d="=" } { printf $1 FS $2 FS $3 n =...
  11. LovecraftHP

    How to convert a cvc structure to an onset-nucleus-coda structure?

    Thank you all for your replies. Please excuse me for taking this long to reply myself. Ygor, I tried your solution but all I got was abide,=,=,=,=,=,=,=,=,= abolish,=,=,=,=,=,=,=,=,= accomodate,=,=,=,=,=,=,=,=,= I'm using GNU Awk 3.0.3 under WinXP. Any ideas?
  12. LovecraftHP

    How to convert a cvc structure to an onset-nucleus-coda structure?

    I have an input file with a lemma, the cvc structure of that lemma, and the pronunciation of that lemma, eg abide,[V][CVVC],[@][baId] abolish,[V][CV][CVC],[@][bO][lIS] What I would like to do is convert this to an output that gives me the original lemma together with an onset-nucleus-coda...
  13. LovecraftHP

    Sliding window problem

    Let me first give an example of what I would like to do: I have an input file consisting of a number of records, each record consisting of 2 fields eg list lIst screen skri.n I want to be able to shift the focus letter of the first field, along with its context (eg 3 letters to the right, 3...
  14. LovecraftHP

    How to check for previous occurence?

    Thank you!
  15. LovecraftHP

    How to check for previous occurence?

    I'm new to AWK, but I was wondering if any of you might be able to help me with this: I want to be able to check whether the value of a certain field (the field is the same for all the records) is different from any of the field values in previous records. So e.g., every record has 4 fields...

Part and Inventory Search

Back
Top