Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6786299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:13:44+00:00 2026-05-26T17:13:44+00:00

I am struggling at the moment with Mallet’s ridiculously poor documentation regarding HMMs. I

  • 0

I am struggling at the moment with Mallet’s ridiculously poor documentation regarding HMMs. I have managed to import the data into instances(adapted from the ImportExample.java snippet) and I was just wondering how they can be used to train an HMM model.
I first started by creating an HMM instance but I wasn’t sure whether to go for:

    HMM hmm = new HMM(instances.getDataAlphabet(), instances.getTargetAlphabet());

Or use the same data alphabet twice like so:

    HMM hmm = new HMM(instances.getDataAlphabet(), instances.getDataAlphabet());

Either way when I get to

    hmm.train(instances);

I get the following error:

cc.mallet.types.FeatureVector cannot be cast to
cc.mallet.types.FeatureVectorSequence

I would be grateful for any help you can provide.

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:13:45+00:00Added an answer on May 26, 2026 at 5:13 pm

    I have managed to solve this particular problem and thought it may be useful to others with the same problem. There is a solution within the examples package in mallet: http://hg-iesl.cs.umass.edu/hg/mallet/file/83adf71b0824/src/cc/mallet/examples/TrainHMM.java

    The main problem was related to how you imported the data through the pipe. Also from what I can tell it helps if you data is in this format:

    TOKEN  TAG 
    TOKEN  TAG
    

    I assuming you can have features in between the TOKEN and TAG but am not a 100% sure. If anyone knows of any good examples and documentation about using HMM within mallet, please let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Struggling with styling the mouse over for a button ... I have managed to
I'm actually struggling to word this properly. What I have at the moment is
I'm struggling with something rather simple in flash at the moment. Imagine you have
I am working on an iPhone app at the moment and I am struggling
Iam struggling with NHibernate and its lazyload. I have a structure which I simplified
been struggling with an issue now for a day or two. I have an
Really struggling to figure this out. Just trying to take in data from php
Attempting/struggling to get registration and sign-up working within an active admin project. I have
I'm struggling with grabbing an image at the moment... sounds silly, but check out
I have been struggling with a problem for a while and so far have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.