Tagging words through a .txt file

Hi all,
We have been looking all over the internet for a script that we can use/buy. But cannot find it anywhere.
We have a rather large document and an external word list in a .txt file. This list contains words that need to be in the index at the end of the document.
Instead of filling in a couple of hundred words and linking them by hand, it would be great if there is a script that can handle this.
We have looked in to Indexmatic2 (http://www.indiscripts.com/post/2011/07/indexmatic-2-public-release-and-user-s-guide ), but this script generates its own index list and does not create links to the original words in the document.
We have found a script that can create index links from colored words in the document.
So does anyone know if there is a script floating around that can load an external .txt wordlist and either color or add a character style to words in a document?
Or even a script that does what we need in 1 go?
Thanks

Thedesmodus,
there is a script by Martin Fischer at www.hilfdirselbst.ch (a swizz-german website) that could fit your needs. You can download it if you choose to be a premium member which requires a small fee. It's written for InDesign CS3 but it should run with CS4 or CS5. I tested it with a small list of words and it ran fine with InDesign CS5.
http://indesign.hilfdirselbst.ch/text/indexeintrage-mit-unterstichworten-uber-eine-konkord anzdatei-erzeugen.html
If you prefer a Google translation:
http://translate.google.de/translate?hl=de&sl=de&tl=en&u=http%3A%2F%2Findesign.hilfdirselb st.ch%2Ftext%2Findexeintrage-mit-unterstichworten-uber-eine-konkordanzdatei-erzeugen.html
Uwe

Similar Messages

  • I need autocomplete  for search for words in a txt. file

    i am not so good in java.
    I have a running code for search in text with a txt. file (from user bluefox815).
    But I need a solution with autocomplete for search for words in a txt. file.
    test_file.txt (Teil des Inhaltes):
    Roboter robots
    Mechatronik mechatronics
    and so on
    Can you help me please.
    Here is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    * this program searches for a string in a text file and
    * says which line it found the string on
    public class SearchText implements ActionListener {
    private String filename = "test_file.txt";
    private JFrame frame;
    private JTextField searchField;
    private JButton searchButton;
    private JLabel lineLabel;
    private String searchFor;
    private BufferedReader in;
    public SearchText() {
    frame = new JFrame("SearchText");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    searchField = new JTextField(80);
    searchButton = new JButton("Search");
    // this is used later in our actionPerformed method
    searchButton.setActionCommand("search");
    // this sets the action listener for searchButton, which is the current class
    // because this class implements ActionListener
    searchButton.addActionListener(this);
    lineLabel = new JLabel("nach dem Fachbegriff suchen");
    public void createGUI() {
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));
    JPanel bottomPanel = new JPanel();
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
    topPanel.add(searchField);
    topPanel.add(searchButton);
    bottomPanel.add(lineLabel);
    mainPanel.add(topPanel);
    mainPanel.add(bottomPanel);
    frame.getContentPane().add(mainPanel);
    frame.pack();
    frame.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    // now we get the action command and if it is search, then it is the button
    if ("search".equals(e.getActionCommand())) {
    searchFor = searchField.getText();
    searchTheText();
    private void searchTheText() {
    // I initialize the buffered reader here so that every time the user searches
    // then the reader will start at the beginning, instead of where it left off last time
    try {
    in = new BufferedReader(new FileReader(new File(filename)));
    } catch (IOException e) {
    String lineContent = null;
    int currentLine = 0;
    // this will be set to true if the string was found
    boolean foundString = false;
    while (true) {
    currentLine++;
    // get a line of text from the file
    try {
    lineContent = in.readLine();
    } catch (IOException e) {
    break;
    // checks to see if the file ended (in.readLine() returns null if the end is reached)
    if (lineContent == null) {
    break;
    if (lineContent.indexOf(searchFor) == -1) {
    continue;
    } else {
    lineLabel.setText(String.valueOf(lineContent));
    foundString = true;
    break;
    if (!foundString)
    lineLabel.setText("Es kann kein Fachbegriff gefunden werden.");
    try {
    in.close();
    } catch (IOException ioe) {
    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    new SearchText().createGUI();
    }

    Markus1 wrote:
    But I need a solution with autocomplete for search for words in a txt. file.What is your question? What have you tried so far? What are you having difficulty with?
    Mel

  • How to read Chinese word from a TXT file

    File.OpenText() read a TXT File with  Chinese word in   ;but it not show right.
    exam:The TXT File include :中国
     this.Txt1.Text=ofd.File.OpenText().ReadToEnd();
    but it show :��ʹ�ݼƻ��
    How to solve it

    What encoding does the text file use?  Unlike .NET, Silverlight only supports UTF-8 and UTF-16.  File.OpenText() uses UTF-8 by default.
    If the text file is in some other encoding, you can create your own encoding class (that derives from System.Text.Encoding) that can be used to read the text file.
    class MyEncoding : System.Text.Encoding {
    this.Txt1.Text = (new StreamReader(ofd.File.OpenRead(), new MyEncoding())).ReadToEnd();
    Regards,
    Justin Van Patten
    Program Manager
    Common Language Runtime

  • Finding words in a txt file!

    Hi guys,
    I have to write a program that opens a .txt file and looks for a specific word in the file and then prints out the entire line that word appears in. I have to use a String Tokenizer? I don't know how to write the program. All I have so far is a program that prints the entire txt document (or each line). I think String Tokenizer is involved in here somewhere but I don't know how to use it.
    import java.io.FileReader;
    import java.util.StringTokenizer;
    import java.io.*;
    public class Find
         public static void main (String[] args) throws IOException
              String line;
              String name;
              String file="find.txt";
              StringTokenizer tokenizer;
              FileReader x = new FileReader (file);
              BufferedReader inFile = new BufferedReader (x);
              line = inFile.readLine();
              while (line != null)
                   tokenizer = new StringTokenizer (line);
    word = tokenizer.nextToken("word");
                   System.out.println (line + "\n");
                   line = inFile.readLine();
              inFile.close();
    The text file Find.txt just has a few lines of text in it.
    I want to make it so that I can look for a specific word in the text file and the resulting printout will be the entire line that the word appears in.
    Any help would be great! Thanks!

    Your first post is very close to what you want:
    import java.io.FileReader;
    import java.util.StringTokenizer;
    import java.io.*;
    public class Find
         public static void main (String[] args) throws IOException
         String line;
         String name;
         String file="find.txt";
         StringTokenizer tokenizer;
         FileReader x = new FileReader (file);
         BufferedReader inFile = new BufferedReader (x);
         line = inFile.readLine();
         while (line != null)
              tokenizer = new StringTokenizer (line);
              String word = tokenizer.nextToken();
              if (word.equals("word")) // we are searchig for the String word
                   System.out.println ("found it! "+line + "\n");
              line = inFile.readLine();
         inFile.close();
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using AppleScript to step through a txt file.

    I am new to AppleScript but not programming.
    I have a program in AppleScript that currently takes my integers
    Ip, user, passwrd  and uses the in terminal to gain access to our clients machines and do certain tasks.
    I would like to have a txt file filled with the ip addresess so that I can simply step through the file.
    I can read in from the txt file but it simply reads the entire thing and crashes out my program.
    Can someone please help?
    Thank You.

    I can but I cannot.
    Text file would be as follows
    10.10.10.20
    10.10.10.21
    10.10.10.25
    10.20.45.200
    84.30.26.79
    So on and so forth for all the IPs of our clients machines.
    The script has the variables as follows.
    set acct to "admin"
    set pass to "password"
    set addr to "10.10.10.10"
    set rightServer to "Connected to " & addr & "? If not fix it!"
    #Login Process
    activate application "Terminal"
    delay 1
    tell application "System Events" to keystroke "ssh " & acct & "@" & addr
    tell application "System Events" to keystroke return
    delay 2
    activate application "Terminal"
    Then the script goes on from there to do some other things.
    I need help with the login process.
    I would like to set it to a txt file and watch as it steps through the file so its more automated.

  • Counting Lines/Char/Words in a txt file

    I created this method that counts the mount of lines/words/ and char in a file. But for somereason, its not working correctly. Its giving me numbers that are a little off.
         // Method countLineWordChar counts the number of lines, words, and chars, in
         // a file given as a parameter. This method returns an array of intergers. In
         // the array, the first position is the amount of lines, the second posistion
         // is the amount of words, and the third is the amount of chars.
         public static int[] countLineWordChar(File f)
              int[] countInfo = new int[3];
              int lineCount = 0;
              int wordCount = 0;
              int charCount = 0;
              try
                   FileReader fr = new FileReader(f);
                   StreamTokenizer st = new StreamTokenizer(fr);
                   st.eolIsSignificant(true);
                   while(st.nextToken() != StreamTokenizer.TT_EOF)
                        switch(st.ttype)
                             case StreamTokenizer.TT_WORD:
                             wordCount++;
                             String wordRead = st.sval;
                             charCount += wordRead.length();
                             break;
                             case StreamTokenizer.TT_EOL:
                             lineCount++;
                             break;
                             default:
                             break;
              catch (FileNotFoundException fnfe)
                   UserInterface.showFileNotFoundError();
              catch (IOException ioe)
                   JOptionPane.showMessageDialog(null, ioe.toString(), "Error",
                   JOptionPane.ERROR_MESSAGE);
              countInfo[0] = lineCount;
              countInfo[1] = wordCount;
              countInfo[2] = charCount;
              return countInfo;
         // Based on the countLineWordChar method, returns the amount of lines.
         public static int getLineCount(int[] countInfo)
              return countInfo[0];
         // Based on the countLineWordChar method, returns the amount of words.
         public static int getWordCount(int[] countInfo)
              return countInfo[1];
         // Based on the countLineWordChar method, returns the amount of chars.
         public static int getCharCount(int[] countInfo)
              return countInfo[2];
         }

    Well, for one thing, you're adding the number of characters in words, not the number of characters overall. Are you sure it's not supposed to be the latter?
    Otherwise, how is it off?
    Basically the way you fix this kind of thing is to add debugging code, then give it a small data sample and watch the debugging messages.
    By the way, returning an array of different kinds of values like that isn't ideal. In this case it's not so bad, because the kinds of values are actually really similar -- they could be viewed as a tuple. But don't make a habit of it. An example of a bad application of this would be if you were returning an array that counted, say, the weight of a ship, the length of its hull, and the distance it travelled in the last year. The alternative is to create a class that encapsulates the data being returned, or to move functionality around so the data isn't being returned at all.

  • Search a txt file

    how can i search for a certain word in a txt file?

    import java.awt.*;
    import java.io.*;
    import hsa.Console;
    public class Duel_Prac
        static Console c = new Console ();
        static BufferedReader file;
        static String f_name;
        static String l_name;
        static String option = "";
        static String filedata;
        static public void main (String[] args) throws IOException
            startup_page ();
            main_menu ();
        static void startup_page ()
            c.clear ();
            c.println ("Prac");
            c.println ();
            c.println ("Before we begin, please provide us with the following information about you: ");
            c.println ();
            c.print ("First Name: ");
            f_name = c.readLine ();
            c.print ("Last Name: ");
            l_name = c.readLine ();
        static void main_menu () throws IOException
            c.clear ();
            c.println ("Prac");
            c.println ();
            c.println ();
            c.println ();
            c.print ("1) shop");
            do
                c.setCursor (3, 1);
                c.print ("What do you want do ? ");
                option = c.readLine ();
                if (option.equals ("1") == true || option.equalsIgnoreCase ("shop") == true)
                    break;
            while (!option.equals ("1") && !option.equalsIgnoreCase ("shop"));
            if (option.equals ("1") == true || option.equalsIgnoreCase ("shop") == true)
                shop ();
        static void shop () throws IOException
            try
                file = new BufferedReader (new FileReader ("Card Data/EP1-EN.masterlist"));
                if ((filedata = file.readLine ()) == null)
                    file.close ();
            catch (IOException e)
                c.println ("Data is corrupt");
            String l = "Light";
            if (filedata.equals (l))
                c.println ("Congratualations, your code is correct");
            else
                c.println ("Too bad, your code has bugs");
    }here is the code. what is wrong with it?

  • Checking .txt file with valid XML tags

    hey guys,
    I've a .txt file which conatins info with XML tags. I've to check whether the file contains valid tags or not!
    a tag should start with "<" and end with ">", there shouldn't be space between characters after "<" e.g.
    a tag should be like "<name>" or "</name>" not "< name>" or  "< /name>" nor "<name" or "</name"nor "name>" or  "/name>"Here is an example of a well formed XML document:
    <root>
    Some text <nextTag> more text  <secondTag> stuff </secondTag> </nextTag> more text again
    </root>Here is an example of XML .txt file:
    <students >
         <student>
              <name> John </name>
              <name> Doe </name>
              <address> 98 Pine St.</address>
         </stdnt>
    </students>I also have to make sure that no text appears before and after the root tag! Please help me, i'm trying to figure out but my alogrithm just doesn't work! Thanks in advance!!!

    What's the purpose of those requirements? If you
    wanted to check whether the file was well-formed XML
    then you would just need to run it through an XML
    parser. But some of the things you plan to reject are
    actually well-formed XML. I don't see the point of
    that.basically, it's my assignment. In the assignment our task is to check the .txt files to make sure that all XML tags are valid. The problems i mentioned in my first post, i've figured those out, eventually. There're few other things which i've to also make sure for example no text appearing before and after the root tag
    Can someone please tell me how i can check following cases:
    text<root> or </root> text  (both are invalid XML files)

  • How do I search for a word through multiple files in my directories ??

    Hello everyone
    How do I search for a word through multiple files in my directories ??
    I am guessing one tedious way to do it would be to pass all the file names as command line arguments but I"m sure there exist a much easier and faster way to do it.
    Thanks a lot

    You need to pass only the directory name as parameter and then retrieve the files(recursively throug subdirs or not, however you wish) of that directory.
    There were at least 2 threads yesterday on how to retrieve files from directory, and there are many others in the archive so I leave the search part to you ;)
    HTH
    Mike

  • How to write csv or txt file through utl_file with UTF-8 Encoding

    Hi All,
    I need your help to write the data from DB to csv or txt file with UTF-8 encoding through utl_file.
    Database character set:AL32UTF8
    Database version:10G
    All the columns in the DB are of varchar2 type.
    Please let me know if there is any way of doing it.

    What was wrong with the info provided in the link(s) given?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620]

  • I have different TXT file in single folder from that that current date TXT files need to be get loaded into local database through SSIS Package

    Hi frds,
    I have fetched the TXT files through FTP from different location.All the file got loaded in my Local drive into single folder
    And in that  Folders i will have these kind of Files
    ACTEST00001_20141028_0405_INV.TXT
    ACTEST00001_20141029_0405_SL.TXT
    ACTEST00001_20141028_0405_SV.TXT
    ACTEST00001_20141029_0405_SV_APPT.
    And i need to load these only ''20141029'' files only.
    How can i do this in SSIS packege i need to skip rest all the files.
    I have attached the Structure of my SSIS packege.
    Please go through it and suggest me the solution please.
    Arunraj Kumar

    See
    this and
    this.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How to Send a .txt file through FTPTARGET connector of Integration Broker

    Hi,
    Is it possible to send a .txt file(infact anyfile other than xml format) to a host server using FTP Target connector of Integration Broker. If so can someone explain the steps to achieve it.
    Regards,
    Uday

    Yes, you can do that. I've done exactly that couple years ago.
    If I remember currently, below is a high level of how I did it.
    Read the file you want to send into the buffer using GetString function like:
    +/*A single string containing the entire contents of the file including line terminator.+
    +     After this method completes successfully, the temp file is deleted.*/+
    +&FileData = &FiletoRead.GetString();+
    The function deletes the file so I had to create a temp copy of what i want to send and read that copy instead of the original file. Also, IB will have issues if you are trying to send an empty file. so i did a basic check, if the file is empty then put something in it.
    rem -- IB message will fail if we are trying to send an empty file;
    If None(&FileData) Or
    +&FileData = "" Or+
    +&FileData = " " Then+
    MessageBox(0, "", 0, 0, ("File " | &sTargetFileName | " is empty."));
    +&FileData = "No Data Found!";+
    End-If;
    Next, you need to load the file data that are now in &FileData to IB:
    +&MSG = CreateMessage(@&sServiceOperation);+
    +/* Generate the XML doc. */+
    +&dFtp = CreateXmlDoc("");+
    rem -- &bReturn = &dFtp.LoadIBContent("Some text inside of a file to send through IB!");
    +&bReturn = &dFtp.LoadIBContent(&FileData);+
    Then put XML into the message and publish it:
    +/*put the XML in the message*/+
    +&MSG.SetXmlDoc(&dFtp);+
    +%IntBroker.Publish(&MSG);+
    You might need to load some IBConnectorInfo and override them using your PC. I had to do that to get the password for the FTP transmission encrypted:
    /* Encrypt the password */
    &pscipher = CreateJavaObject("com.peoplesoft.pt.integrationgateway.common.EncryptPassword");
    &encPassword = &pscipher.encryptPassword(&sPassword);
    &pscipher = Null;
    Good luck and hope this helps.

  • Anchor tag in txt file

    is there any way that i could include a link that has
    punctuation characters inside of an anchor tag of an externally
    loaded txt file. something like this <a href='
    http://www.dailymotion.com/relevance/search/leah%2Bdizon/video/x18dj1_leah-dizon'>click</a >.
    i noticed that txt files loaded into flash seem to break at any
    point where more unusual punctuation characters are
    included.

    This is such a great solution--thanks so much for sharing.  I'm having a problem with the name of my collapsible panels (which operate similarly to Tabbed Panels, as far as I understand).  Basically I am trying to use anchor tags and my goal is to create a hyperlink on page 1 that points to content within a spry widget on page 2 of my webpage.  I obviously want the spry widget on page 2 to open up on click and the user to be taken to where my anchor tag is located.  In this thread (http://forums.adobe.com/message/209107#209107), Mr. Celic seems to indicate using something like this:
    <a href="#anchorname" onclick="TabbedPanels1.showPanel(2);">
    My exact code is like this:     <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel1.open();">content here</a>
    The good news is that this works, but my problem is that page 1 of my website also has a CollapsiblePanel1 so when I click on the link above, CollapsiblePanel1 on page 1 opens, not the CollapsiblePanel1 on page 2 of my site.  I went into page 2 and clicked on "CollapsiblePanel1" and in the "Properties" panel renamed it to "CollapsiblePanel11" then changed my code to
    <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel11.open();">content here</a>
    but that didn't do a thing!  I'm super stuck and don't know how else to rename the collapsible panels or how to get it to work.
    One thing I can't figure out from the original solution (<a href="#" onclick="TabbedPanels1.showPanel(2);">) is what is "showPanel(2)"? Where did she get this from/where can I find the equivalent for my collapsible panel spry? This could be where I'm going wrong.
    Any thoughts would be greatly appreciated.
    Thanks so much! Catherine

  • Txt file word count

    Hi,
    I have a txt file with words on it i want to count them.
    is there any command that allows me to do it ?
    Thanks

    Enter the following into the Terminal:
    wc -w
    followed by typing a space, dragging the file into the Terminal window or otherwise entering its path, and pressing Enter.
    (44078)

  • I want to open a txt file and output data through an AO-using DAQmx for PXI

    I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
    Any idea?

    What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.

Maybe you are looking for

  • Problems with sound in Macbook 1,1

    Hello, I have a macbook 1,1 with CPU 2.0Ghz (i don't really know what is the right model) that a friend give to me after He buy a new one. It came with windows xp. I tryed to install windows 7 (without bootcamp, using only win7 DVD) and everything wa

  • Htp.p doesn't work from the custom button event handler ...

    Hi, I am trying to pop up an alert from the custom button event handler. I created a button and put the following code. htp.p('<script language='JavaScript1.3"> alert ("Test Message"); </script>; But alter doesn't show up after clicking the button. T

  • Save As - can't save a pic as a Jpeg

    Hi, How do I set Firefox to always save a photo as a Jpeg then right clicking to "Save As" when I wish to copy a photo from a web page please? I have Windows XP. Thank you in advance.

  • Number of instances

    does any one know a simple way to return the number of instances or the number of synchronized objects in a fms application?? thank you in advance.

  • Connection object is null returned

    Hi, I have created a datasource in Server Navigator for MySql database. Also in Admin Console I have given a JNDI name to this datasource. I am using this JNDI name. Application is able to lookup for this JNDI name but unable to get connection object